- begin_transaction();
- add_gl_trans_std_cost(ST_WORKORDER, $_POST['selected_id'], $_POST['date_'], $_POST['cr_acc'],
- 0, 0, $date.": ".$wo_cost_types[$_POST['PaymentType']], -input_num('costs'), PT_WORKORDER, $_POST['PaymentType']);
- $is_bank_to = is_bank_account($_POST['cr_acc']);
- if ($is_bank_to)
- {
- add_bank_trans(ST_WORKORDER, $_POST['selected_id'], $is_bank_to, "",
- $_POST['date_'], -input_num('costs'), PT_WORKORDER, $_POST['PaymentType'], get_company_currency(),
- "Cannot insert a destination bank transaction");
- }