X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=inventory%2Fmanage%2Fsales_kits.php;h=750d059e6c5fd4c7b6ba905e03633893c44e35ef;hb=9a6be31598b20ab95541e4c89db43ff56a105cc2;hp=2e73d219cdf9b4691f5de8093541b6f9ea1af2d3;hpb=6575a94814ea66506cc2637908c3419995302a3e;p=fa-stable.git diff --git a/inventory/manage/sales_kits.php b/inventory/manage/sales_kits.php index 2e73d219..750d059e 100644 --- a/inventory/manage/sales_kits.php +++ b/inventory/manage/sales_kits.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 11; $path_to_root="../.."; include_once($path_to_root . "/includes/session.inc"); @@ -46,7 +55,7 @@ div_start('bom'); $myrow["units"] == '' ? 0 : get_qty_dec($myrow["comp_name"])); label_cell($myrow["units"] == '' ? _('kit') : $myrow["units"]); edit_button_cell("Edit".$myrow['id'], _("Edit")); - edit_button_cell("Delete".$myrow['id'], _("Delete")); + delete_button_cell("Delete".$myrow['id'], _("Delete")); end_row(); } //END WHILE LIST LOOP @@ -75,7 +84,7 @@ function update_component($kit_code, $selected_item) elseif ($selected_item == -1) // adding new item or new alias/kit { if (get_post('item_code') == '') { // New kit/alias definition - $kit = get_item_kit($_POST['item_code']); + $kit = get_item_kit($_POST['kit_code']); if (db_num_rows($kit)) { $input_error = 1; display_error( _("This item code is already assigned to stock item or sale kit.")); @@ -169,17 +178,16 @@ if ($Mode == 'RESET') unset($_POST['quantity']); unset($_POST['component']); } - //-------------------------------------------------------------------------------------------------- -start_form(false, true); +start_form(); echo "
" . _("Select a sale kit:") . " "; sales_kits_list('item_code', null, _('New kit'), true); echo "

"; $props = get_kit_props($_POST['item_code']); -if (isset($_POST['_item_code_update'])) { +if (list_updated('item_code')) { if (get_post('item_code') == '') $_POST['description'] = ''; $Ajax->activate('_page_body'); @@ -236,7 +244,7 @@ if (get_post('item_code') == '') { qty_row(_("Quantity:"), 'quantity', number_format2(1, $dec), '', $units, $dec); end_table(1); - submit_add_or_update_center($selected_id == -1, '', true); + submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); //----------------------------------------------------------------------------------