From: Joe Hunt Date: Mon, 11 Jan 2021 07:48:30 +0000 (+0100) Subject: Bug 5310: DB error when on supplier invoice edit if current fiscal year is missing... X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=3613a792cb0229eadb2d64a18671a890b6189d0f Bug 5310: DB error when on supplier invoice edit if current fiscal year is missing. Fixed. --- diff --git a/purchasing/includes/db/invoice_db.inc b/purchasing/includes/db/invoice_db.inc index 5085b57d..567d6b90 100644 --- a/purchasing/includes/db/invoice_db.inc +++ b/purchasing/includes/db/invoice_db.inc @@ -144,7 +144,7 @@ function add_supp_invoice(&$supp_trans) $taxes = $supp_trans->get_taxes($supp_trans->tax_group_id); if ($trans_no) { $allocs = get_payments_for($trans_no, $trans_type, $supp_trans->supplier_id); // save allocations - void_transaction($trans_type, $trans_no, Today(), _("Document reentered.")); + void_transaction($trans_type, $trans_no, $supp_trans->tran_date, _("Document reentered.")); $Refs->restore_last($trans_type, $trans_no); } else $allocs = get_po_prepayments($supp_trans);