shift sale

This commit is contained in:
Nweni
2017-07-01 09:46:14 +06:30
parent 18094f5a71
commit c589f11758
6 changed files with 29 additions and 17 deletions

View File

@@ -266,6 +266,8 @@ class SalePayment < ApplicationRecord
shift = ShiftSale.current_open_shift(self.sale.cashier_id)
if !shift.nil?
shift.update(self.sale)
self.sale.shift_sale_id = shift.id
self.sale.save
end
end
@@ -324,7 +326,7 @@ class SalePayment < ApplicationRecord
}, :timeout => 10)
rescue Net::OpenTimeout
response = { status: false }
rescue OpenURI::HTTPError
response = { status: false}