Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4785884457
@ -526,7 +526,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
*/
|
||||
|
||||
$sql = 'SELECT f.rowid as facid, f.facnumber, f.total_ttc, f.multicurrency_code, f.multicurrency_total_ttc, f.type,';
|
||||
$sql.= ' f.datef as df, f.fk_soc as socid';
|
||||
$sql.= ' f.datef as df, f.fk_soc as socid, f.date_lim_reglement as dlr';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
|
||||
$sql.= ' WHERE f.entity IN ('.getEntity('facture', $conf->entity).')';
|
||||
$sql.= ' AND (f.fk_soc = '.$facture->socid;
|
||||
@ -578,6 +578,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$arraytitle.'</td>';
|
||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td align="center">'.$langs->trans('DateMaxPayment').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td>'.$langs->trans('Currency').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$multicurrencyalreadypayedlabel.'</td>';
|
||||
@ -629,7 +630,25 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
// Date
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->df),'day')."</td>\n";
|
||||
|
||||
|
||||
// Date Max Payment
|
||||
if ($objp->dlr > 0 )
|
||||
{
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($objp->dlr), 'day');
|
||||
|
||||
if ($invoice->hasDelay())
|
||||
{
|
||||
print img_warning($langs->trans('Late'));
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><b>--</b></td>';
|
||||
}
|
||||
|
||||
// Currency
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="center">'.$objp->multicurrency_code."</td>\n";
|
||||
|
||||
|
||||
@ -714,10 +714,9 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param Object $object Object order
|
||||
* @param int $posy Position y in PDF
|
||||
@ -726,11 +725,8 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
*/
|
||||
private function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@ -742,7 +738,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
*/
|
||||
private function drawInfoTable(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@ -918,7 +913,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
|
||||
/** phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
@ -930,7 +925,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
*/
|
||||
private function drawTotalTable(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@ -849,7 +849,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
}
|
||||
|
||||
|
||||
/** phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
* @param PDF $pdf Object PDF
|
||||
@ -860,7 +860,6 @@ class pdf_sponge extends ModelePDFFactures
|
||||
*/
|
||||
function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$sign=1;
|
||||
@ -989,7 +988,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
}
|
||||
|
||||
|
||||
/** phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
* @param PDF $pdf Object PDF
|
||||
@ -1000,7 +999,6 @@ class pdf_sponge extends ModelePDFFactures
|
||||
*/
|
||||
private function drawInfoTable(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
@ -1147,7 +1145,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
}
|
||||
|
||||
|
||||
/** phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
* @param PDF $pdf Object PDF
|
||||
@ -1159,7 +1157,6 @@ class pdf_sponge extends ModelePDFFactures
|
||||
*/
|
||||
private function drawTotalTable(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
|
||||
$sign=1;
|
||||
@ -1828,9 +1825,6 @@ class pdf_sponge extends ModelePDFFactures
|
||||
return pdf_pagefoot($pdf,$outputlangs,'INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Define Array Column Field
|
||||
*
|
||||
|
||||
@ -875,7 +875,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
}
|
||||
}
|
||||
|
||||
/** phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
@ -886,11 +886,9 @@ class pdf_cyan extends ModelePDFPropales
|
||||
*/
|
||||
private function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
}
|
||||
|
||||
|
||||
/** phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
@ -901,7 +899,6 @@ class pdf_cyan extends ModelePDFPropales
|
||||
*/
|
||||
function drawInfoTable(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
|
||||
@ -473,14 +473,14 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
* Autres factures impayees
|
||||
*/
|
||||
$sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.multicurrency_total_ttc, f.datef as df,';
|
||||
$sql.= ' SUM(pf.amount) as am, SUM(pf.multicurrency_amount) as multicurrency_am';
|
||||
$sql.= ' SUM(pf.amount) as am, SUM(pf.multicurrency_amount) as multicurrency_am, f.date_lim_reglement as dlr';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
$sql.= ' AND f.fk_soc = '.$object->socid;
|
||||
$sql.= ' AND f.paye = 0';
|
||||
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee
|
||||
$sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.multicurrency_total_ttc, f.datef';
|
||||
$sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.multicurrency_total_ttc, f.datef, f.date_lim_reglement';
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -511,6 +511,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<td>'.$langs->trans('Invoice').'</td>';
|
||||
print '<td>'.$langs->trans('RefSupplier').'</td>';
|
||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td align="center">'.$langs->trans('DateMaxPayment').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td>'.$langs->trans('Currency').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>';
|
||||
@ -569,7 +570,25 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
{
|
||||
print '<td align="center"><b>!!!</b></td>';
|
||||
}
|
||||
|
||||
|
||||
// Date Max Payment
|
||||
if ($objp->dlr > 0 )
|
||||
{
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($objp->dlr), 'day');
|
||||
|
||||
if ($invoice->hasDelay())
|
||||
{
|
||||
print img_warning($langs->trans('Late'));
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><b>--</b></td>';
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
{
|
||||
@ -661,7 +680,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
{
|
||||
// Print total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="3" align="left">'.$langs->trans('TotalTTC').':</td>';
|
||||
print '<td colspan="4" align="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>';
|
||||
|
||||
@ -4863,4 +4863,4 @@ class Product extends CommonObject
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user