Documentation
¶
Overview ¶
Package swissqrinvoice Generate Swiss QR Invoices as described in [this standard](https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-de.pdf) and [the style guide](https://www.paymentstandards.ch/dam/downloads/style-guide-de.pdf). The library uses gopdf(https://github.com/signintech/gopdf) via the [gopdf-wrapper](https://github.com/72nd/gopdf-wrapper).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Invoice ¶
type Invoice struct {
ReceiverIBAN string `yaml:"receiver_iban" default:"CH44 3199 9123 0008 8901 2"`
IsQrIBAN bool `yaml:"is_qr_iban" default:"true"`
ReceiverName string `yaml:"receiver_name" default:"Robert Schneider AG"`
ReceiverStreet string `yaml:"receiver_street" default:"Rue du Lac"`
ReceiverNumber string `yaml:"receiver_number" default:"12"`
ReceiverZIPCode string `yaml:"receiver_zip_code" default:"2501"`
ReceiverPlace string `yaml:"receiver_place" default:"Biel"`
ReceiverCountry string `yaml:"receiver_country" default:"CH"`
PayeeName string `yaml:"payee_name" default:"Pia-Maria Rutschmann-Schnyder"`
PayeeStreet string `yaml:"payee_street" default:"Grosse Marktgasse"`
PayeeNumber string `yaml:"payee_number" default:"28"`
PayeeZIPCode string `yaml:"payee_zip_code" default:"9400"`
PayeePlace string `yaml:"payee_place" default:"Rorschach"`
PayeeCountry string `yaml:"payee_country" default:"CH"`
Reference string `yaml:"reference" default:"21 00000 00003 13947 14300 09017"`
AdditionalInfo string `yaml:"additional_info" default:"Rechnung Nr. 3139 für Gartenarbeiten"`
Amount string `yaml:"amount" default:"3 949.75"`
Currency string `yaml:"currency" default:"CHF"`
}
Invoice contains all necessary information for the generation of an invoice.
func OpenInvoice ¶ added in v0.9.1
OpenInvoice opens a invoice config YAML file with the given path.
func (Invoice) Doc ¶ added in v0.9.1
Doc returns the invoice as a gopdf_wrapper.Doc element. This can be used to further customizing the invoice. in contrary to GoPdf() the wrapper doc has more convince functions than using gopdf directly.
func (Invoice) GoPdf ¶ added in v0.9.1
GoPdf returns the invoice as a gopdf.GoPdf element. This can be used to further customizing the invoice.
func (Invoice) SaveQrConent ¶ added in v1.0.2
SaveQrConent saves the content of the QR code to a text file for debugging.
Directories
¶
| Path | Synopsis |
|---|---|
|
Code generated by rice embed-go; DO NOT EDIT.
|
Code generated by rice embed-go; DO NOT EDIT. |

