commit
37b2046254
@ -9,7 +9,7 @@
|
|||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -562,15 +562,19 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
print '<td>'.$langs->trans('RefSupplier').'</td>';
|
print '<td>'.$langs->trans('RefSupplier').'</td>';
|
||||||
print '<td class="center">'.$langs->trans('Date').'</td>';
|
print '<td class="center">'.$langs->trans('Date').'</td>';
|
||||||
print '<td class="center">'.$langs->trans('DateMaxPayment').'</td>';
|
print '<td class="center">'.$langs->trans('DateMaxPayment').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td>'.$langs->trans('Currency').'</td>';
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
print '<td>'.$langs->trans('Currency').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>';
|
print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>';
|
print '<td class="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>';
|
||||||
|
print '<td class="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>';
|
||||||
|
}
|
||||||
print '<td class="right">'.$langs->trans('AmountTTC').'</td>';
|
print '<td class="right">'.$langs->trans('AmountTTC').'</td>';
|
||||||
print '<td class="right">'.$langs->trans('AlreadyPaid').'</td>';
|
print '<td class="right">'.$langs->trans('AlreadyPaid').'</td>';
|
||||||
print '<td class="right">'.$langs->trans('RemainderToPay').'</td>';
|
print '<td class="right">'.$langs->trans('RemainderToPay').'</td>';
|
||||||
print '<td class="center">'.$langs->trans('PaymentAmount').'</td>';
|
print '<td class="center">'.$langs->trans('PaymentAmount').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td class="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
|
print '<td class="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
||||||
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$total = 0;
|
$total = 0;
|
||||||
@ -596,8 +600,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
$remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT');
|
$remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT');
|
||||||
|
|
||||||
// Multicurrency Price
|
// Multicurrency Price
|
||||||
if (!empty($conf->multicurrency->enabled))
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
{
|
|
||||||
$multicurrency_payment = $invoice->getSommePaiement(1);
|
$multicurrency_payment = $invoice->getSommePaiement(1);
|
||||||
$multicurrency_creditnotes = $invoice->getSumCreditNotesUsed(1);
|
$multicurrency_creditnotes = $invoice->getSumCreditNotesUsed(1);
|
||||||
$multicurrency_deposits = $invoice->getSumDepositsUsed(1);
|
$multicurrency_deposits = $invoice->getSumDepositsUsed(1);
|
||||||
@ -616,8 +619,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
print '<td>'.$objp->ref_supplier.'</td>';
|
print '<td>'.$objp->ref_supplier.'</td>';
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
if ($objp->df > 0)
|
if ($objp->df > 0) {
|
||||||
{
|
|
||||||
print '<td class="center nowraponall">';
|
print '<td class="center nowraponall">';
|
||||||
print dol_print_date($db->jdate($objp->df), 'day').'</td>';
|
print dol_print_date($db->jdate($objp->df), 'day').'</td>';
|
||||||
} else {
|
} else {
|
||||||
@ -728,15 +730,16 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
$totalrecudeposits += $deposits;
|
$totalrecudeposits += $deposits;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if ($i > 1)
|
if ($i > 1) {
|
||||||
{
|
|
||||||
// Print total
|
// Print total
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4" class="left">'.$langs->trans('TotalTTC').':</td>';
|
print '<td colspan="4" class="left">'.$langs->trans('TotalTTC').':</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
print '<td> </td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
print '<td> </td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
print '<td> </td>';
|
||||||
|
print '<td> </td>';
|
||||||
|
}
|
||||||
print '<td class="right"><b>'.price($sign * $total_ttc).'</b></td>';
|
print '<td class="right"><b>'.price($sign * $total_ttc).'</b></td>';
|
||||||
print '<td class="right"><b>'.price($sign * $totalrecu);
|
print '<td class="right"><b>'.price($sign * $totalrecu);
|
||||||
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
||||||
@ -744,7 +747,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
print '</b></td>';
|
print '</b></td>';
|
||||||
print '<td class="right"><b>'.price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
print '<td class="right"><b>'.price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
||||||
print '<td class="center" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
print '<td class="center" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
|
print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
@ -785,7 +790,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
} else dol_print_error($db);
|
} else {
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user