New: Revenue stamps works for invoices
This commit is contained in:
parent
4b1c9c1a0d
commit
75c15ee9a1
@ -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();
|
||||
|
||||
@ -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 '<td align="right">'.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 '</td>';
|
||||
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
||||
print '<td align="right">';
|
||||
@ -398,7 +399,7 @@ if ($resql)
|
||||
|
||||
print "</tr>\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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user