FSM Invoice Model Reference
This reference is intended for administrators and developers who work with Invoice model mappings and processing settings.
The Invoice model represents invoice and inherits the Transaction base. It enables entity synchronization, adds Item lines and the purchase-order field, and initializes subsidiary during creation. Its explicit prototype.defaults is empty.
Standard default structure (JSON fragment):
{
"models/invoice": {
"prototype": {
"record": "invoice",
"map": {
"id": "*formulatext:case when {line} > 0 then {internalid} end|internalid",
"type": "formulatext:nvl({recordtype}, lower({type}))",
"createdfrom": "createdfrom",
"createdfromtype": "createdfrom.recordtype|",
"entity": "entity",
"customer": "custbody_nx_customer",
"asset": "custbody_nx_asset",
"case": "custbody_nx_case",
"task": "custbody_nx_task",
"status": "status",
"date": "trandate",
"email": "email",
"contact": "contactprimary.internalid|",
"purchaseorder": "otherrefnum",
"paymentmethod": "paymentmethod",
"items": [
{
"item": "item|item.item",
"quantity": "quantity|item.quantity",
"entity": "entity|item.entity",
"rate": "rate|item.price",
"task": "custcol_nx_task|item.custcol_nx_task"
}
]
},
"defaults": {},
"applyCaseTimeExpenseOnly": true,
"syncentity": true,
"inventory": false
}
}
}
For the meaning of the inherited syncentity and inventory properties and guidance on changing these properties, see Transaction Mappings and Processing Properties.
The inherited Project and Project Task mappings vary with Project Management. For the inherited mapping values, see FSM Transaction Base Model Reference.
The following table describes the Invoice model's Case-based time and expense application setting.
|
Property |
Purpose |
Standard Default |
Effect and Dependencies |
|---|---|---|---|
|
|
Controls whether automatically applied Time and Expense lines are limited to the invoice's Case. |
|
On invoice creation, applies eligible Time and Expense lines whose Task belongs to the invoice's Case. When |
The Item map contains Item, quantity, entity, rate, and Task fields. These map to the Item sublist. The standard purchase-order map is otherrefnum.
Turning off applyCaseTimeExpenseOnly can include billable time and expenses for other work available to the invoice's customer or project. Confirm the invoice's scope and resulting lines before using the change.
The Case action selects an eligible Sales Order transformation when possible, or creates an invoice with the Case's customer and other context. The model doesn't submit an invoice when it finds no applicable lines. Don't use an empty custom line map to change invoice eligibility. Invoice action behavior belongs in the relevant feature. For Case button settings, see FSM NetSuite View Configuration.