X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Fsales_kits.php;h=1ccc53162aaff818e9a1751c46ac7db93e7fde2d;hb=0d191c7bff92b9a9bbc44dab48855477edb99ebf;hp=30fcc48aff0cec88467782ab7e9f86cefc388765;hpb=d2cc0860eccf02eaefcd90731ac3af141a841529;p=fa-stable.git
diff --git a/inventory/manage/sales_kits.php b/inventory/manage/sales_kits.php
index 30fcc48a..1ccc5316 100644
--- a/inventory/manage/sales_kits.php
+++ b/inventory/manage/sales_kits.php
@@ -34,11 +34,9 @@ if (isset($_GET['item_code']))
//--------------------------------------------------------------------------------------------------
function display_kit_items($selected_kit)
{
- global $table_style;
-
$result = get_item_kit($selected_kit);
-div_start('bom');
- start_table("$table_style width=60%");
+ div_start('bom');
+ start_table(TABLESTYLE, "width=60%");
$th = array(_("Stock Item"), _("Description"), _("Quantity"), _("Units"),
'','');
table_header($th);
@@ -183,7 +181,7 @@ if ($Mode == 'RESET')
start_form();
echo "
" . _("Select a sale kit:") . " ";
-sales_kits_list('item_code', null, _('New kit'), true);
+echo sales_kits_list('item_code', null, _('New kit'), true);
echo "
";
$props = get_kit_props($_POST['item_code']);
@@ -197,13 +195,14 @@ $selected_kit = $_POST['item_code'];
//----------------------------------------------------------------------------------
if (get_post('item_code') == '') {
// New sales kit entry
- start_table($table_style2);
+ start_table(TABLESTYLE2);
text_row(_("Alias/kit code:"), 'kit_code', null, 20, 21);
} else
-{ // Kit selected so display bom or edit component
+{
+ // Kit selected so display bom or edit component
$_POST['description'] = $props['description'];
$_POST['category'] = $props['category_id'];
- start_table($table_style2);
+ start_table(TABLESTYLE2);
text_row(_("Description:"), 'description', null, 50, 200);
stock_categories_list_row(_("Category:"), 'category', null);
submit_row('update_name', _("Update"), false, 'align=center colspan=2', _('Update kit/alias name'), true);
@@ -211,7 +210,7 @@ if (get_post('item_code') == '') {
end_table(1);
display_kit_items($selected_kit);
echo '
';
- start_table($table_style2);
+ start_table(TABLESTYLE2);
}
if ($Mode == 'Edit') {
@@ -226,8 +225,10 @@ if (get_post('item_code') == '') {
// if (get_post('description') == '')
// $_POST['description'] = get_kit_name($_POST['component']);
if (get_post('item_code') == '') { // new kit/alias
- $_POST['description'] = $props['description'];
- $_POST['category'] = $props['category_id'];
+ if ($Mode!='ADD_ITEM' && $Mode!='UPDATE_ITEM') {
+ $_POST['description'] = $props['description'];
+ $_POST['category'] = $props['category_id'];
+ }
text_row(_("Description:"), 'description', null, 50, 200);
stock_categories_list_row(_("Category:"), 'category', null);
}
@@ -250,4 +251,3 @@ if (get_post('item_code') == '') {
end_page();
-?>