kbz pay qrcode;

This commit is contained in:
Zoey
2019-06-24 13:57:46 +06:30
6 changed files with 44 additions and 19 deletions

View File

@@ -1,4 +1,5 @@
# require 'prawn/qrcode'
require 'prawn/measurement_extensions'
class ReceiptBillPdf < Prawn::Document
include ActionView::Helpers::NumberHelper
@@ -685,10 +686,14 @@ class ReceiptBillPdf < Prawn::Document
end
def pay_by_kbzpay(status, qr_code)
if status == 'Paid'
if status == 'Frt'
move_down line_move
move_down line_move
text "KBZ Pay", :size => self.header_font_size+2, :align => :center
move_down line_move
print_qr_code(qr_code, pos: [30, cursor], extent: 160, stroke: false, dot: 1000)
# stroke_horizontal_rule
move_down line_move
print_qr_code(qr_code, pos: [20, cursor], extent: 200, stroke: true)
stroke_horizontal_rule
end
end