Spaces:
Running
Running
Update main.py
Browse files5973 unmodified lines597459755976597759785979598068 unmodified lines604960506051605260536054605579 unmodified lines61356136613761386139614061415973 unmodified linesasync def create_ar_from_sale(sale_id: str, org_id: str, customer_id: Optional[str] = None):"""Create A/R entry and journal entry for a completed sale."""client = get_supabase()sale = await run_sync_db_call(client.table("sales").select("total_amount, created_at, user_id")68 unmodified linesasync def create_ap_from_po(po_id: str, org_id: str, supplier_id: str):"""Create A/P entry and journal entry for a received purchase order."""client = get_supabase()po = await run_sync_db_call(client.table("purchase_orders").select("total_amount, order_date, supplier_id")79 unmodified linesasync def create_ap_from_grn(grn_id: str, org_id: str):"""Create A/P entry and journal entry from a posted GRN."""client = get_supabase()# 1. Fetch GRN headergrn = await run_sync_db_call(5973 unmodified lines597459755976597759785979598068 unmodified lines604960506051605260536054605579 unmodified lines61356136613761386139614061415973 unmodified linesasync def create_ar_from_sale(sale_id: str, org_id: str, customer_id: Optional[str] = None):"""Create A/R entry and journal entry for a completed sale."""client = get_admin_supabase()sale = await run_sync_db_call(client.table("sales").select("total_amount, created_at, user_id")68 unmodified linesasync def create_ap_from_po(po_id: str, org_id: str, supplier_id: str):"""Create A/P entry and journal entry for a received purchase order."""client = get_admin_supabase()po = await run_sync_db_call(client.table("purchase_orders").select("total_amount, order_date, supplier_id")79 unmodified linesasync def create_ap_from_grn(grn_id: str, org_id: str):"""Create A/P entry and journal entry from a posted GRN."""client = get_admin_supabase()# 1. Fetch GRN headergrn = await run_sync_db_call(
main.py+3-3