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

This commit is contained in:
Yan
2017-11-15 12:06:55 +06:30
19 changed files with 147 additions and 71 deletions

View File

@@ -295,14 +295,14 @@ class ReceiptBillPdf < Prawn::Document
total = total + res["balance"]
#total redeem amount
if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Redeem"
redeem = redeem + res["redeem"]
redeem = redeem + res["withdraw"]
balance = balance + res["balance"]
end
#end Total redem
#total Rebate Earn
if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebateAccount" && res["status"]== "Rebate"
rebate_balance = rebate_balance + res["rebate"]
rebate_balance = rebate_balance + res["deposit"]
move_down 5
y_position = cursor
@@ -310,20 +310,20 @@ class ReceiptBillPdf < Prawn::Document
text "Rebate Earn", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{number_with_precision(res["rebate"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
text "#{number_with_precision(res["deposit"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
end
end
# Total Rebate Amount if birthday
if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebateBonusAccount" && res["status"]== "Rebate"
rebate_balance = rebate_balance + res["rebate"]
rebate_balance = rebate_balance + res["deposit"]
move_down 5
y_position = cursor
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
text "Rebate Earn Bonus", :size => self.item_font_size,:align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
text "#{number_with_precision(res["rebate"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
text "#{number_with_precision(res["deposit"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
end
end
#end Total rebate if birthday