Protected configReadonly dbReadonly httpReadonly methodReadonly moduleReadonly optionsProtected printProtected printProtected printerProtected sectionProtected tillAdds an item to an invoice line. If the item already exists in the invoice, the quantity is increased, otherwise a new line is created.
The invoice to add the item to.
The customer associated with the invoice.
The app configuration.
The item to add to the invoice line.
An array of modifiers to apply to the item.
Optional lineOptions: LineOptionsAdditional options for the line.
The updated invoice.
Increases the quantity of an item in an invoice line.
The invoice to increase the item quantity in.
The invoice line to increase the item quantity in.
The quantity of the item to increase.
The updated invoice.
Adds a modifier to a list of modifiers, if the modifier already exists in the list, the quantity is increased, otherwise a new modifier is created.
The list of modifiers to add the modifier to.
The modifier to add to the list.
The updated list of modifiers.
Increases the quantity of a modifier in a list of modifiers.
The list of modifiers to increase the quantity in.
The modifier to increase the quantity of.
The quantity of the modifier to increase.
The updated list of modifiers.
Auto query invoices
query options
Adjusts the grand total of the invoice by the deduction balance
The invoice to adjust.
void
Calculate the delivery charge of an invoice
The invoice object containing delivery charge and type
The updated invoice object with calculated grand total
Calculate the invoice subtotal without considering take out
The invoice object containing invoice lines
The updated invoice object with calculated subtotals
Calculates the rewarded credit for an invoice.
The invoice to calculate the rewarded credit for.
The minimum invoice amount required to be eligible for rewarded credit.
Whether to include the service charge in the calculation.
Whether to include the tax in the calculation.
Calculates and sets the rewarded points for the given invoice based on various conditions.
The invoice to calculate rewarded points for.
void
Calculates the rounding for an invoice based on the given parameters.
The invoice to calculate the rounding for.
The base value to round to.
Whether to round up or down.
Whether to apply rounding only for cash payments.
Calculate and set the service charge for a given invoice. The method updates the service_charge and grand_total fields of the invoice.
invoice to calculate the service charge for
service charge rate. e.g. 0.1 for 10%
Calculate the tax subtotal ratio for the invoice.
The invoice for which the ratio is calculated.
The calculated ratio as a number.
Cancels an invoice
The invoice to cancel
The section item to associate with the invoice
Optional employee: IEmployeeEntityThe employee to associate with the invoice
A promise that resolves with the cancelled invoice options
Changes the discount of an existing invoice line.
The invoice line to change the discount in.
The type of discount to apply.
The amount of the discount to apply.
The updated invoice.
Changes the unit price of an existing invoice line.
The invoice line to change the item price in.
The new price of the item.
The updated invoice.
Changes the unit price of a existing modifier.
The modifier to change the price of.
The new price of the modifier.
The updated list of modifiers.
Change payments of an invoice
invoice to change
Checks an invoice
The invoice to check
The section item to associate with the invoice
Optional employee: IEmployeeEntityThe employee to associate with the invoice
A promise that resolves with the checked invoice options
Protected comparefalse if not equal true if equal
Protected compareCreates an invoice
The invoice to create
The section item to associate with the invoice
Optional employee: IEmployeeEntityThe employee to associate with the invoice
A promise that resolves with the created invoice options
duplicate an invoice
the invoice to duplicate
Optional employee: IEmployeeEntitythe employee to associate with the invoice
Duplicates an invoice line
The invoice to duplicate the line in.
The line to duplicate.
The updated invoice.
Retrieves multiple entities with optional pagination and filtering.
[UNUSED PARAMETER, KEPT FOR POSSIBLE FUTURE USE] Filtering parameters.
Query options including pagination.
An object containing the retrieved entities and total count.
Decreases the quantity of an item in an invoice line.
The invoice to decrease the item quantity in.
The invoice line to decrease the item quantity in.
The quantity of the item to decrease.
The updated invoice.
Decreases the quantity of a modifier in a list of modifiers.
The list of modifiers to decrease the quantity in.
The modifier to decrease the quantity of.
The quantity of the modifier to decrease.
The updated list of modifiers.
Overwrites the note of an invoice line.
The invoice line to overwrite the note of.
The new note to overwrite the old note with.
The updated invoice line.
Pays an invoice
The invoice to pay
The section item to associate with the invoice
Optional till: ITill(optional) The till to use for the payment
Optional employee: IEmployeeEntity(optional) The employee to associate with the invoice
A promise that resolves with the paid invoice options
Switches an invoice from one section item to another
The invoice to switch
The target section item to switch to
The source section item to switch from
Optional employee: IEmployeeEntityThe employee to associate with the invoice
A promise that resolves with the switched invoice options
Updates an invoice
The invoice to update
The section item to associate with the invoice
Optional employee: IEmployeeEntityThe employee to associate with the invoice
A promise that resolves with the updated invoice
Voids an invoice
The invoice to void
Optional till: ITillThe till to use for the void
Optional reason: stringThe reason for the void
Optional employee: IEmployeeEntityA promise that resolves with the voided invoice options
Generated using TypeDoc
Adds a discount to an invoice