Fix : on impayees remain to pay did not include deposits
This commit is contained in:
parent
ae41d38a96
commit
e0af2feced
@ -649,13 +649,12 @@ if ($resql)
|
|||||||
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
$cn=$facturestatic->getSumCreditNotesUsed();
|
$cn=$facturestatic->getSumCreditNotesUsed();
|
||||||
if (! empty($objp->am)) print price($objp->am);
|
$dep=$facturestatic->getSumDepositsUsed();
|
||||||
if (! empty($objp->am) && ! empty($cn)) print '+';
|
print price($objp->am + $cn + $dep);
|
||||||
if (! empty($cn)) print price($cn);
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Remain to receive
|
// Remain to receive
|
||||||
print '<td align="right">'.((! empty($objp->am) || ! empty($cn))?price($objp->total_ttc-$objp->am-$cn):' ').'</td>';
|
print '<td align="right">'.price($objp->total_ttc-$objp->am-$cn-$dep).'</td>';
|
||||||
|
|
||||||
// Status of invoice
|
// Status of invoice
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td align="right" class="nowrap">';
|
||||||
@ -685,7 +684,7 @@ if ($resql)
|
|||||||
$total_ht+=$objp->total_ht;
|
$total_ht+=$objp->total_ht;
|
||||||
$total_tva+=($objp->total_tva + $tx1 + $tx2 + $revenuestamp);
|
$total_tva+=($objp->total_tva + $tx1 + $tx2 + $revenuestamp);
|
||||||
$total_ttc+=$objp->total_ttc;
|
$total_ttc+=$objp->total_ttc;
|
||||||
$total_paid+=$objp->am + $cn;
|
$total_paid+=$objp->am + $cn + $dep;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user