- New models: WarrantyModel, WalletModel, SystemConfigModel - New schemas: WarrantySchema, RefundSchema, SystemConfig, CrmTaskCalendar, NotificationTemplate, NotificationGateway, RepairErp, ReviewModeration, InventoryPos, MultiDashboard, BillingFinance - New services: WarrantyService, RefundService, CrmService, CrmTaskCalendarService, DeliveryService, EmailTemplateService, InventoryPosService, MultiDashboardService, NotificationGatewayService, RepairErpService, ReviewModerationService, SystemConfigService, TemplateService, CreditService - Updated routers: AdminOrder, BillingFinance, Cart, Catalog, Checkout, Crm, InventoryPos, NotificationGateway, RolePermission, ServiceJob, Settings, Storefront, UserCreation - Updated models: Inventory, Notification, Order, Product, Service, Setting, SystemConfig, User - Updated core: database init, invoice generator, main app - Added WarrantyRouter with full CRUD and claim flow
22 lines
592 B
Python
22 lines
592 B
Python
import requests
|
|
|
|
payload = {
|
|
"device_id": "DEV",
|
|
"terminal_id": "TERM-MAIN-01",
|
|
"store_id": "STORE",
|
|
"transactions": [{
|
|
"pos_transaction_id": "TX-123",
|
|
"local_sequence": 1,
|
|
"invoice_no": "INV-1",
|
|
"total_amount": 100.0,
|
|
"created_at": "2023-10-10T00:00:00Z",
|
|
"items": [{"variant_id": "V-1", "qty": 1, "unit_price": 100.0}]
|
|
}]
|
|
}
|
|
|
|
try:
|
|
res = requests.post("http://localhost:8000/api/v1/pos/sync", json=payload)
|
|
print("Status:", res.status_code)
|
|
print("Body:", res.text)
|
|
except Exception as e:
|
|
print("Error:", e)
|