Charge Parts to Jobs & Work Orders

Charge Parts To Jobs and Work Orders

This API Charges parts to Jobs and Work Orders

WebMethod

  • GJRP88J – required

Option

  • scan – error scan only
  • update – Charge parts
  • Template – Get upload template

CompanyCode

  • required

SubledgerCode

  • required

DateOfRecord

  • Default = today

ChargeTo

Object specifying where the charge is applied (defaults shown):

FieldDescription
CompanyCodeDefault = CompanyCode
SubledgerCodeDefault = ARSubledgerCode

AddTax

  • Y | N (default = Parts profile)

CreditTaxTo (applicable if AddTax = true)

  • default = Parts/Invoicing Parameters (read-only)
FieldDescription
CompanyCode
GLAccount
DeptCodeDepartment code (returned as DeptCode in the result)
SubAccountif applicable

errorsFound

  • returned result (read-only)

recordsProcessed

  • returned result (read-only)

pdfReport

  • default = false

pdfReportOut (applicable if pdfReport=true)

  • base64 encoded pdf (read-only)

LineItems

FieldDescription
WarehouseCode5 char
AllocationTypeAllocationType = J | W (required)
• J – Job
• W – W/O
AllocationAllocationType = J | W (required)
• J – JobNumber
• W – WorkOrderNumber
PartNumber15 char (required)
DescriptionRequired for Non-Inventory item, otherwise normally leave blank
30 char
Cost4.3 (specify to override system, otherwise normally leave blank)
CostItemNot required for WorkOrder
CostTypeRequired
Qty5.2
InstallDateYYYY-MM-DD
NonSaleBoolean
• default = false
Reference10 char
Serialized[] (serialized items only — nested array within each LineItem)
FieldDescription
SerialNo30 char (Not applicable for Non-Inventory item)
Comments30 char (for serialized only)
{
        "WebMethod": "GJRP88J",
        "Option": "template",
        "pdfReport": false,
        "CompanyCode": "",
        "SubledgerCode": "",
        "DateOfRecord": "",
        "ChargeTo": {
               "CompanyCode": "",
               "SubledgerCode": ""
        },
        "AddTax": false,
        "LineItems": [{
                      "WarehouseCode": "",
                      "AllocationType": "",
                      "Allocation": "",
                      "PartNumber": "",
                      "Description": "",
                      "Cost": "",
                      "CostItem": "",
                      "CostType": "",
                      "Qty": "",
                      "Serialized":[{
                             "SerialNo": "",
                             "Comments": ""
                      }],
                      "InstallDate": "",
                      "NonSale": false,
                      "Reference": ""
               }]
}

example

{
    "WebMethod":"GJRP88J",
    "Option":"update",
    "pdfReport":"false",
    "CompanyCode":"01",
    "SubledgerCode":"AR",
    "LineItems":[{
         "WarehouseCode":"MAIN",
         "AllocationType":"J",
         "Allocation":"00-001",
         "PartNumber":"0100014",
         "CostItem":"00001",
         "CostType":"M",
         "Qty":"2",
         "Serialized":[{"SerialNo":"10"},{"SerialNo":"11"}],
         "InstallDate":"2024-10-07",
         "NonSale":"false"
      }]
}

result with error

{
    "errorsFound":1,
    "WebMethod":"GJRP88J",
    "Option":"update",
    "pdfReport":false,
    "CompanyCode":"01",
    "SubledgerCode":"AR",
    "DateOfRecord":"2024-09-23",
    "ChargeTo":{
      "CompanyCode":"JC",
      "SubledgerCode":"AR"
    },
    "AddTax":true,
    "CreditTaxTo":{
      "CompanyCode":"JC",
      "GLAccount":"00505",
      "DeptCode":"0005"
    },
    "LineItems":[{
        "WarehouseCode":"MAIN",
        "AllocationType":"J",
        "Allocation":"00-001",
        "PartNumber":"0100014",
        "CostItem":"00001",
        "CostType":"M",
        "Qty":2,
        "Serialized":[{"SerialNo":"10"},{"SerialNo":"11"}]
      }],
    "errors":["Job Cost Item does not exist for Job #00-001    "],
    "recordsProcessed":1
}

successful result

{
    "errorsFound":0,
    "WebMethod":"GJRP88J",
    "Option":"update",
    "pdfReport":false,
    "CompanyCode":"01",
    "SubledgerCode":"AR",
    "DateOfRecord":"2024-09-23",
    "ChargeTo":{
      "CompanyCode":"JC",
      "SubledgerCode":"AR"
    },
    "AddTax":true,
    "CreditTaxTo":{
      "CompanyCode":"JC",
      "GLAccount":"00505",
      "DeptCode":"0005"
    },
    "LineItems":[{
        "WarehouseCode":"MAIN",
        "AllocationType":"J",
        "Allocation":"00-001",
        "PartNumber":"0100014",
        "CostItem":"00001",
        "CostType":"M",
        "Qty":2,
        "Serialized":[{"SerialNo":"10"},{"SerialNo":"11"}]
      }],
    "recordsProcessed":2
}