projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Two smaller fixes in security_area codes.
[fa-stable.git]
/
inventory
/
manage
/
sales_kits.php
diff --git
a/inventory/manage/sales_kits.php
b/inventory/manage/sales_kits.php
index 6040fcd81295a642353fbd0c9f8acad23faf2134..16a78f87bc2fde77d9a04353b7a6c7cfbc284a57 100644
(file)
--- a/
inventory/manage/sales_kits.php
+++ b/
inventory/manage/sales_kits.php
@@
-9,11
+9,11
@@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$page_security =
11
;
-$path_to_root
=
"../..";
+$page_security =
'SA_SALESKIT'
;
+$path_to_root
=
"../..";
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/session.inc");
-page(_("Sales Kits & Alias Codes"));
+page(_(
$help_context =
"Sales Kits & Alias Codes"));
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/ui.inc");
@@
-84,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
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."));
if (db_num_rows($kit)) {
$input_error = 1;
display_error( _("This item code is already assigned to stock item or sale kit."));
@@
-178,17
+178,16
@@
if ($Mode == 'RESET')
unset($_POST['quantity']);
unset($_POST['component']);
}
unset($_POST['quantity']);
unset($_POST['component']);
}
-
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
-start_form(
false, true
);
+start_form();
echo "<center>" . _("Select a sale kit:") . " ";
echo "<center>" . _("Select a sale kit:") . " ";
-sales_kits_list('item_code', null, _('New kit'), true);
+
echo
sales_kits_list('item_code', null, _('New kit'), true);
echo "</center><br>";
$props = get_kit_props($_POST['item_code']);
echo "</center><br>";
$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');
if (get_post('item_code') == '')
$_POST['description'] = '';
$Ajax->activate('_page_body');
@@
-201,7
+200,8
@@
if (get_post('item_code') == '') {
start_table($table_style2);
text_row(_("Alias/kit code:"), 'kit_code', null, 20, 21);
} else
start_table($table_style2);
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);
$_POST['description'] = $props['description'];
$_POST['category'] = $props['category_id'];
start_table($table_style2);
@@
-227,8
+227,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
// 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);
}
text_row(_("Description:"), 'description', null, 50, 200);
stock_categories_list_row(_("Category:"), 'category', null);
}
@@
-245,7
+247,7
@@
if (get_post('item_code') == '') {
qty_row(_("Quantity:"), 'quantity', number_format2(1, $dec), '', $units, $dec);
end_table(1);
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();
//----------------------------------------------------------------------------------
end_form();
//----------------------------------------------------------------------------------