97 lines
3.5 KiB
Bash
97 lines
3.5 KiB
Bash
#get list of invoices
|
|
curl --location 'https://land.dbiz.com//api/method/building_material.building_material.api.invoice.get_list' \
|
|
--header 'Cookie: sid=a0cbe3ea6f9a7e9cf083bbe3139eada68d2357eac0167bcc66cda17d; full_name=Ha%20Duy%20Lam; sid=a0cbe3ea6f9a7e9cf083bbe3139eada68d2357eac0167bcc66cda17d; system_user=yes; user_id=lamhd%40gmail.com; user_image=/files/avatar_0986788766_1763627962.jpg' \
|
|
--header 'X-Frappe-Csrf-Token: 6ff3be4d1f887dbebf86ba4502b05d94b30c0b0569de49b74a7171a9' \
|
|
--header 'Content-Type: application/json' \
|
|
--data '{
|
|
"limit_page_length" : 0,
|
|
"limit_start" : 0
|
|
}'
|
|
|
|
#response
|
|
{
|
|
"message": [
|
|
{
|
|
"name": "ACC-SINV-2025-00041",
|
|
"posting_date": "2025-12-02",
|
|
"status": "Chưa thanh toán",
|
|
"status_color": "Danger",
|
|
"order_id": null,
|
|
"grand_total": 486400.0
|
|
},
|
|
{
|
|
"name": "ACC-SINV-2025-00026",
|
|
"posting_date": "2025-11-25",
|
|
"status": "Đã trả",
|
|
"status_color": "Success",
|
|
"order_id": "SAL-ORD-2025-00119",
|
|
"grand_total": 1153433.6
|
|
},
|
|
{
|
|
"name": "ACC-SINV-2025-00025",
|
|
"posting_date": "2025-11-24",
|
|
"status": "Đã trả",
|
|
"status_color": "Success",
|
|
"order_id": "SAL-ORD-2025-00104",
|
|
"grand_total": 3580257.894
|
|
}
|
|
]
|
|
}
|
|
|
|
#get invoice detail
|
|
curl --location 'https://land.dbiz.com//api/method/building_material.building_material.api.invoice.get_detail' \
|
|
--header 'Cookie: sid=a0cbe3ea6f9a7e9cf083bbe3139eada68d2357eac0167bcc66cda17d; full_name=Ha%20Duy%20Lam; sid=a0cbe3ea6f9a7e9cf083bbe3139eada68d2357eac0167bcc66cda17d; system_user=yes; user_id=lamhd%40gmail.com; user_image=/files/avatar_0986788766_1763627962.jpg' \
|
|
--header 'X-Frappe-Csrf-Token: 6ff3be4d1f887dbebf86ba4502b05d94b30c0b0569de49b74a7171a9' \
|
|
--header 'Content-Type: application/json' \
|
|
--data '{
|
|
"name" : "ACC-SINV-2025-00041"
|
|
}'
|
|
|
|
#response
|
|
{
|
|
"message": {
|
|
"name": "ACC-SINV-2025-00041",
|
|
"posting_date": "2025-12-02",
|
|
"status": "Chưa thanh toán",
|
|
"status_color": "Danger",
|
|
"customer_name": "Ha Duy Lam",
|
|
"order_id": null,
|
|
"seller_info": {
|
|
"phone": "0243 543 0726",
|
|
"email": "info@viglacera.com.vn",
|
|
"fax": "(024) 3553 6671",
|
|
"tax_code": "0105908818",
|
|
"company_name": "Công Ty Cổ Phần Kinh Doanh Gạch Ốp Lát Viglacera",
|
|
"address_line1": "Tầng 2 tòa nhà Viglacera, số 1 đại lộ Thăng Long",
|
|
"city_code": "01",
|
|
"ward_code": "00637",
|
|
"city_name": "Thành phố Hà Nội",
|
|
"ward_name": "Phường Đại Mỗ"
|
|
},
|
|
"buyer_info": {
|
|
"name": "phuoc-thanh toán",
|
|
"address_title": "phuoc",
|
|
"address_line1": "123 tt",
|
|
"phone": "0985225855",
|
|
"email": null,
|
|
"fax": null,
|
|
"tax_code": null,
|
|
"city_code": "75",
|
|
"ward_code": "25252",
|
|
"city_name": "Tỉnh Đồng Nai",
|
|
"ward_name": "Xã Phú Riềng"
|
|
},
|
|
"items": [
|
|
{
|
|
"item_name": "Hội An HOA E01",
|
|
"item_code": "HOA E01",
|
|
"qty": 1.0,
|
|
"rate": 486400.0,
|
|
"amount": 486400.0
|
|
}
|
|
],
|
|
"total": 486400.0,
|
|
"discount_amount": 0.0,
|
|
"grand_total": 486400.0
|
|
}
|
|
} |