diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/build/patch/buildpatch.ksh ./dolibarr3.0/build/patch/buildpatch.ksh --- ./dolibarr/build/patch/buildpatch.ksh 2011-05-28 16:20:15.125168016 +0200 +++ ./dolibarr3.0/build/patch/buildpatch.ksh 2011-01-06 09:22:21.000000000 +0100 @@ -12,13 +12,12 @@ #---------------------------------------------------------------------------- # Put here full path of original and new dolibarr directories +# Example: olddir=/mydirA1/mydirA2/dolibarrold +# Example: newdir=/mydirB1/mydirB2/dolibarr +export olddir=original_dir +export newdir=modified_dir +echo ----- Building patch file mypatch.patch ----- +echo Build patch between \"$olddir\" and \"$newdir\" +diff -BNaur --exclude=CVS --exclude="*.patch" --exclude=".#*" --exclude="*~" --exclude="*.rej" --exclude="*.orig" --exclude="*.bak" --exclude=conf.php --exclude=documents $olddir $newdir > mypatch.patch -#export olddir -#export newdir=modified_dir -if [ -z $1 || -z $2 || -z $3 ] -then echo buildpatch.sh original_dir_path modified_dir_path patch_filename -else echo ----- Building patch file mypatch.patch ----- - echo Build patch between \"$1\" and \"$2\" - diff -BNaur --exclude=CVS --exclude="*.patch" --exclude=".#*" --exclude="*~" --exclude="*.rej" --exclude="*.orig" --exclude="*.bak" --exclude=conf.php --exclude=documents $1 $2 > $3 -fi diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/compta/.directory ./dolibarr3.0/htdocs/compta/.directory --- ./dolibarr/htdocs/compta/.directory 2011-05-28 11:53:56.764820297 +0200 +++ ./dolibarr3.0/htdocs/compta/.directory 2011-05-28 12:01:22.095326329 +0200 @@ -1,4 +1,5 @@ [Dolphin] AdditionalInfo=31 -Timestamp=2011,5,28,11,53,56 +SortOrder=0 +Timestamp=2011,5,28,12,1,22 ViewMode=1 diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/compta/journal/purchasesjournal.php ./dolibarr3.0/htdocs/compta/journal/purchasesjournal.php --- ./dolibarr/htdocs/compta/journal/purchasesjournal.php 2011-01-05 16:15:20.000000000 +0100 +++ ./dolibarr3.0/htdocs/compta/journal/purchasesjournal.php 2011-05-28 12:45:49.365412540 +0200 @@ -25,6 +25,7 @@ $langs->load("companies"); $langs->load("other"); $langs->load("compta"); +$langs->load("products"); // Protection if external user if ($user->societe_id > 0) @@ -48,33 +49,81 @@ * Put here all code to build page ****************************************************/ -llxHeader('','',''); - -$html=new Form($db); - +$exportlink="https://192.168.1.253:10081/dolibarr/htdocs/compta/journal/purchasesjournal.php"; +$nom=$langs->trans("PurchasesJournal"); $year_current = strftime("%Y",dol_now()); $pastmonth = strftime("%m",dol_now()) - 1; -$pastmonthyear = $year_current; -if ($pastmonth == 0) +$pastmonthyear = $year_current; +if ($pastmonth == 0) { $pastmonth = 12; $pastmonthyear--; } -$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); -$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); +if ($_REQUEST["yearid"] != NULL) +{ + $year=$_REQUEST["yearid"]; +}else +{ + $year=$year_current; +} + +if ($_REQUEST["monthid"] != NULL) +{ + $month=$_REQUEST["monthid"]; + $date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); + $date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); + $year=$_REQUEST["date_startyear"]; + +}else +{ + $month=$pastmonth; + $date_start=dol_get_first_day($year_current,$month); + $date_end=dol_get_last_day($year_current,$month); + $year=$year_current; + +} + if (empty($date_start) || empty($date_end)) // We define date_start and date_end { $date_start=dol_get_first_day($pastmonthyear,$pastmonth,false); $date_end=dol_get_last_day($pastmonthyear,$pastmonth,false); + $date_end=dol_get_last_day($pastmonthyear,$pastmonth,false); } -$nom=$langs->trans("PurchasesJournal"); +if ($_REQUEST["action"] == $langs->trans("Export")) +{ + $export = TRUE; + //date actuelle + $date = gmdate('D, d M Y H:i:s'); + + + header("Content-Type: text/csv"); + header('Content-Disposition: attachment; filename=' . $year . ($month < 10 ? "0".$month : $month) . "_" . str_replace(" ","_",$nom).".csv"); + header('Last-Modified: '. $date . ' GMT'); + header('Expires: ' . $date); + + //header specifique IE :s parce que sinon il aime pas + if(preg_match('/msie|(microsoft internet explorer)/i', $_SERVER['HTTP_USER_AGENT'])) + { + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + }else + { + header('Pragma: no-cache'); + } +}else +{ + llxHeader('','',''); + $html=new Form($db); + $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1) . "ou choisissez un mois et une année" . $html->select_month($month,'monthid') . "-" . $html->select_year_b($year,'yearid',0, '10','0'); + +} + + //$nomlink=; $builddate=time(); $description=$langs->trans("DescPurchasesJournal"); -$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1); -report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_PAYS); $idpays = $p[0]; @@ -131,20 +180,30 @@ else { dol_print_error($db); } - +$db->close(); /* - * Show result array + * Show result array ... or not :-) */ -$i = 0; -print ""; -print ""; -///print ""; -print ""; -print ""; -print ""; -print ""; -print "\n"; +if ($export == TRUE) +{ + print '"'.$langs->trans("Date").'","'.html_entity_decode($langs->trans("Piece"),3,'UTF-8').' ('.html_entity_decode($langs->trans("InvoiceRef"),3,'UTF-8').')","'; + print html_entity_decode($langs->trans("Account"),3,'UTF-8').'","'; + print html_entity_decode($langs->trans("Type"),3,'UTF-8').'","'.html_entity_decode($langs->trans("Debit"),3,'UTF-8').'","'.html_entity_decode($langs->trans("Credit"),3,'UTF-8').'"'; + print "\n"; +}else +{ + report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); + $i = 0; + print "
".$langs->trans("JournalNum")."".$langs->trans("Date")."".$langs->trans("Piece").' ('.$langs->trans("InvoiceRef").")".$langs->trans("Account")."".$langs->trans("Type")."".$langs->trans("Debit")."".$langs->trans("Credit")."
"; + print ""; + ///print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; +} $var=true; $r=''; @@ -156,27 +215,50 @@ $invoicestatic->ref=$val["ref"]; $invoicestatic->type=$val["type"]; - print ""; - // third party - //print ""; - print ""; - print ""; - + if ($export == TRUE) + { + print '"'.$val["date"].'",'; + print '"'.$invoicestatic->ref.'",'; + }else + { + print ""; + // third party + //print ""; + print ""; + print ""; + } foreach ($tabttc[$key] as $k => $mt) { - print ""; + if ($export == TRUE) + { + print '"'.html_entity_decode($k,3,'UTF-8').'","'.$langs->trans("ThirdParty").'",'.($mt>=0?$mt:'0').','.($mt<0?-$mt:'0')."\n"; + }else + { + print ""; + } + } + if ($export != TRUE) + { + print ""; } - print ""; - // product + // product foreach ($tabht[$key] as $k => $mt) { if ($mt) { - print ""; - //print ""; - print ""; - print ""; - print ""; + if ($export == TRUE) + { + print '"'.$val["date"].'",'; + print '"'.$invoicestatic->ref.'",'; + print '"'.html_entity_decode($k,3,'UTF-8').'","'.$langs->trans("Products").'",'.($mt<0?-$mt:'0').','.($mt>=0?$mt:'0')."\n"; + }else + { + print ""; + //print ""; + print ""; + print ""; + print ""; + } } } // vat @@ -185,21 +267,32 @@ { if ($mt) { - print ""; - //print ""; - print ""; - print ""; - print ""; + if ($export == TRUE) + { + print '"'.$val["date"].'",'; + print '"'.$invoicestatic->ref.'",'; + print '"'.html_entity_decode($k,3,'UTF-8').'","'.$langs->trans("VAT").'",'.($mt<0?-$mt:'0').','.($mt>=0?$mt:'0'); + }else + { + print ""; + //print ""; + print ""; + print ""; + print ""; + } + } + if ($export == TRUE) + { + print "\n"; } } $var = !$var; } - -print "
".$langs->trans("JournalNum")."".$langs->trans("Date")."".$langs->trans("Piece").' ('.$langs->trans("InvoiceRef").")".$langs->trans("Account")."".$langs->trans("Type")."".$langs->trans("Debit")."".$langs->trans("Credit")."
".$conf->global->COMPTA_JOURNAL_BUY."".$val["date"]."".$invoicestatic->getNomUrl(1)."
".$conf->global->COMPTA_JOURNAL_BUY."".$val["date"]."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("ThirdParty")."".($mt>=0?$mt:'')."".($mt<0?-$mt:'')."".$k."".$langs->trans("ThirdParty")."".($mt>=0?$mt:'')."".($mt<0?-$mt:'')."
".$conf->global->COMPTA_JOURNAL_BUY."".$val["date"]."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("Products")."".($mt<0?-$mt:'')."".($mt>=0?$mt:'')."
".$conf->global->COMPTA_JOURNAL_BUY."".$val["date"]."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("Products")."".($mt<0?-$mt:'')."".($mt>=0?$mt:'')."
".$conf->global->COMPTA_JOURNAL_BUY."".$val["date"]."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("VAT")." ".$key."".($mt<0?-$mt:'')."".($mt>=0?$mt:'')."
".$conf->global->COMPTA_JOURNAL_BUY."".$val["date"]."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("VAT")." ".$key."".($mt<0?-$mt:'')."".($mt>=0?$mt:'')."
"; - - +if ($export != TRUE) +{ + print ""; + llxFooter('$Date: 2011/01/05 15:15:20 $ - $Revision: 1.7 $'); +} // End of page -$db->close(); -llxFooter('$Date: 2011/01/05 15:15:20 $ - $Revision: 1.7 $'); ?> \ Pas de fin de ligne à la fin du fichier. diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/compta/journal/sellsjournal.php ./dolibarr3.0/htdocs/compta/journal/sellsjournal.php --- ./dolibarr/htdocs/compta/journal/sellsjournal.php 2011-01-05 16:15:20.000000000 +0100 +++ ./dolibarr3.0/htdocs/compta/journal/sellsjournal.php 2011-05-28 12:48:49.682578282 +0200 @@ -32,6 +32,8 @@ { accessforbidden(); } +$nom=$langs->trans("SellsJournal"); +//$nomlink=; /******************************************************************* @@ -47,36 +49,93 @@ * Put here all code to build page ****************************************************/ -llxHeader('','',''); -$html=new Form($db); // Put here content of your page // ... +$builddate=time(); +$description=$langs->trans("DescSellsJournal"); +$exportlink="https://192.168.1.253:10081/dolibarr/htdocs/compta/journal/sellsjournal.php"; $year_current = strftime("%Y",dol_now()); $pastmonth = strftime("%m",dol_now()) - 1; -$pastmonthyear = $year_current; -if ($pastmonth == 0) +$pastmonthyear = $year_current; + +if ($pastmonth == 0) { $pastmonth = 12; $pastmonthyear--; } -$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); -$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); +if ($_REQUEST["yearid"] != NULL) +{ + $year=$_REQUEST["yearid"]; +}else +{ + $year=$year_current; +} + + +if ($_REQUEST["monthid"] != NULL) +{ + //echo "monthid non nul"; + $month=$_REQUEST["monthid"]; + $date_start=dol_get_first_day($year,$month); + $date_end=dol_get_last_day($year,$month); + +}else +{ + //echo "monthid nul"; + $month=$pastmonth; + $date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); + $date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); + if (isset($_REQUEST["date_startyear"])) + { + $year=$_REQUEST["date_startyear"]; + } + +} + if (empty($date_start) || empty($date_end)) // We define date_start and date_end { - $date_start=dol_get_first_day($pastmonthyear,$pastmonth,false); $date_end=dol_get_last_day($pastmonthyear,$pastmonth,false); + $date_start=dol_get_first_day($pastmonthyear,$pastmonth,false); + $date_end=dol_get_last_day($pastmonthyear,$pastmonth,false); } -$nom=$langs->trans("SellsJournal"); -//$nomlink=; -$builddate=time(); -$description=$langs->trans("DescSellsJournal"); -$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1); -report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); +if ($_REQUEST["action"] == $langs->trans("Export")) +{ + $export = TRUE; + //date actuelle + $date = gmdate('D, d M Y H:i:s'); + + + header("Content-Type: text/csv"); + header('Content-Disposition: attachment; filename=' . $year . ($month < 10 ? "0".$month : $month) . "_" . str_replace(" ","_",$nom).".csv"); + header('Last-Modified: '. $date . ' GMT'); + header('Expires: ' . $date); + //header specifique IE :s parce que sinon il aime pas + if(preg_match('/msie|(microsoft internet explorer)/i', $_SERVER['HTTP_USER_AGENT'])) + { + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + }else + { + header('Pragma: no-cache'); + } +}else +{ + llxHeader('','',''); + $html=new Form($db); + $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1) . "ou choisissez un mois et une année" . $html->select_month($month,'monthid') . "-" . $html->select_year_b($year,'yearid',0, '10','0'); + +} + +/*if ( $export != TRUE ) +{ + $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1) . $html->select_month($month,$htmlname='monthid',$useempty=0); + +}*/ $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_PAYS); $idpays = $p[0]; @@ -90,7 +149,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '".$idpays."'"; $sql .= " WHERE f.fk_statut > 0 AND f.entity IN (0,".$conf->entity.")"; if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; -$sql .= " order by f.rowid"; +$sql .= " order by f.datef"; $result = $db->query($sql); if ($result) @@ -138,16 +196,24 @@ * Show result array */ - -$i = 0; -print ""; -print ""; -//print ""; -print ""; -print ""; -print ""; -print "\n"; - +if ($export == TRUE) +{ + print '"'.$langs->trans("Date").'","'.html_entity_decode($langs->trans("Piece"),3,'UTF-8').' ('.html_entity_decode($langs->trans("InvoiceRef"),3,'UTF-8').')","'; + print html_entity_decode($langs->trans("Account"),3,'UTF-8').'","'; + print html_entity_decode($langs->trans("Type"),3,'UTF-8').'","'.html_entity_decode($langs->trans("Debit"),3,'UTF-8').'","'.html_entity_decode($langs->trans("Credit"),3,'UTF-8').'"'; + print "\n"; +}else +{ + report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); + $i = 0; + print "
".$langs->trans("JournalNum")."".$langs->trans("Date")."".$langs->trans("Piece").' ('.$langs->trans("InvoiceRef").")".$langs->trans("Account")."".$langs->trans("Type")."".$langs->trans("Debit")."".$langs->trans("Credit")."
"; + print ""; + //print ""; + print ""; + print ""; + print ""; + print "\n"; +} $var=true; $r=''; @@ -158,50 +224,93 @@ $invoicestatic->id=$key; $invoicestatic->ref=$val["ref"]; $invoicestatic->type=$val["type"]; - - print ""; - // third party - //print ""; - print ""; - print ""; + $date_a = substr($val["date"],8,2) . '/' . substr($val["date"],5,2) .'/'. substr($val["date"],0,4); + if ($export == TRUE) + { + print '"'.$date_a.'","'; + print $invoicestatic->ref . '",'; + }else + { + print ""; + print ""; + print ""; + } foreach ($tabttc[$key] as $k => $mt) { - print ""; + if ($export == TRUE) + { + print '"'.html_entity_decode($k,3,'UTF-8').'","'.$langs->trans("ThirdParty").'",'.($mt>=0?$mt:'0').','.($mt<0?-$mt:'0'); + }else + { + print ""; + } } - print ""; + if ($export != TRUE) + { + print ""; + }else + { + print "\n"; + } // product foreach ($tabht[$key] as $k => $mt) { if ($mt) { - print ""; - //print ""; - print ""; - print ""; - print ""; + if ($export == TRUE) + { + print '"'.$date_a.'","'; + //print $invoicestatic->getNomUrl(1).'","'; + print $invoicestatic->ref . '",'; + print '"'.html_entity_decode($k,3,'UTF-8').'","'.$langs->trans("Products").'",'.($mt<0?-$mt:'0').','.($mt>=0?$mt:'0')."\n"; + }else + { + print ""; + //print ""; + print ""; + print ""; + print ""; + } } } // vat //var_dump($tabtva); foreach ($tabtva[$key] as $k => $mt) { - if ($mt) - { - print ""; - //print ""; - print ""; - print ""; - print ""; - } + if ($mt) + { + if ($export == TRUE) + { + print '"'.$date_a.'","'; + print $invoicestatic->ref . '",'; + print '"'.html_entity_decode($k,3,'UTF-8').'","'.$langs->trans("VAT").'",'.($mt<0?-$mt:'0').','.($mt>=0?$mt:'0'); + + }else + { + print ""; + //print ""; + print ""; + print ""; + print ""; + } + } + if ($export == TRUE) + { + print "\n"; + } } - $var = !$var; + +} +$db->close(); +if ($export != TRUE) +{ + print "
".$langs->trans("JournalNum")."".$langs->trans("Date")."".$langs->trans("Piece").' ('.$langs->trans("InvoiceRef").")".$langs->trans("Account")."".$langs->trans("Type")."".$langs->trans("Debit")."".$langs->trans("Credit")."
".$conf->global->COMPTA_JOURNAL_SELL."".$val["date"]."".$invoicestatic->getNomUrl(1)."
".$date_a."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("ThirdParty")."".($mt>=0?$mt:'')."".($mt<0?-$mt:'')."".$k."".$langs->trans("ThirdParty")."".($mt>=0?$mt:'')."".($mt<0?-$mt:'')."
".$conf->global->COMPTA_JOURNAL_SELL."".$val["date"]."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("Products")."".($mt<0?-$mt:'')."".($mt>=0?$mt:'')."
".$conf->global->COMPTA_JOURNAL_SELL."".$date_a."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("Products")."".($mt<0?-$mt:'')."".($mt>=0?$mt:'')."
".$conf->global->COMPTA_JOURNAL_SELL."".$val["date"]."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("VAT")." ".$key."".($mt<0?-$mt:'')."".($mt>=0?$mt:'')."
".$conf->global->COMPTA_JOURNAL_SELL."".$date_a."".$invoicestatic->getNomUrl(1)."".$k."".$langs->trans("VAT")." ".$key."".($mt<0?-$mt:'')."".($mt>=0?$mt:'')."
"; + llxFooter('$Date: 2011/01/05 15:15:20 $ - $Revision: 1.7 $'); } -print ""; +// End of page -// End of page -$db->close(); -llxFooter('$Date: 2011/01/05 15:15:20 $ - $Revision: 1.7 $'); -?> \ Pas de fin de ligne à la fin du fichier. + +?> diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/core/class/.directory ./dolibarr3.0/htdocs/core/class/.directory --- ./dolibarr/htdocs/core/class/.directory 1970-01-01 01:00:00.000000000 +0100 +++ ./dolibarr3.0/htdocs/core/class/.directory 2011-05-28 13:27:59.760158041 +0200 @@ -0,0 +1,5 @@ +[Dolphin] +AdditionalInfo=31 +SortOrder=0 +Timestamp=2011,5,28,13,27,59 +ViewMode=1 diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/core/class/html.form.class.php ./dolibarr3.0/htdocs/core/class/html.form.class.php --- ./dolibarr/htdocs/core/class/html.form.class.php 2011-05-25 18:53:40.000000000 +0200 +++ ./dolibarr3.0/htdocs/core/class/html.form.class.php 2011-05-28 15:50:58.000000000 +0200 @@ -3081,6 +3081,83 @@ return; } + + /** + * \brief Return HTML combo list of month + * \param selected Preselected value + * \param htmlname Nom de la zone select + * \param useempty Affiche valeur vide dans liste + * TODO Move into html.formother + */ + function select_month($selected='',$htmlname='monthid',$useempty=0, $nooutput=0) + { + $month = monthArrayOrSelected(-1); // Get array + + $select_month = ''; + if ($nooutput != 1) + { + print $select_month; + } + return $select_month; + } + + /** + * \brief Return HTML combo list of years + * \param selected Preselected value (''=current year, -1=none, year otherwise) + * \param htmlname Name of HTML select object + * \param useempty Affiche valeur vide dans liste + * \param $min_year Offset of minimum year into list (by default current year -10) + * \param $max_year Offset of maximum year into list (by default current year + 5) + * TODO Move into html.formother + */ + function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $nooutput=0) + { + $currentyear = date("Y"); + $max_year = $currentyear+$max_year; + $min_year = $currentyear-$min_year; + if(empty($selected)) $selected = $currentyear; + + $output= '\n"; + if ($nooutput != 1) + { + print $output; + } + return $output; + } + + + + + /** * Function to show a form to select a duration on a page * @param prefix prefix diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/.directory ./dolibarr3.0/htdocs/.directory --- ./dolibarr/htdocs/.directory 1970-01-01 01:00:00.000000000 +0100 +++ ./dolibarr3.0/htdocs/.directory 2011-05-28 13:25:51.213680363 +0200 @@ -0,0 +1,5 @@ +[Dolphin] +AdditionalInfo=31 +SortOrder=0 +Timestamp=2011,5,28,13,25,51 +ViewMode=1 diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/langs/fr_FR/compta.lang ./dolibarr3.0/htdocs/langs/fr_FR/compta.lang --- ./dolibarr/htdocs/langs/fr_FR/compta.lang 2011-05-18 21:28:01.000000000 +0200 +++ ./dolibarr3.0/htdocs/langs/fr_FR/compta.lang 2011-05-28 12:33:50.046848095 +0200 @@ -77,6 +77,7 @@ ByThirdParties=Par tiers ByUserAuthorOfInvoice=Par auteur de la facture AccountancyExport=Export comptable +Export=Exporter ErrorWrongAccountancyCodeForCompany=Code compta client incorrect pour %s SuppliersProductsSellSalesTurnover=Chiffre d'affaires généré par la vente des produits des fournisseurs CheckReceipt=Bordereau de remise de chèques diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/langs/fr_FR/.directory ./dolibarr3.0/htdocs/langs/fr_FR/.directory --- ./dolibarr/htdocs/langs/fr_FR/.directory 1970-01-01 01:00:00.000000000 +0100 +++ ./dolibarr3.0/htdocs/langs/fr_FR/.directory 2011-05-28 13:26:01.787048692 +0200 @@ -0,0 +1,5 @@ +[Dolphin] +AdditionalInfo=31 +SortOrder=0 +Timestamp=2011,5,28,13,26,1 +ViewMode=1 diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/lib/.directory ./dolibarr3.0/htdocs/lib/.directory --- ./dolibarr/htdocs/lib/.directory 1970-01-01 01:00:00.000000000 +0100 +++ ./dolibarr3.0/htdocs/lib/.directory 2011-05-28 13:25:39.184261306 +0200 @@ -0,0 +1,5 @@ +[Dolphin] +AdditionalInfo=31 +SortOrder=0 +Timestamp=2011,5,28,13,25,39 +ViewMode=1 diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' ./dolibarr/htdocs/lib/report.lib.php ./dolibarr3.0/htdocs/lib/report.lib.php --- ./dolibarr/htdocs/lib/report.lib.php 2011-01-10 23:36:34.000000000 +0100 +++ ./dolibarr3.0/htdocs/lib/report.lib.php 2011-05-28 12:36:50.896018947 +0200 @@ -34,7 +34,7 @@ * @param builddate Date generation * @param exportlink Link for export or '' */ -function report_header($nom,$variante='',$period,$periodlink,$description,$builddate,$exportlink='') +function report_header($nom,$variante='',$period,$periodlink,$description,$builddate,$exportlink='',$exportbutton='') { global $langs; @@ -77,14 +77,18 @@ // Ligne d'export print ''; print ''.$langs->trans("GeneratedOn").''; - if (! $exportlink) print ''; - else print ''; - print dol_print_date($builddate); - if ($exportlink) print ''.$langs->trans("Export").''.$exportlink; - print ''; + print '' . dol_print_date($builddate) .''; + print ''; + + print ''; + print ''; + print ''; + if ($exportlink) + { + print ''; + print ''; + } - print ''; - print ''; print ''; print '';