Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -221,7 +221,7 @@ class Api::OrdersController < Api::ApiController
|
|||||||
|
|
||||||
order_item = OrderItem.find(order_items_id)
|
order_item = OrderItem.find(order_items_id)
|
||||||
before_updated_qty = order_item.qty
|
before_updated_qty = order_item.qty
|
||||||
|
if qty_weight < order_item.qty.to_f
|
||||||
order_item.item_order_by = current_login_employee.name
|
order_item.item_order_by = current_login_employee.name
|
||||||
order_item.qty = qty_weight
|
order_item.qty = qty_weight
|
||||||
order_item.remark = remarks
|
order_item.remark = remarks
|
||||||
@@ -266,6 +266,9 @@ class Api::OrdersController < Api::ApiController
|
|||||||
end
|
end
|
||||||
|
|
||||||
return return_json_status_with_code(200, "updated successfully!")
|
return return_json_status_with_code(200, "updated successfully!")
|
||||||
|
else
|
||||||
|
return return_json_status_with_code(304, "Quantity is over!")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return return_json_status_with_code(406, "Checkout time is over!")
|
return return_json_status_with_code(406, "Checkout time is over!")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user