Class: Prawn::SwissQRBill::Sections::ReceiptAmount

Inherits:
Section
  • Object
show all
Includes:
Helpers::BoxHelper, Helpers::NumberHelper
Defined in:
lib/prawn/swiss_qr_bill/sections/receipt_amount.rb

Overview

Amount section at receipt

TODO: allow EUR payment TODO: find solution to put measurements to specs.yml OPTIMIZE: refactor with payment_amount

Constant Summary collapse

KEY =
'receipt.amount'
CURRENCY_WIDTH =

width of the currency field with enough space for both variants

11.mm
AMOUNT_BOX_WIDTH =

measurement of the box for the amount as value and as corner-box

30.mm
AMOUNT_BOX_HEIGHT =
10.mm
AMOUNT_LABEL_PAD =

padding of the amount label to corner-box

1.mm

Instance Attribute Summary

Attributes inherited from Section

#doc, #specs

Instance Method Summary collapse

Methods included from Helpers::BoxHelper

#corner_box

Methods included from Helpers::NumberHelper

#format_with_delimiter

Methods inherited from Section

#initialize

Constructor Details

This class inherits a constructor from Prawn::SwissQRBill::Sections::Section

Instance Method Details

#drawObject



27
28
29
30
31
32
# File 'lib/prawn/swiss_qr_bill/sections/receipt_amount.rb', line 27

def draw
  box do
    draw_currency
    draw_amount
  end
end