X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fwork_order_entry.php;h=a1280391c4b4438d1f2a8d139a76a3272137faed;hb=b0c4c9777f9574e9c2805fddc2a12576d75d94ce;hp=b9cfcba0442e653e9ca6ae5bf7c700cd939ffd73;hpb=1b9351ae81a67726e757eba55895a4f059c7f128;p=fa-stable.git diff --git a/manufacturing/work_order_entry.php b/manufacturing/work_order_entry.php index b9cfcba0..a1280391 100644 --- a/manufacturing/work_order_entry.php +++ b/manufacturing/work_order_entry.php @@ -424,24 +424,23 @@ else date_row(_("Date") . ":", 'date_', '', true); hidden('RequDate', ''); - $sql = "SELECT DISTINCT account_code FROM ".TB_PREF."bank_accounts"; - $rs = db_query($sql,"could not get bank accounts"); - $r = db_fetch_row($rs); + $bank_act = get_default_bank_account(); if (!isset($_POST['Labour'])) { $_POST['Labour'] = price_format(0); - $_POST['cr_lab_acc'] = $r[0]; + $_POST['cr_lab_acc'] = $bank_act['account_code']; } + amount_row($wo_cost_types[WO_LABOUR], 'Labour'); gl_all_accounts_list_row(_("Credit Labour Account"), 'cr_lab_acc', null); if (!isset($_POST['Costs'])) { $_POST['Costs'] = price_format(0); - $_POST['cr_acc'] = $r[0]; + $_POST['cr_acc'] = $bank_act['account_code']; } amount_row($wo_cost_types[WO_OVERHEAD], 'Costs'); gl_all_accounts_list_row(_("Credit Overhead Account"), 'cr_acc', null); - + } if (get_post('released')) @@ -472,4 +471,3 @@ else end_form(); end_page(); -?> \ No newline at end of file