Fix strict mode
This commit is contained in:
parent
75b909ce93
commit
3ea7a1fcab
@ -2159,7 +2159,7 @@ else
|
|||||||
// Make payments
|
// Make payments
|
||||||
if ($action != 'edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
if ($action != 'edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="paiement.php?facid='.$object->id.'&action=create &accountid='.$object->fk_account.'">'.$langs->trans('DoPayment').'</a>'; // must use facid because id is for payment id not invoice
|
print '<a class="butAction" href="paiement.php?facid='.$object->id.'&action=create'.($object->fk_account>0?'&accountid='.$object->fk_account:'').'">'.$langs->trans('DoPayment').'</a>'; // must use facid because id is for payment id not invoice
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classify paid
|
// Classify paid
|
||||||
|
|||||||
@ -386,15 +386,15 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
/*
|
/*
|
||||||
* Autres factures impayees
|
* 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 = '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';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
|
$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.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
|
||||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||||
$sql.= ' AND f.fk_soc = '.$object->socid;
|
$sql.= ' AND f.fk_soc = '.$object->socid;
|
||||||
$sql.= ' AND f.paye = 0';
|
$sql.= ' AND f.paye = 0';
|
||||||
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee
|
$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.datef';
|
$sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.multicurrency_total_ttc, f.datef';
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user