8 Commits

Author SHA1 Message Date
752c372c2f add: updateApprovalPO api in purchase order aset 2026-07-09 11:09:44 +07:00
7e88cf247b add: getDaftarAttachment api for purchase order asset 2026-07-09 10:34:26 +07:00
7af9fb2ca4 add: uploadAttachment api 2026-07-09 10:27:50 +07:00
77fc97e964 add: getDataKontrakPoAset api 2026-07-09 10:16:03 +07:00
834f23f26e add: getDaftarPoAset api 2026-07-09 10:11:28 +07:00
dc88589c78 add: deletePoAsset api 2026-07-09 10:04:43 +07:00
3871a680dd add: editPoAsset api 2026-07-09 09:54:26 +07:00
9c87e9ce25 add: createPoAsset api 2026-07-09 09:39:11 +07:00
2 changed files with 1324 additions and 0 deletions

View File

@@ -172,6 +172,302 @@ Content-Type: application/json
"ID": "" "ID": ""
} }
###
// upload attachment — requires multipart/form-data with file(s)
// Gunakan REST Client atau Postman. Contoh format:
// POST https://{{host}}/mockup/purchase/order/PurchaseOrderAset/uploadAttachment/
// Content-Type: multipart/form-data; boundary=----boundary
//
// ------boundary
// Content-Disposition: form-data; name="token"
//
// eyJ...
// ------boundary
// Content-Disposition: form-data; name="ponumber"
//
// PO24070001
// ------boundary
// Content-Disposition: form-data; name="poID"
//
// 1
// ------boundary
// Content-Disposition: form-data; name="contractID"
//
// 1
// ------boundary
// Content-Disposition: form-data; name="files"; filename="foto1.jpg"
// Content-Type: image/jpeg
//
// < /path/to/foto1.jpg
// ------boundary
// Content-Disposition: form-data; name="files"; filename="foto2.jpg"
// Content-Type: image/jpeg
//
// < /path/to/foto2.jpg
// ------boundary--
Content-Type: application/json
{
"token": {{token}}
}
###
// listing po asset
POST https://{{host}}/mockup/purchase/order/PurchaseOrderAset/getDaftarPoAset/
Content-Type: application/json
{
"token": {{token}},
"search": "",
"currpage": 1,
"startdate": "2026-01-01",
"enddate": "2026-12-31",
"status": "All"
}
###
// get daftar attachment
POST https://{{host}}/mockup/purchase/order/PurchaseOrderAset/getDaftarAttachment/
Content-Type: application/json
{
"token": {{token}},
"contractID": 1,
"poID": 1
}
###
// update approval PO — verifikasi manager (level 1)
POST https://{{host}}/mockup/purchase/order/PurchaseOrderAset/updateApprovalPO/
Content-Type: application/json
{
"token": {{token}},
"poID": 1,
"approvelevel": "1"
}
###
// get data kontrak po asset
POST https://{{host}}/mockup/purchase/order/PurchaseOrderAset/getDataKontrakPoAset/
Content-Type: application/json
{
"token": {{token}},
"poID": 1
}
###
// create po asset
POST https://{{host}}/mockup/purchase/order/PurchaseOrderAset/createPoAsset/
Content-Type: application/json
{
"token": {{token}},
"podate": "2026-07-09",
"reference": "REF-ASSET-001",
"supplierID": 1,
"typepajak": "nominal",
"valuepajak": 0,
"typediskon": "nominal",
"valuediskon": 0,
"catatan": "PO Asset Test",
"summary": {
"subtotal": 775000000,
"diskon": 37500000,
"pajak": 81125000,
"total": 818625000
},
"detail": [
{
"M_ItemID": 123,
"ItemUnitID": 1,
"RequestQty": 2,
"SupplierPrice": 75000000,
"TempTotal": 150000000,
"DiskonType": "R",
"DiskonAmount": 0,
"detail": [
{
"PurchaseRequestID": 1,
"PurchaseRequestDetailID": 1,
"PurchaseRequestFlagID": 1,
"M_ItemID": 123,
"ItemUnitID": 1,
"OriginalQty": 2,
"RequestQty": 2,
"SupplierPrice": 75000000
}
]
},
{
"M_ItemID": 124,
"ItemUnitID": 2,
"RequestQty": 5,
"SupplierPrice": 25000000,
"TempTotal": 125000000,
"DiskonType": "P",
"DiskonAmount": 10,
"detail": [
{
"PurchaseRequestID": 2,
"PurchaseRequestDetailID": 2,
"PurchaseRequestFlagID": 2,
"M_ItemID": 124,
"ItemUnitID": 2,
"OriginalQty": 3,
"RequestQty": 3,
"SupplierPrice": 25000000
},
{
"PurchaseRequestID": 2,
"PurchaseRequestDetailID": 3,
"PurchaseRequestFlagID": 3,
"M_ItemID": 124,
"ItemUnitID": 2,
"OriginalQty": 2,
"RequestQty": 2,
"SupplierPrice": 25000000
}
]
},
{
"M_ItemID": 125,
"ItemUnitID": 1,
"RequestQty": 1,
"SupplierPrice": 500000000,
"TempTotal": 500000000,
"DiskonType": "R",
"DiskonAmount": 25000000,
"detail": [
{
"PurchaseRequestID": 3,
"PurchaseRequestDetailID": 4,
"PurchaseRequestFlagID": 4,
"M_ItemID": 125,
"ItemUnitID": 1,
"OriginalQty": 1,
"RequestQty": 1,
"SupplierPrice": 500000000
}
]
}
],
"assetAttachmentID": null,
"contractName": "Kontrak Pengadaan Mesin X",
"contractDate": "2026-07-09",
"contractStart": "2026-07-09",
"contractEnd": "2027-07-09",
"contractDuration": 12,
"installmentNumber": 12,
"installmentDate": 1,
"installmentPayAmount": 12500000,
"installmentDownPaymentType": "nominal",
"installmentDownPayment": 5000000
}
###
// edit po asset
POST https://{{host}}/mockup/purchase/order/PurchaseOrderAset/editPoAsset/
Content-Type: application/json
{
"token": {{token}},
"PurchaseOrderID": 1,
"PurchaseOrderAssetContractID": 1,
"podate": "2026-07-09",
"reference": "REF-ASSET-001-UPDATED",
"supplierID": 1,
"typepajak": "percent",
"valuepajak": 11,
"typediskon": "nominal",
"valuediskon": 0,
"catatan": "PO Asset Updated",
"summary": {
"subtotal": 775000000,
"diskon": 0,
"pajak": 85250000,
"total": 860250000
},
"detail": [
{
"M_ItemID": 123,
"ItemUnitID": 1,
"RequestQty": 3,
"SupplierPrice": 75000000,
"TempTotal": 225000000,
"DiskonType": "R",
"DiskonAmount": 0,
"detail": [
{
"PurchaseRequestID": 1,
"PurchaseRequestDetailID": 1,
"PurchaseRequestFlagID": 1,
"M_ItemID": 123,
"ItemUnitID": 1,
"OriginalQty": 3,
"RequestQty": 3,
"SupplierPrice": 75000000
}
]
},
{
"M_ItemID": 124,
"ItemUnitID": 2,
"RequestQty": 5,
"SupplierPrice": 25000000,
"TempTotal": 125000000,
"DiskonType": "R",
"DiskonAmount": 0,
"detail": [
{
"PurchaseRequestID": 2,
"PurchaseRequestDetailID": 2,
"PurchaseRequestFlagID": 2,
"M_ItemID": 124,
"ItemUnitID": 2,
"OriginalQty": 3,
"RequestQty": 3,
"SupplierPrice": 25000000
},
{
"PurchaseRequestID": 2,
"PurchaseRequestDetailID": 3,
"PurchaseRequestFlagID": 3,
"M_ItemID": 124,
"ItemUnitID": 2,
"OriginalQty": 2,
"RequestQty": 2,
"SupplierPrice": 25000000
}
]
}
],
"assetAttachmentID": 1,
"contractName": "Kontrak Pengadaan Mesin X - Revisi",
"contractDate": "2026-07-10",
"contractStart": "2026-07-10",
"contractEnd": "2027-10-10",
"contractDuration": 15,
"installmentNumber": 15,
"installmentDate": 5,
"installmentPayAmount": 15000000,
"installmentDownPaymentType": "persen",
"installmentDownPayment": 20
}
###
// delete po asset
POST https://{{host}}/mockup/purchase/order/PurchaseOrderAset/deletePoAsset/
Content-Type: application/json
{
"token": {{token}},
"poID": 1,
"contractID": 1,
"ponumber": "PO24070001"
}
### Test isValidMultiple Warehouse ### Test isValidMultiple Warehouse
### Should return True karena UnitRequest = UnitPurchase ### Should return True karena UnitRequest = UnitPurchase
GET https://{{host}}/mockup/purchase/order/PurchaseOrder/isValidMultipleWarehouse/ GET https://{{host}}/mockup/purchase/order/PurchaseOrder/isValidMultipleWarehouse/