Valuekeep DevelopmentWork
DevelopmentWork
Work
Back | List of Articles

How to create or delete a miscellaneous cost record in a work order?

Last changed in 26/12/2024

Create Record

This method allows you to create a misc cost report in a work order in a simplified way.

The method used to create a misc cost report in a work order is: POST {{url}}/api/{{tenant}}/{{organization}}/maintenance/workOrderReportmisccosts

Json example to create a misc cost report in a work order:
 {
        "reportDate": "2021-08-11T10:00:10.3886047+00:00",
        "miscCostDate": "2021-08-11T10:00:10.3886047+00:00",
        "value": {
        "amount": 34.00
        },
            "maxValue": {
        "amount": 100.000000
    },
        "minimumValue": {
        "amount": 10.000000
    },
        "quantity": 1,
        "workOrder": "OT9543",
        "assetType": 2,
        "location": null,
        "equipment": "MT02",
        "employee": "0007",
        "company": "DEMO",
        "miscCostsType": "TIPOCD",
        "miscCost": "DESLOC",
        "workOrderMaintenancePlan": null,
        "task": null,
        "currency": “EUR”
    }

This method allows to create a misc cost report according to the parameters filled in:

  1. reportDate: The report date. Mandatory field.
  2. miscCostDate: The misc cost date. Mandatory field.
  3. value: The misc cost value. Mandatory field.
  4. maxValue: The maximum value defined on the selected misc cost. Mandatory field.
  5. Quantity: Quantity. Mandatory field.
  6. remarks: Remarks.
  7. WorkOrder: The key of the work order the misc cost will be recorded to. Mandatory field.
  8. AssetType: The asset type (2- equipment; 3- tool). Mandatory field.
  9. Location: The location's key.
  10. equipment: The equipment key.
  11. tool: The tool's key.
  12. Employee: Employee key.
  13. company: The company's key. Mandatory field.
  14. miscCostType: The misc cost type key. Mandatory field.
  15. miscCost: The misc cost key. Mandatory field.
  16. workorderMaintenancePlan: The maintenance plan key.
  17. Task: The task key.
  18. Currency: The currency's key. Mandatory field.

When this method is executed successfully, it returns HttpStatusCode.201Created.

 

Delete Record

This method allows you to delete a miscellaneous cost record from a work order.

The method to use for deleting a miscellaneous cost record from a work order is:

DELETE url/api/mytenant/myorganization/maintenance/workorderreportmisccosts/{{companyKey}}/{{workorderreportmisccostKey}}

The parameters to be overridden in the method are:

  1. companykey: the company key
  2. workorderreportmisccostKey: the key of the miscellaneous cost record you want to delete.

When this method is successfully executed it returns an HttpStatusCode.204.

Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.

login para deixar a sua opinião.

Obrigado pelo seu feedback. Iremos analisá-lo para continuarmos a melhorar!
Related Articles
How to create or delete work orders? How to update a work order? How to change the status of the work order? How to create a monitoring? How to get the failure list?