update receipt bill
This commit is contained in:
@@ -9,10 +9,6 @@ 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"
|
||||
@@ -43,7 +39,12 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
if(Sale.exists?(sale_id))
|
||||
saleObj = Sale.find(sale_id)
|
||||
sale_payment = SalePayment.new
|
||||
sale_payment.process_payment(saleObj, @user, cash, "cash")
|
||||
sale_payment.process_payment(saleObj, @user, cash, "cash")
|
||||
|
||||
new_total = Sale.get_rounding_adjustment(saleObj.grand_total)
|
||||
rounding_adj = saleObj.grand_total - new_total
|
||||
|
||||
saleObj.update_attributes(grand_total: new_total,rounding_adjustment:rounding_adj)
|
||||
|
||||
rebate_amount = nil
|
||||
|
||||
|
||||
Reference in New Issue
Block a user