[0005220] Delivery Against Sales Order: bug in GL balance for prepaid order delivery...
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 24 Sep 2020 18:44:57 +0000 (20:44 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 24 Sep 2020 18:44:57 +0000 (20:44 +0200)
sales/includes/db/sales_delivery_db.inc

index 3a000103adb4d253361dc2354b79f34e8c737d24..9f0ecbca9c11675234348171c88d3e9a336b5d6b 100644 (file)
@@ -173,8 +173,9 @@ function write_sales_delivery(&$delivery,$bo_policy)
        if ($delivery->is_prepaid())
        {
                $deferred_act = get_company_pref('deferred_income_act');
-               add_gl_trans_customer(ST_CUSTDELIVERY, $delivery_no, $delivery->document_date, $deferred_act, 0, 0,
-                       -$total, $delivery->customer_id, "The deferred income GL posting could not be inserted");
+               add_gl_trans(ST_CUSTDELIVERY, $delivery_no, $delivery->document_date, $deferred_act, 0, 0, 
+                       "The deferred income GL posting could not be inserted",
+                       -$total, null, PT_CUSTOMER, $delivery->customer_id);
        }
 
        if ($bo_policy == 0) {