update shift sale

This commit is contained in:
Aung Myo
2017-06-30 13:32:56 +06:30
parent 3b9c16d8d5
commit 1d08954a76
14 changed files with 384 additions and 78 deletions

View File

@@ -9,7 +9,12 @@ class Origami::PaymentsController < BaseOrigamiController
sale_data = Sale.find_by_sale_id(sale_id)
sale_items = SaleItem.where("sale_id=?",sale_id)
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
rounding_adj = sale_data.grand_total - new_total
sale_data.update_attributes(grand_total: new_total,rounding_adjustment:rounding_adj)
# Print for First Bill to Customer
unique_code = "ReceiptBillPdf"
#shop detail
shop_details = Shop.find(1)