diff --git a/application/controllers/Items.php b/application/controllers/Items.php index c2fafb31d..88fff02d2 100644 --- a/application/controllers/Items.php +++ b/application/controllers/Items.php @@ -473,15 +473,15 @@ class Items extends Secure_area implements iData_controller $item_data = array(); foreach($_POST as $key=>$value) - { + { //This field is nullable, so treat it differently - if ($key == 'supplier_id') - { - $item_data["$key"]=$value == '' ? null : $value; + if ($key == 'supplier_id' and $value != '') + { + $item_data["$key"] = $value; } - elseif($value!='' and !(in_array($key, array('submit', 'item_ids', 'tax_names', 'tax_percents', 'category')))) + elseif($value != '' and !(in_array($key, array('item_ids', 'tax_names', 'tax_percents')))) { - $item_data["$key"]=$value; + $item_data["$key"] = $value; } } diff --git a/application/views/items/form_bulk.php b/application/views/items/form_bulk.php index 92b0c9821..0d5e4e1c8 100644 --- a/application/views/items/form_bulk.php +++ b/application/views/items/form_bulk.php @@ -157,26 +157,21 @@ $(document).ready(function() $('#item_form').validate($.extend({ submitHandler:function(form) { - if(confirm("lang->line('items_confirm_bulk_edit') ?>")) + //Get the selected ids and create hidden fields to send with ajax submit. + var selected_item_ids=get_selected_values(); + for(k=0;k