add order item and order summary slim pdf
This commit is contained in:
@@ -198,7 +198,7 @@ class SalePayment < ApplicationRecord
|
||||
self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f
|
||||
self.payment_status = "paid"
|
||||
payment_method = self.save!
|
||||
sale_update_payment_status(self.received_amount)
|
||||
sale_update_payment_status(self.received_amount,1)
|
||||
|
||||
return payment_status
|
||||
end
|
||||
@@ -290,7 +290,7 @@ class SalePayment < ApplicationRecord
|
||||
|
||||
end
|
||||
|
||||
def sale_update_payment_status(paid_amount)
|
||||
def sale_update_payment_status(paid_amount,check_foc = 0)
|
||||
#update amount_outstanding
|
||||
self.sale.amount_received = self.sale.amount_received.to_f + paid_amount.to_f
|
||||
self.sale.save!
|
||||
@@ -350,9 +350,9 @@ class SalePayment < ApplicationRecord
|
||||
self.sale.save!
|
||||
table_update_status(sObj)
|
||||
|
||||
# if paid_amount != "0.0"
|
||||
if paid_amount != "0.0" || check_foc > 0
|
||||
update_shift
|
||||
# end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user