Merge branch 'crm' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-06-30 13:34:30 +06:30
21 changed files with 486 additions and 105 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)

View File

@@ -1,5 +1,5 @@
class Origami::SaleEditController < BaseOrigamiController
authorize_resource :class => false
# Index for sale item void OR edit
def edit
sale_id = params[:sale_id]

View File

@@ -1,5 +1,5 @@
class Origami::VoidController < BaseOrigamiController
authorize_resource :class => false
def overall_void
sale_id = params[:sale_id]