InvoiceLabor
Categories:
The InvoiceLabor Object
ViewAdd an Installation Charge to an Invoice
POST /invoicing/invoice/labor/add
This endpoint adds a labor fee to an open invoice. Labor fees can’t be added to EPASS without an existing open invoice to add them to.
Invoice Conditions
An invoice must meet this list of conditions before you can add a labor fee to it.
Condition | Value |
---|---|
Invoice Status | Invoice Status must be Open or Committed . |
Branch Code | Must be a valid Branch Code. If not provided it will use the branch supplied during the login process, and if that is empty it uses the constant value DEFAULT . |
Invoice JobStatus | Any Job Status cascading that is configured in EPASS will be enforced through the API. |
Bill To Customer | BillToCustomer must be allowed to charge if the invoice is not estimate and the payment type is AR. Credit Limits will be enforced in the following situation: - The invoice is not an estimate - Credit Limit is enabled for the Customer - The Invoice Payment Type is AR - Require Credit Approval is disabled - Either the Job Status is dispatchable or Dispatching is disabled completely |
Payload
Required Fields
The following fields are the absolute minimum fields that should be required to add a labor fee to an invoice.
Field | Type | Description |
---|---|---|
InvoiceCode |
string | Must be a valid Invoice Code. |
LaborRateCode |
string | Required if the Invoice Variable option Require Labor Code is True.Must be a valid LaborRate Code. |
TechnicianCode |
string | Must be a valid Technician Code. |
UserCreated |
string | Must be a valid User Code that is not Obsolete. If not provided it will use the Login User. |
LaborRateCode
If a valid LaborRateCode is provided then the following values will be defaulted from the LaborRate. You can override any of the values that would come from the LaborRate simply by providing your own value.
Key | Value |
---|---|
Cost |
LaborRate -> Cost |
GLRevenue |
LaborRate -> GLRevenue |
GLCostCr |
LaborRate -> GLCostCredit |
GLCostDb |
LaborRate -> GLCostDebit |
Tax1 |
LaborRate -> Tax1 |
Tax2 |
LaborRate -> Tax2 |
Tax3 |
LaborRate -> Tax3 |
ActualCost |
LaborRate -> ActualCost |
StandardCost |
LaborRate -> StandardCost |
TripCharge |
LaborRate -> TripCharge |
FlatRate |
LaborRate -> FlatRate |
Warranty |
If LaborRate option “Warranty” is True, then “Yes” else “No” |
Potentially Required Fields
These fields may be required depending on your EPASS configuration, or there is unique behavior that needs to be mentioned.
Field | Type | Value |
---|---|---|
SellingPrice |
integer | If the BillTo customer has a valid project code, then the SellingPrice cannot be less than the project price. If the Misc option Do Not Allow Price Reduction is True and Qty is greater than 0, then the SellingPrice cannot be less than the list price.If the Misc option “Do Not Allow Price Change” is True, then the SellingPrice must be the list price. |
HdthsMin |
string | Default Hundredths |
NardaCode |
string | Default Demand |
TimeRate |
string | Default Regular |
addRelatedLines
The adding of related detail lines can be controlled using the addRelatedLines
object. If not provided then no related detail lines will be added.
Key | Value | Description |
---|---|---|
Comment |
Boolean | Determines if related Comment lines are added |
Sample: Adding a Labor Charge to an Invoice
POST /invoicing/invoice/labor/add
{
"userCreated": "CAPI",
"tripNo": null,
"timeIn": "10:00",
"timeInAM": "am",
"timeOut": "12:00",
"timeOutAM": "pm",
"jobStatus": null,
"technicianInvoiceNumber": null,
"technicianBillingNumber": null,
"branchCode": null,
"flatRate": null,
"HdthsMin": null,
"invoiceCode": "123456",
"laborRateCode": "01",
"nardaCode": null,
"rate": 15,
"ServiceDate": "2021-06-18",
"tax2": true,
"tax3": true,
"technicianCode": "AM",
"technicianDesc": "Alex Murphy",
"timeCharged": 1.5,
"timeRate": null,
"tripCharge": true,
"tripChargeAmt": 60,
"tripChargeTime": 30
}
{
"success": true,
"warning": false,
"httpStatusCode": 201,
"generalMessage": null,
"exceptionMessage": null,
"keys": [
{
"table": "InvoiceLabor",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 7
}
]
}
]
},
{
"table": "InvoiceAddress",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 123456
}
]
}
]
},
{
"table": "InvoiceAudit",
"keys": [
{
"key": "ID",
"fields": [
{
"fieldName": "ID",
"fieldValue": 123456
}
]
}
]
}
],
"messages": [],
"warnings": []
}
{
"success": false,
"message": "One or more of the fields has an invalid or missing value.",
"lastException": null,
"recordId": 0,
"code": null,
"httpStatusCode": 422,
"messageDetails": [
"TechnicianCode does not exist.",
"LaborRateCode code does not exist."
]
}
Feedback
Was this page helpful?
Thank you! Have additional feedback? We would love to hear from you!
Sorry to hear that. Please tell us how we can improve.