When booking costs on workorders the set dimension on the item wasn't booked on the...
authorJoe <joe.hunt.consulting@gmail.com>
Mon, 5 Dec 2022 09:30:05 +0000 (10:30 +0100)
committerJoe <joe.hunt.consulting@gmail.com>
Mon, 5 Dec 2022 09:30:05 +0000 (10:30 +0100)
manufacturing/includes/db/work_order_costing_db.inc

index 91cc1533566bce8837726923a043d1d521dc2596..5aab70e9eda3c37bd2dbe8ddce735b3f0f67af49 100644 (file)
@@ -128,7 +128,7 @@ function add_wo_costs_journal($wo_id, $amount, $cost_type, $cr_acc, $date, $dim1
     if (!$ref) $ref = $Refs->get_next(ST_JOURNAL, null, $date);
 
        add_gl_trans_std_cost(ST_JOURNAL, $journal_id, $date, $cr_acc,
-               0, 0, $wo_cost_types[$cost_type], -$amount);
+               $dim1, $dim2, $wo_cost_types[$cost_type], -$amount);
 
        $is_bank_to = is_bank_account($cr_acc);
        if ($is_bank_to)