commit
37b2046254
@ -9,7 +9,7 @@
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -42,15 +42,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('companies', 'bills', 'banks', 'compta'));
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
$facid = GETPOST('facid', 'int');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$facid = GETPOST('facid', 'int');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$accountid = GETPOST('accountid', 'int');
|
||||
$day = GETPOST('day', 'int');
|
||||
$month = GETPOST('month', 'int');
|
||||
$month = GETPOST('month', 'int');
|
||||
$year = GETPOST('year', 'int');
|
||||
|
||||
$search_ref = GETPOST("search_ref", "alpha");
|
||||
@ -562,15 +562,19 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<td>'.$langs->trans('RefSupplier').'</td>';
|
||||
print '<td class="center">'.$langs->trans('Date').'</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)) print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
print '<td>'.$langs->trans('Currency').'</td>';
|
||||
print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</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('AlreadyPaid').'</td>';
|
||||
print '<td class="right">'.$langs->trans('RemainderToPay').'</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>';
|
||||
|
||||
$total = 0;
|
||||
@ -596,8 +600,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
$remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT');
|
||||
|
||||
// Multicurrency Price
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
{
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
$multicurrency_payment = $invoice->getSommePaiement(1);
|
||||
$multicurrency_creditnotes = $invoice->getSumCreditNotesUsed(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>';
|
||||
|
||||
// Date
|
||||
if ($objp->df > 0)
|
||||
{
|
||||
if ($objp->df > 0) {
|
||||
print '<td class="center nowraponall">';
|
||||
print dol_print_date($db->jdate($objp->df), 'day').'</td>';
|
||||
} else {
|
||||
@ -728,15 +730,16 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
$totalrecudeposits += $deposits;
|
||||
$i++;
|
||||
}
|
||||
if ($i > 1)
|
||||
{
|
||||
if ($i > 1) {
|
||||
// Print total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="4" class="left">'.$langs->trans('TotalTTC').':</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
print '<td> </td>';
|
||||
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 * $totalrecu);
|
||||
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
||||
@ -744,7 +747,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '</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
|
||||
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 "</table>\n";
|
||||
@ -785,7 +790,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
} else dol_print_error($db);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
// End of page
|
||||
|
||||
Loading…
Reference in New Issue
Block a user