KBZPay Receipt Pdf modified
This commit is contained in:
14
app/controllers/origami/sx queries.txt
Normal file
14
app/controllers/origami/sx queries.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
truncate bookings;
|
||||
truncate booking_orders;
|
||||
truncate orders;
|
||||
truncate order_items;
|
||||
truncate assigned_order_items;
|
||||
truncate sale_orders;
|
||||
truncate sales;
|
||||
truncate sale_items;
|
||||
truncate sale_audits;
|
||||
truncate sale_taxes;
|
||||
truncate sale_payments;
|
||||
truncate shift_sales;
|
||||
update dining_facilities set status='available';
|
||||
update cashier_terminals set is_currently_login=0;
|
||||
@@ -105,7 +105,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
end
|
||||
|
||||
if kbz_pay_status
|
||||
pay_by_kbzpay(printed_status, qr_code)
|
||||
kbzpay_qr_generator(printed_status, qr_code)
|
||||
end
|
||||
|
||||
footer(printed_status)
|
||||
@@ -685,14 +685,16 @@ class ReceiptBillPdf < Prawn::Document
|
||||
move_down line_move
|
||||
end
|
||||
|
||||
def pay_by_kbzpay(status, qr_code)
|
||||
def kbzpay_qr_generator(status, qr_code)
|
||||
if status == 'Frt'
|
||||
move_down line_move
|
||||
move_down line_move
|
||||
text "Scan to pay with KBZ Pay", :size => self.header_font_size, :align => :center
|
||||
move_down line_move
|
||||
print_qr_code(qr_code, pos: [39, cursor], extent: 161, stroke: false, dot: 1000)
|
||||
# stroke_horizontal_rule
|
||||
move_down line_move
|
||||
text "This QR code will be expired after 20 minutes.", :size => self.item_font_size, :align => :center
|
||||
move_down line_move
|
||||
move_down line_move
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user