From 75c15ee9a1c08ec0cc32ec426e79c630164a5bf6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 25 Mar 2013 13:04:03 +0100 Subject: [PATCH] New: Revenue stamps works for invoices --- htdocs/admin/dict.php | 5 ++--- htdocs/compta/facture/impayees.php | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 8b80091d0a9..21f6195525d 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -70,8 +70,7 @@ $hookmanager->initHooks(array('admin')); // Put here declaration of dictionnaries properties // Sort order to show dictionnary (0 is space). All other dictionnaries (added by modules) will be at end of this. -$taborder=array(9,0,4,3,2,0,1,8,19,16,0,5,11,0,6,0,10,12,13,0,14,0,7,17,0,22,20,18,21,0,15,0,24,23); -if (! empty($conf->global->MAIN_USE_REVENUESTAMP)) $taborder=array(9,0,4,3,2,0,1,8,19,16,0,5,11,0,6,0,10,25,12,13,0,14,0,7,17,0,22,20,18,21,0,15,0,24,23); +$taborder=array(9,0,4,3,2,0,1,8,19,16,0,5,11,0,6,0,10,25,12,13,0,14,0,7,17,0,22,20,18,21,0,15,0,24,23); // Name of SQL tables of dictionnaries $tabname=array(); @@ -325,7 +324,7 @@ $tabcond[21]= ! empty($conf->propal->enabled); $tabcond[22]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled)); $tabcond[23]= (! empty($conf->global->ACCOUNTING_USEDICTTOEDIT) && ! empty($conf->accounting->enabled)); // The accountancy plan should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionnary editor. $tabcond[24]= (! empty($conf->global->ACCOUNTING_USEDICTTOEDIT) && ! empty($conf->accounting->enabled)); // The accountancy system should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionnary editor. -$tabcond[25]= (! empty($conf->global->MAIN_USE_REVENUESTAMP)); // The accountancy system should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionnary editor. +$tabcond[25]= true; // List of help for fields $tabhelp=array(); diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 327c56132f5..086b9a35fc4 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -197,7 +197,7 @@ if (! $sortorder) $sortorder="ASC"; $limit = $conf->liste_limit; $sql = "SELECT s.nom, s.rowid as socid"; -$sql.= ", f.rowid as facid, f.facnumber, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.localtax1, f.localtax2"; +$sql.= ", f.rowid as facid, f.facnumber, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp"; $sql.= ", f.datef as df, f.date_lim_reglement as datelimite"; $sql.= ", f.paye as paye, f.fk_statut, f.type"; $sql.= ", sum(pf.amount) as am"; @@ -370,7 +370,8 @@ if ($resql) print ''.price($objp->total_tva); $tx1=price2num($objp->localtax1); $tx2=price2num($objp->localtax2); - if (! empty($tx1) || ! empty($tx2)) print '+'.price($tx1 + $objp->tx2); + $revenuestamp=price2num($objp->revenuestamp); + if (! empty($tx1) || ! empty($tx2) || ! empty($revenuestamp)) print '+'.price($tx1 + $tx2 + $revenuestamp); print ''; print ''.price($objp->total_ttc).''; print ''; @@ -398,7 +399,7 @@ if ($resql) print "\n"; $total_ht+=$objp->total_ht; - $total_tva+=($objp->total_tva + $tx1 + $tx2); + $total_tva+=($objp->total_tva + $tx1 + $tx2 + $revenuestamp); $total_ttc+=$objp->total_ttc; $total_paid+=$objp->am + $cn;