From 354df3ad012e90a7a29eae4a83a96d90d5bea35f Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Mon, 24 Nov 2025 14:53:48 +0700 Subject: [PATCH] create order -> upload bill --- docs/order.sh | 23 +- html/payment-qr.html | 6 +- lib/core/constants/api_constants.dart | 6 + .../presentation/pages/checkout_page.dart | 36 ++ .../datasources/order_remote_datasource.dart | 53 ++ .../repositories/order_repository_impl.dart | 15 + .../domain/repositories/order_repository.dart | 6 + .../presentation/pages/payment_qr_page.dart | 471 +++++++++++++++--- 8 files changed, 545 insertions(+), 71 deletions(-) diff --git a/docs/order.sh b/docs/order.sh index 8f34e83..aa2ec69 100644 --- a/docs/order.sh +++ b/docs/order.sh @@ -115,4 +115,25 @@ curl --location 'https://land.dbiz.com//api/method/building_material.building_ma "account_name": "NGUYEN MINH CHAU" } } -} \ No newline at end of file +} + +#upload bill +curl --location 'https://land.dbiz.com//api/method/upload_file' \ +--header 'Cookie: sid=a0cbe3ea6f9a7e9cf083bbe3139eada68d2357eac0167bcc66cda17d; sid=a0cbe3ea6f9a7e9cf083bbe3139eada68d2357eac0167bcc66cda17d' \ +--header 'X-Frappe-Csrf-Token: 6ff3be4d1f887dbebf86ba4502b05d94b30c0b0569de49b74a7171a9' \ +--form 'file=@"/C:/Users/tiennld/Downloads/logo_crm.png"' \ +--form 'is_private="1"' \ +--form 'folder="Home/Attachments"' \ +--form 'doctype="Sales Order"' \ +--form 'docname="SAL-ORD-2025-00058-1"' \ +--form 'optimize="true"' + + +#order detail +curl --location 'https://land.dbiz.com//api/method/building_material.building_material.api.sales_order.get_detail' \ +--header 'Cookie: sid=a0cbe3ea6f9a7e9cf083bbe3139eada68d2357eac0167bcc66cda17d; sid=a0cbe3ea6f9a7e9cf083bbe3139eada68d2357eac0167bcc66cda17d' \ +--header 'X-Frappe-Csrf-Token: 6ff3be4d1f887dbebf86ba4502b05d94b30c0b0569de49b74a7171a9' \ +--header 'Content-Type: application/json' \ +--data '{ + "name" : "SAL-ORD-2025-00058-1" +}' \ No newline at end of file diff --git a/html/payment-qr.html b/html/payment-qr.html index 508bef6..90597d0 100644 --- a/html/payment-qr.html +++ b/html/payment-qr.html @@ -12,9 +12,11 @@
- + +
+

Thanh toán