amirsanni / Mini-Inventory-and-Sales-Management-System

An Inventory and Sales Management System written in PHP (codeIgniter) with support for MySQL and Sqlite3 databases
https://1410inc.xyz/mini-inventory-and-sales-management-system/
MIT License
488 stars 268 forks source link

The available quantity is always 0 for users of type 'basic', even though the quantity is not 0 in admin. #94

Open asok44 opened 1 year ago

asok44 commented 1 year ago

inbentory

RBReif commented 1 year ago

same problem here. Haven't found the cause yet.

turboenator commented 1 month ago

Demo website is same problem too, @amirsanni

turboenator commented 1 month ago

I may have found the cause, it's the superOnly() function in libraries/Genlib.php that prevents access if the user is not logged in or the role is not "Super" for Items. If you want "available quantity" to work with "Basic" type users, you can temporarily disable the code: $this->genlib->superOnly(); by adding // before //$this->genlib->superOnly(); in controllers/Items.php (around line 18) And find another way to prevent access if user is not logged in or role is not "Super" can Add New Item