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.
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.
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.
Protected comparefalse if not equal true if equal
Protected compareDuplicates 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.
Generated using TypeDoc
Represents a service that provides operations for manipulating invoice lines.