Skip to main content

Consolidating your quantities in your documents

Consolidating quantities in your documents.

Updated over 3 weeks ago

What it does

Adding item consolidation can shorten the document by reducing the number of lines used by the same item.

Here is what a regular document looks like:


Here is what the consolidated version looks like:


Implimentation


The below example is for an invoice:

To implement this into your document, you will need to go to System Setup > Document Layouts > Copy > Go to the body section, and on line 18 there is an each statement:
{{#each invoice.invoiceItems as |item|}}

To:

{{#each (group-and-sum invoice.invoiceItems groupBy="chargingStartDate,chargingEndDate,suspensions,minimumHirePeriodAppliedFlag,continuingFlag,stockType,itemName,rateDefinitionRef,stockType,price,discount"

sum="quantity,totalCharge"

groupByDateOnly="chargingStartDate,chargingEndDate") as |item|}}

You also might want to remove the stock level number on this document, and you can find this on line 73:
{{#if item.stockLevelItemNumber}}

({{item.stockLevelItemNumber}})

{{else}}

({{item.itemCode}})

{{/if}}

For an order, you would put this on line 19:

{{#each (group-and-sum order.rentalOrderItems

groupBy="chargingStartDate,chargingEndDate,suspensions,minimumHirePeriodAppliedFlag,continuingFlag,stockType,itemName,rateDefinitionRef,stockType,price,discount"

sum="quantity,totalCharge"

groupByDateOnly="chargingStartDate,chargingEndDate") as |item|}}

If you need any support regarding this, please use the chat bubble. Please note that Document Requests are chargeable.


Did this answer your question?