- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
25 lines
742 B
Python
25 lines
742 B
Python
from fastapi import Depends
|
|
from app.core.database.db_session import SessionLocal
|
|
from app.api.v1.routers.PosSyncRouter import sync_pos_transactions, POSSyncPayload
|
|
|
|
db = SessionLocal()
|
|
payload = POSSyncPayload.model_validate({
|
|
"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 = sync_pos_transactions(payload, db)
|
|
print("Success:", res)
|
|
except Exception as e:
|
|
import traceback
|
|
traceback.print_exc()
|