From 6411ea4cfc7ca0225c0f761145cf0d2f1ae39b2f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 Apr 2025 02:15:11 +0200 Subject: [PATCH 1/2] Doc --- htdocs/accountancy/class/bookkeeping.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 6717c0d03a0..c0cb6b6d8b1 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -291,7 +291,7 @@ class BookKeeping extends CommonObject $this->credit = 0.0; } - $result = $this->validBookkeepingDate($this->doc_date); + $result = $this->validBookkeepingDate($this->doc_date); // Check date according to ACCOUNTANCY_FISCAL_PERIOD_MODE. if ($result < 0) { return -1; } elseif ($result == 0) { From f1ff22a5167689580cd8ea375a31c28bcd91dd9d Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Fri, 25 Apr 2025 14:35:18 +0200 Subject: [PATCH 2/2] FIX creating acredit note from the remain to pay was always 0 --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 61e5caf6fd4..16d4ebc23e3 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1367,7 +1367,7 @@ if (empty($reshook)) { $tva_tx = 0; } - $object->addline($langs->trans('invoiceAvoirLineWithPaymentRestAmount'), $remain_to_pay, 1, $tva_tx, 0, 0, 0, 0, '', '', 0, 0, 0, 'TTC'); + $object->addline($langs->trans('invoiceAvoirLineWithPaymentRestAmount'), 0, 1, $tva_tx, 0, 0, 0, 0, '', '', 0, 0, 0, 'TTC', $remain_to_pay); } }