[0000159] Memo field's GL entries are not saved (gl_trans) in supplier invoice
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 12 Aug 2009 21:52:36 +0000 (21:52 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 12 Aug 2009 21:52:36 +0000 (21:52 +0000)
CHANGELOG.txt
purchasing/includes/db/invoice_db.inc
purchasing/includes/purchasing_db.inc

index a92c26921a178ffda494ee70f6343ef7db7076b1..ed777e5a09a74ca3a857f537a6e66a09584a9b59 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+12-Aug-2009 Joe Hunt
+# [0000159] Memo field's GL entries are not saved (gl_trans) in supplier invoice
+$ /purchasing/includes/purchasing_db.inc
+  /purchasing/includes/db/invoice_db.inc
+  
 08-Aug-2009 Janusz Dobrowolski
 # Fixed bug in calculation of taxes for quick entries using multiply tax rates
 $ /includes/ui/ui_view.inc
index c5c63c8efd66f7813d160e437f625649dc330b9b..adc6245dc3305ca8e5e4e6ce08063351e555c9d1 100644 (file)
@@ -182,7 +182,7 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b
 
                $memo_ = $entered_gl_code->memo_;
                $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $entered_gl_code->gl_code,
-                       $entered_gl_code->gl_dim, $entered_gl_code->gl_dim2, $entered_gl_code->amount, $supp_trans->supplier_id);
+                       $entered_gl_code->gl_dim, $entered_gl_code->gl_dim2, $entered_gl_code->amount, $supp_trans->supplier_id, "", 0, $memo_);
 
                add_supp_invoice_gl_item($trans_type, $invoice_id, $entered_gl_code->gl_code,
                        $entered_gl_code->amount, $memo_);
index 850d22910f8821a4c87c851f96cbfb7fb55c7aa1..dc9ceccd20293ae65ef70634d37428d1daf61ee3 100644 (file)
@@ -32,12 +32,12 @@ include_once($path_to_root . "/purchasing/includes/db/suppliers_db.inc");
 // $amount is in SUPPLIERS'S currency
 
 function add_gl_trans_supplier($type, $type_no, $date_, $account, $dimension, $dimension2,  
-       $amount, $supplier_id, $err_msg="", $rate=0)
+       $amount, $supplier_id, $err_msg="", $rate=0, $memo="")
 {
        if ($err_msg == "")
                $err_msg = "The supplier GL transaction could not be inserted"; 
                
-       return add_gl_trans($type, $type_no, $date_, $account, $dimension, $dimension2, ""
+       return add_gl_trans($type, $type_no, $date_, $account, $dimension, $dimension2, $memo
                $amount, get_supplier_currency($supplier_id), 
                payment_person_types::supplier(), $supplier_id, $err_msg, $rate);
 }