Back

Maica Client Management V.0.333

NDIS-892: Agreement Item → Total Delivered Not Accounting for Voided Invoice Line Items

Resolved: Support for Voided Invoice Line Item records

An issue was identified where the Agreement Item Total Delivered field did not correctly exclude Invoice Line Item records that were marked as Voided, leading to inaccurate delivery totals.

What’s Changed?

Introduced a new Exclude checkbox field on Invoice Line Item (default FALSE):

- Description: Indicates if the Invoice Line Item Amounts should be excluded from the totals on the Invoice record. If an Agreement Item is linked, the amounts will also be excluded from its totals. The default value is unchecked.

- Help text: Check this box to exclude the Invoice Line Item Amounts from being rolled up into the totals on the Invoice record. If the Invoice Line Item is linked to an Agreement Item, the amounts will also be excluded from its totals. Leave unchecked to include them in both totals.

Logic for Rolling Up Invoice Line Items to Agreement Item:

- Source Object: Invoice_Line_Item__c

- Grouping: Records are grouped by Agreement_Item__c

- Fields Aggregated:

            - Line_Total__c is summed to represent the total dollar amount delivered.

            - Quantity_Delivered__c is summed to represent total quantity delivered.

- Exclude records where Exclude__c = TRUE

- Exclude records where the related Invoice (Invoice__r) has Cancelled__c = TRUE

- Exclude records where the related Invoice's Status__c = 'Voided'

Example Scenarios:

A Participant's invoice is voided:Agreement Item Total Delivered now correctly excludes all associated Invoice Line Item records

A single Invoice Line Item record is invalidated and flagged via Exclude = TRUE: ✅ The item is ignored in rollup totals without affecting the entire invoice record.

Post Installation Scripts
Please ensure you complete the following Post Install Scripts in the order they are provided. If you require assistance with installing or running this script, please contact Maica Support for guidance.
Post Installation Scripts: Client Management ONLY
The section of below scripts apply if you are on Client Management ONLY, if you use Client Management & Delivery, skip to the next section.
Please ensure you complete the following Post Install Scripts in the order they are provided. If you require assistance with installing or running this script, please contact Maica Support for guidance.

View Code

[NDIS-904] Payment Request - Rejection Reason -> new values should be added. Please refer to the Google Sheet below of the full list of Values

View Code

https://docs.google.com/spreadsheets/d/1W0nB2R4jPak3BTU--X-z_BB0Wpn2SWVQWiBocztr2vE/edit?usp=sharing
Post Installation Scripts: Client Management & Client Delivery
If you are on Maica Client Delivery as well as Maica Client Management, please use the below scripts. If you are on Client Management ONLY, please ignore the below section.
Note: When running these scripts, please wait until the first Job has been completed before starting the second Script. You can track the progress of the Job in your Salesforce instance by going to Setup --> Apex Jobs.
If you require assistance with installing or running this script, please contact Maica Support for guidance.

View Code

View Code