Fixed bug in adding wo costs journal
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 12 Dec 2015 09:33:18 +0000 (10:33 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 12 Dec 2015 09:33:18 +0000 (10:33 +0100)
manufacturing/includes/db/work_order_costing_db.inc

index 931b4c26b107c7dbb0424efcdafe36fdd6a75af5..6ad3a3c9f319a3513216d30eaf422f6c73e82865 100644 (file)
@@ -292,8 +292,8 @@ function add_wo_costs_journal($wo_id, $amount, $cost_type, $cr_acc, $db_acc, $da
                add_bank_trans(ST_JOURNAL, $journal_id, $is_bank_to, "",
                        $date, -$amount, PT_WORKORDER, $wo_id, get_company_currency(),
                        "Cannot insert a destination bank transaction");
-       } else
-               add_journal(ST_JOURNAL, $journal_id, $amount, $date, get_company_currency(), $ref);
+       } 
+       add_journal(ST_JOURNAL, $journal_id, $amount, $date, get_company_currency(), $ref);
 
        add_gl_trans_std_cost(ST_JOURNAL, $journal_id, $date, $db_acc,
                $dim1, $dim2,  $wo_cost_types[$cost_type], $amount);