You can see below the API reference of this module.
This is the constructor that creates a new instance containing the needed methods.
- Object
options: The options for creating the new invoice: config(Object):template(String): The HTML root template.
data(Object):currencyBalance(Object):main(Number): The main balance.secondary(Number): The converted main balance.tasks(Array): An array with the tasks (description of the services you did).invoice(Object): Information about invoice.
seller(Object): Information about seller.buyer(Object): Information about buyer.
Inits the HTML templates.
- Function
callback: The callback function.
Renders the invoice in HTML format.
- String
output: An optional path to the output file. - Function
callback: The callback function.
- Invoice The
Nodeiceinstance.
Converts a currency into another currency according to the currency balance provided in the options
- Number
input: The number that should be converted
- Number The converted input
Renders invoice as pdf
-
Object|String|Stream
options: The path the output pdf file, the stream object, or an object containing: -
output(String|Stream): The path to the output file or the stream object. -
converter(Object): An object containing custom settings for thephantom-html-to-pdf. -
Function
callback: The callback function
- Invoice The Invoice instance