Fixing tax_included in gl_items.
[fa-stable.git] / purchasing / includes / db / invoice_db.inc
index 308c2c25440ef5129b88262448d32ac910d024bd..48e33987503ab0704e3058224cb8516a0cdd0ec3 100644 (file)
@@ -157,7 +157,7 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b
     /*First insert the invoice into the supp_trans table*/
        $invoice_id = add_supp_trans($trans_type, $supp_trans->supplier_id, $date_, $supp_trans->due_date,
                $supp_trans->reference, $supp_trans->supp_reference,
-               $invoice_items_total, $item_added_tax, $supp_trans->ov_discount);
+               $invoice_items_total, $item_added_tax, $supp_trans->ov_discount, "", 0, $supp_trans->tax_included);
 
        $total = 0;
     /* Now the control account */
@@ -188,7 +188,7 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b
                        $entered_gl_code->amount = -$entered_gl_code->amount;
                add_gl_tax_details($entered_gl_code->gl_code, 
                        $trans_type, $invoice_id, $entered_gl_code->amount,
-                       $ex_rate, $date_, $supp_trans->supp_reference);
+                       $ex_rate, $date_, $supp_trans->supp_reference, $supp_trans->tax_included);
     }
     foreach ($supp_trans->grn_items as $line_no => $entered_grn)
     {