Class QRBillAddressDirective
java.lang.Object
ch.tocco.nice2.optional.finance.impl.report.QRBillAddressDirective
- All Implemented Interfaces:
Nice2TemplateDirective
,freemarker.template.TemplateDirectiveModel
,freemarker.template.TemplateModel
The QRBillAddressDirective is used to generate address "text" for QR bills
Params:
mode: "qr" or "display" qr, displays the 7 line output for the qr code itself (separated by \n). "display" generates
a 3 line output for the report (separated by
). Default ist "qr". address (mandatory): The address to be used. This needs to be set or this will throw an error. user (optional): The user to be used. useBillingAddress (optional): Boolean that denotes whether the billing address should be used or not (default: true)
). Default ist "qr". address (mandatory): The address to be used. This needs to be set or this will throw an error. user (optional): The user to be used. useBillingAddress (optional): Boolean that denotes whether the billing address should be used or not (default: true)
Line-by-line format for the QR Code: 1. S 2. the name that is built as follows: - company_b of the address (if it and the other _b fields are set) - company_c of the address (if it is set) - firstname + " " + lastname (if the user ist set) - alternative name (if passed as argument and not empty or null) - "" if none of the above are available 3. street (including building number): - address_b if it is set and all other _b fields are set - postbox_b if it is set and all other _b fields are set - address_c if it is set - postbox_c if it is set - "" if none of the above are available 4. building number (currently empty) - this line is reserved for house number which is currently not its own field in tocco (its included in the line above) 5. postal code - zip_b if all other _b fields are set - zip_c 6. town - city_b if all other _b fields are set - city_c 7. address.relCountry.iso2 Line-by-line format for display: 1. name 2. 1st address line 3. for country CH: 2nd address line 3. for other countries: country + "-" + 2nd address line
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
QRBillAddressDirective
public QRBillAddressDirective()
-
-
Method Details
-
execute
public void execute(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] templateModels, freemarker.template.TemplateDirectiveBody templateDirectiveBody) throws freemarker.template.TemplateException, IOException - Specified by:
execute
in interfacefreemarker.template.TemplateDirectiveModel
- Throws:
freemarker.template.TemplateException
IOException
-