KBZPay Receipt Pdf modified

This commit is contained in:
Zoey
2019-06-27 10:43:30 +06:30
parent 52a375f2a4
commit 74b758e163
3 changed files with 19 additions and 3 deletions

View File

@@ -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