From 1c0614fee865fa7759d54cc10357c1ce18d5a0d4 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Tue, 16 Oct 2012 17:00:29 +0200 Subject: [PATCH] Cannot insert a supplier transaction record in Direct Supplier Invoice (certain MySql versions and setup). --- purchasing/po_entry_items.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/purchasing/po_entry_items.php b/purchasing/po_entry_items.php index 6e35437..f796833 100644 --- a/purchasing/po_entry_items.php +++ b/purchasing/po_entry_items.php @@ -457,7 +457,8 @@ function handle_commit_order() $inv->tax_included = $cart->tax_included; $supp = get_supplier($cart->supplier_id); $inv->tax_group_id = $supp['tax_group_id']; -// $inv->ov_discount 'this isn't used at all' + $inv->ov_discount = 0; // ov-discount set to zero to avoid DB error on insert + $inv->ov_amount = $inv->ov_gst = $inv->ov_discount = 0; foreach($cart->line_items as $key => $line) { -- 2.30.2