iit-ideashop / IPRO_manager

IPRO manager app repository running laravel 5.5
GNU Affero General Public License v3.0
0 stars 1 forks source link

Updated status field #20

Closed jamierobles closed 5 years ago

jamierobles commented 5 years ago

Status field is not changing from 'Requested" to reflect current new status when order status is changed

pkarnia commented 5 years ago

On this page specifically: https://ipromanager.ideashop.iit.edu/admin/orders

TellowKrinkle commented 5 years ago

It looks like this is caused by the database having separate statuses for orders and items. At the moment, the order's status is automatically advanced to "ordered" when at least one item is ordered, "Ready for pickup" when at least item is delivered, and "completed" when all items have been picked up or canceled. The status will not go back to requested even if all ordered items are set off of ordered.

How would you like this system changed?

Reminder for future me (or anyone who deals with this later): https://github.com/iit-ideashop/IPRO_manager/blob/8ff708de5821c971bc56e942449d34780a3f273f/app/Models/Order.php#L87-L130

TellowKrinkle commented 5 years ago

New logic is as follows: