====== Job Cost ====== API to submit Job Cost. Supported methods are GET, POST. **url: ~/job_cost** ===== JSON Schema ===== Other reference json schema: [[doc_api_style|object_variance]] { "$id": "https://www.igarment.net/schema/json/v1-0/job-cost.json", "title": "Job Order Cost", "type": "object", "required": [ "doc_ref_no", "cost_class", "cost_type" ], "properties": { // header info to describe usage of the cost "doc_ref_no": { "type": "string" }, "trx_date": { "type": "string", "format": "date" }, "cost_class": { "type": "string" }, // choice: F -- Fabric Material, A -- Accessory Material, L -- Labor, C -- Other Cost "cost_type": { "type": "string" }, // cost_class = F or A, cost_type = material class // cost_class = L, cost_type = process_code // cost_class = C, cost_type = charge type code "doc_info": { "type": "string" }, // cost_class = F or A, doc_info should set with material code "cur": { "type": "string" }, "qty": { "type": "number" }, // total qty, may be larger than sum(details.qty) "qty_unit": { "type": "string" }, "amt": { "type": "number" }, // total amt, may be larger than sum(details.amt) "create_user": { "type": "string" }, "created_user": { "type": "string" }, "last_modified_user": { "type": "string" }, // record how many cost used in each job order "details": { "type": "array", "items": { "type": "object", "properties": { "job_order": { "type": "string" }, "style": { "type": "string" }, "work_order_no": { "type": "string" }, "qty": { "type": "number" }, "amt": { "type": "number" } } } } } } ===== Attributes can be used in Find method. ===== **document attributes**: sys_id, cost_class, cost_type, doc_ref, doc_info, trx_date, cur **system attributes**: sys_owner, sys_create_date, sys_lm_user, sys_lm_date ===== Example ===== GET: ~/job_cost/20800 { "doc_ref_no": "00001/20230505", "trx_date": "2023-05-05T00:00:00", "cost_class": "L", "cost_type": "CUT", "doc_info": "", "cur": "RMB", "qty": 200.0, "qty_unit": "PCS", "amt": 3000.0, "created_user": "USER", "last_modified_user": "USER", "details": [ { "job_order": "HKASA22-0001", "style": "ND21WAP13045", "work_order_no": "", "qty": 100.0, "amt": 1995.0 } ] }