update issuse

This commit is contained in:
Aung Myo
2018-06-27 10:29:23 +06:30
parent 0169a62430
commit 95f4125b53
6 changed files with 10 additions and 8 deletions

View File

@@ -69,7 +69,8 @@ class SalePayment < ApplicationRecord
sale_audit = SaleAudit.record_payment(invoice.id, remark, action_by)
# update complete order items in oqs
SaleOrder.where("sale_id = '#{ invoice.sale_id }'").find_each do |sodr|
booking = Booking.find_by_sale_id(sale_id)
booking.booking_orders.each do |sodr|
AssignedOrderItem.where("order_id = '#{ sodr.order_id }'").find_each do |aoi|
aoi.delivery_status = 1
aoi.save