From 4262d666cab9708e1c45588ceebb3ac2074fcfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?This=20Charl=C3=A8ne?= <1179011+defrance@users.noreply.github.com> Date: Mon, 5 Sep 2022 16:15:13 +0200 Subject: [PATCH] PHP V8 warning and $objectidnext = $object->getIdReplacingInvoice(); not present --- htdocs/fourn/facture/card.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index c2fc4e8511a..b928cc5bdf9 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2642,6 +2642,8 @@ if ($action == 'create') { /* * View card */ + $objectidnext = $object->getIdReplacingInvoice(); + $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); @@ -2934,7 +2936,7 @@ if ($action == 'create') { } print ' ('.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits) . ')'; } - if (isset($facidnext) && $facidnext > 0) { + if (isset($objectidnext) && $objectidnext > 0) { $facthatreplace = new FactureFournisseur($db); $facthatreplace->fetch($facidnext); print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; @@ -3266,7 +3268,7 @@ if ($action == 'create') { } $sql = 'SELECT p.datep as dp, p.ref, p.num_paiement as num_payment, p.rowid, p.fk_bank,'; - $sql .= ' c.id as paiement_type,'; + $sql .= ' c.id as paiement_type, c.code as payment_code,'; $sql .= ' pf.amount,'; $sql .= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as p'; @@ -3303,7 +3305,7 @@ if ($action == 'create') { $paymentstatic->datepaye = $db->jdate($objp->dp); $paymentstatic->ref = ($objp->ref ? $objp->ref : $objp->rowid); $paymentstatic->num_payment = $objp->num_payment; - $paymentstatic->payment_code = $objp->payment_code; + $paymentstatic->paiementcode = $objp->payment_code; print '