X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fmanage%2Fbom_edit.php;h=d06b84d321a6f525bfb6e6d1c0ed5f4355ec1c66;hb=ff164518757006525f9475ce01d501b023bc40be;hp=03af80598801080679046e81d859e988ee495f77;hpb=ddfd301aaab1897a4440fc3d779d23766bf7ce5c;p=fa-stable.git diff --git a/manufacturing/manage/bom_edit.php b/manufacturing/manage/bom_edit.php index 03af8059..d06b84d3 100644 --- a/manufacturing/manage/bom_edit.php +++ b/manufacturing/manage/bom_edit.php @@ -86,7 +86,7 @@ function display_bom_items($selected_parent) global $table_style; $result = get_bom($selected_parent); - +div_start('bom'); start_table("$table_style width=60%"); $th = array(_("Code"), _("Description"), _("Location"), _("Work Centre"), _("Quantity"), _("Units"),'',''); @@ -102,7 +102,7 @@ function display_bom_items($selected_parent) label_cell($myrow["description"]); label_cell($myrow["location_name"]); label_cell($myrow["WorkCentreDescription"]); - label_cell(qty_format($myrow["quantity"])); + qty_cell($myrow["quantity"], false, get_qty_dec($myrow["component"])); label_cell($myrow["units"]); edit_link_cell(SID . "NewItem=$selected_parent&selected_component=" . $myrow["id"]); delete_link_cell(SID . "delete=" . $myrow["id"]. "&stock_id=" . $_POST['stock_id']); @@ -110,6 +110,7 @@ function display_bom_items($selected_parent) } //END WHILE LIST LOOP end_table(); +div_end(); } //-------------------------------------------------------------------------------------------------- @@ -204,6 +205,8 @@ echo ""; end_form(); +if (isset($_POST['_stock_id_update'])) + $Ajax->activate('bom'); //-------------------------------------------------------------------------------------------------- if (isset($_POST['stock_id'])) @@ -242,7 +245,7 @@ if (isset($_POST['stock_id'])) $_POST['loc_code'] = $myrow["loc_code"]; $_POST['workcentre_added'] = $myrow["workcentre_added"]; - $_POST['quantity'] = qty_format($myrow["quantity"]); + $_POST['quantity'] = number_format2($myrow["quantity"], get_qty_dec($myrow["component"])); hidden('selected_parent', $selected_parent); hidden('selected_component', $selected_component); @@ -258,19 +261,19 @@ if (isset($_POST['stock_id'])) label_cell(_("Component:")); echo ""; - stock_component_items_list('component', $selected_parent, $_POST['component'], false, true); + stock_component_items_list('component', $selected_parent, null, false, true); echo ""; end_row(); } locations_list_row(_("Location to Draw From:"), 'loc_code', null); workcenter_list_row(_("Work Centre Added:"), 'workcentre_added', null); - + $dec = get_qty_dec($_POST['component']); if (!isset($_POST['quantity'])) { - $_POST['quantity'] = qty_format(1); + $_POST['quantity'] = number_format2(1, $dec); } - qty_row(_("Quantity:"), 'quantity', $_POST['quantity']); + qty_row(_("Quantity:"), 'quantity', $_POST['quantity'], null, null, $dec); end_table(1); submit_center('Submit', _("Add/Update"));