diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 8ee2279fc2c..93efaec6548 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -301,7 +301,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) { diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 950f43a3c71..aa72cdf25c6 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1387,7 +1387,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); } }