-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[Bug]: Item_id integer validation faild on sales item add #4188
Description
Bug Description?
Steps to Reproduce?
In sales Find or Scan Item search box, type some string and hit enter.
Expected Behavior?
In sales controller postAdd function can be an integer validation rules like bellow
$rules = [ 'item' => 'trim|required|integer' ];
if($this->validate($rules)) { if($item_id_or_number_or_item_kit_or_receipt == '' || !$this->sale_lib->add_item($item_id_or_number_or_item_kit_or_receipt, $item_location, $quantity, $discount, $discount_type, PRICE_MODE_STANDARD, null, null, $price)) { $data['error'] = lang('Sales.unable_to_add_item'); } else { $data['warning'] = $this->sale_lib->out_of_stock($item_id_or_number_or_item_kit_or_receipt, $item_location); } } else { $data['error'] = lang('Sales.unable_to_add_item'); }
OpensourcePOS Version
development (unreleased)
Php version
Php 8.3
What browsers are you seeing the problem on?
Firefox
Server Operating System and version
Wamp Server
Database Management System and version
MySQL 9.1.0
Web Server and version
Apache 2.4.62
System Information Report (optional)
System Information Report
Unmodified copy of OpensourcePOS
- I agree this copy has not been modified
