fixed inventory

This commit is contained in:
NyanLinHtut
2019-09-12 14:50:14 +06:30
parent 719d5637c2
commit e0b54728f7
7 changed files with 111 additions and 40 deletions

View File

@@ -180,7 +180,7 @@ class Origami::PaymentsController < BaseOrigamiController
else
sp.kbz_edit_sale_payment(sp.received_amount.to_f, current_user)
end
# end
if !path.include? ("credit_payment")
@@ -304,6 +304,12 @@ class Origami::PaymentsController < BaseOrigamiController
#end
end
logger.debug 'saleObj++++++++++++++++++++++++++'
logger.debug saleObj.to_json
if !saleObj.nil?
# InventoryJob.perform_now(self.id)
InventoryDefinition.calculate_product_count(saleObj)
end
end
# status, filename, sale_receipt_no, printer_name = Payment.pay(getCloudDomain, cash, sale_id, member_info, type, tax_type, path, latest_order_no, shop_detail, current_user, nil, nil)
@@ -741,6 +747,10 @@ class Origami::PaymentsController < BaseOrigamiController
end
end
# end
if !saleObj.nil?
#InventoryJob.perform_now(self.id)
InventoryDefinition.calculate_product_count(saleObj)
end
end
end