Done Category, Product Catalogue, Customer, Vendor, Purchase Invoice Module
This commit is contained in:
22
test_api.js
Normal file
22
test_api.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const items = [
|
||||
{
|
||||
"productId": 1,
|
||||
"quantity": 2,
|
||||
"unitPrice": 100,
|
||||
"total": 200
|
||||
}
|
||||
];
|
||||
const po = {
|
||||
"poNumber": "TEST-001",
|
||||
"issueDate": "2026-08-27T00:00:00Z",
|
||||
"items": items
|
||||
};
|
||||
|
||||
fetch('http://localhost:8080/api/purchase-orders', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'Bearer test'
|
||||
},
|
||||
body: JSON.stringify(po)
|
||||
}).then(r => r.text()).then(console.log).catch(console.error);
|
||||
Reference in New Issue
Block a user