InvoiceLabor

POST /invoicing/invoice/labor/add

The following list provides you with the absolute minimum fields required to add an InvoiceLabor, as well as other potentially required fields.

Invoice Conditions

The following Invoice conditions must be satisfied in order to add any InvoiceLabor record.

Condition Value
Invoice Status Invoice Status must be “Open” or “Committed”.
Branch Code Required
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

Required Fields

The following fields are the absolute minimum fields that should be required to create an invoice.

Field Value
InvoiceCode Must be a valid Invoice Code.
LaborRateCode Required if the Invoice Variable option “Require Labor Code” is True.
Must be a valid LaborRate Code.
TechnicianCode Must be a valid Technician Code.
UserCreated Must be a valid User Code that is not Obsolete. If not provided it will use the Login User.

Potentially Required Fields

These fields may be required depending on your ePASS configuration, or there is unique behavior that needs to be mentioned.

Field Value
SellingPrice 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 Default “Hundredths”
NardaCode Default “Demand”
TimeRate Default “Regular”

LabourRateCode

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”

addRelatedLines

The adding of related detail lines can be controlled using the “addRelatedLines” section. If not provided then no related detail lines will be added.

Key Value
Comment Determines if related Comment lines are added

Sample: Add a Labor Charge to an Invoice


POST /v1/invoicing/invoice/labor/add
{
    "userCreated": "TAS",
    "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": "S03418395",
    "laborRateCode": "TS",
    "nardaCode": null,
    "rate": 15,
    "ServiceDate": "2021-06-18",
    "tax2": true,
    "tax3": true,
    "technicianCode": "BN",
    "technicianDesc": "BYRAN FLANNERY",
    "timeCharged": 1.5,
    "timeRate": null,
    "tripCharge": true,
    "tripChargeAmt": 60,
    "tripChargeTime": 30
}



{
    "success": false,
    "warning": false,
    "httpStatusCode": 422,
    "generalMessage": "One or more of the fields has an invalid or missing value.",
    "exceptionMessage": null,
    "keys": [],
    "messages": [
        {
            "code": "INV-040021",
            "message": "Miscs are not allowed on Finished Invoices."
        }
    ],
    "warnings": []
}