Invoice Line Item

The Invoice Line Item object in Maica represents the specific Item level detail associated with an Invoice.

Fields & Relationships

The table below provides a comprehensive overview of all fields and relationships for the Invoice Line Item object in Maica. Please refer to the table below for detailed information.

Invoice Line Item

Click here to view and download the complete Invoice Schema.

Validation Rules

The list below outlines the Validation Rules applied to the Invoice Line Item Object in Maica.

Please refer to the list below for more detailed information on each Validation Rule.

Support Item is Mandatory

This rule makes sure the Support Item is mandatory.

Validation Rule Detail

Rule Name

VAL_INVOICE_LINE_ITEM_0001

Error Message

VAL_0001: The Support Item is mandatory.

Error Location

Support Item

Error Condition Formula
ISBLANK(maica_cc__Support_Item__c)

Automation

Flows

The list below outlines the Flows applied to the Invoice Line Item Object in Maica.

Please refer to the list below for more detailed information on each Flow.

Status Management

This flow evaluates and updates the status of an invoice line item.

Flow Detail

Flow Label

Maica - Invoice Line Item Status Management

API Name

maica__Invoice_Line_Item_Status_Management

Type

Autolaunched Flow

Flow Summary

This flow ensures that the invoice line item status is accurately updated based on the calculated values and specified conditions.

  • Starts on invoice line item creation or update.

  • Evaluates the status based on various conditions and calculations.

  • Assigns the appropriate status (Entered, Claimed, Fully Paid, Partially Paid, Not Paid).

Flow Description
  1. Start (Record-Triggered Flow):

    • The flow begins when an invoice line item is created or updated.

    • It is triggered before the record is saved.

  2. Set Line Total and GST (Assignment):

    • Calculates and assigns the line total, GST amount, and amount for the invoice line item.

  3. Evaluate Status (Decision):

    • The flow checks the status of the invoice line item based on various conditions:

      • Claim Type = Home Care Package: Proceeds to evaluate further conditions.

      • Entered: If the line total is greater than 0, the claim count is 0, the claim balance equals the line total, and the paid amount is 0, it sets the status to "Entered".

      • Claimed: If the line total is greater than 0, the claim count is greater than 0, the claim balance equals the line total, and the paid amount is 0, it sets the status to "Claimed".

      • Fully Paid: If the line total is greater than 0, the claim count is greater than 0, the claim balance is less than or equal to 0, and the paid amount is greater than or equal to the line total, it sets the status to "Fully Paid".

      • Partially Paid: If the line total is greater than 0, the claim count is greater than 0, the claim balance is greater than 0 but less than the line total, and the paid amount is less than the line total, it sets the status to "Partially Paid".

      • Not Paid: If the line total is greater than 0, the claim count is greater than 0, the claim balance is greater than 0, and the paid amount is 0, it sets the status to "Not Paid".

  4. Set Entered Status (Assignment):

    • Sets the invoice line item status to "Entered".

  5. Set Claimed Status (Assignment):

    • Sets the invoice line item status to "Claimed".

  6. Set Fully Paid Status (Assignment):

    • Sets the invoice line item status to "Fully Paid".

  7. Set Partially Paid Status (Assignment):

    • Sets the invoice line item status to "Partially Paid".

  8. Set Not Paid Status (Assignment):

    • Sets the invoice line item status to "Not Paid".

Trigger Handlers

The list below outlines the Trigger Handlers applied to the Invoice Line Item Object in Maica.

Please refer to the list below for more detailed information on each Trigger Handler.

Invoice Line Rollup Expenditure

This trigger is designed to manage the rollup of expenditures for invoice line items in Maica.

Detail

Load Order

1

Label

InvoiceLineRollupExpenditure_MDTM

Execution, Logic & Outcome

Execution of Trigger Logic:

The trigger logic defined in the InvoiceLineRollupExpenditure_MDTM class is executed when the trigger conditions are met. The class contains the code that manages the rollup expenditure process for invoice line items.

  • Trigger Conditions:

    • When a new invoice line item (maica__Invoice_Line_Item__c) is created.

    • When an existing invoice line item is updated.

    • Any specific field changes that are monitored by the trigger (defined in the handler class).

Logic Explanation

  1. Initialisation:

    • When an invoice line item record is created or updated, the trigger is initialised. The InvoiceLineRollupExpenditure_MDTM metadata type configuration is loaded, ensuring that the trigger is active (Active__c is true) and has the correct load order (Load_Order__c is 1.0).

  2. Trigger Execution:

    • Upon initialisation, the trigger executes the logic defined in the InvoiceLineRollupExpenditure_MDTM class.

    • The class methods perform the following steps:

      • Validation: The expenditure data for each line item is validated to ensure it is complete and accurate.

      • Calculation: The total expenditure is calculated based on the line items of the invoice, taking into account the item types and financial rules.

      • Update: The invoice record is updated with the newly calculated rolled-up expenditure data.

Trigger Outcome:

Once executed, the trigger ensures that each invoice line item has its expenditures rolled up correctly, according to the logic specified in the handler class. This helps maintain accurate financial data for invoices.

Invoice Line Booking Item

This trigger is designed to manage the booking items for invoice line items in Maica.

Detail

Load Order

2

Label

InvoiceLineBookingItem_MDTM

Execution, Logic & Outcome

Execution of Trigger Logic:

The trigger logic defined in the InvoiceLineBookingItem_MDTM class is executed when the trigger conditions are met. The class contains the code that manages the booking items process for invoice line items.

  • Trigger Conditions:

    • When a new invoice line item (maica__Invoice_Line_Item__c) is created.

    • When an existing invoice line item is updated.

    • Any specific field changes that are monitored by the trigger (defined in the handler class).

Logic Explanation

  1. Initialisation:

    • When an invoice line item record is created or updated, the trigger is initialised. The InvoiceLineBookingItem_MDTM metadata type configuration is loaded, ensuring that the trigger is active (Active__c is true) and has the correct load order (Load_Order__c is 2.0).

  2. Trigger Execution:

    • Upon initialisation, the trigger executes the logic defined in the InvoiceLineBookingItem_MDTM class.

    • The class methods perform the following steps:

      • Validation: The booking item data for each line item is validated to ensure it is complete and accurate.

      • Linking: Booking items are linked to the corresponding invoice line items, ensuring that the relationship between booking items and invoice line items is correctly established.

      • Update: The invoice line item record is updated with the newly linked booking item data.

Trigger Outcome:

Once executed, the trigger ensures that each invoice line item has its booking items linked correctly, according to the logic specified in the handler class. This helps maintain accurate booking item data for invoice line items.

Last updated

Further Maica Resources

HomepageFeaturesFAQs