ffl_integrations.distributor.invoices¶
Source: apps/ffl_integrations/ffl_integrations/distributor/invoices.py · 3 endpoint(s)
Generated by
make api-docs— do not edit by hand.
list_invoices¶
POST /api/method/ffl_integrations.distributor.invoices.list_invoices
Auth (derived from code): Roles: Purchase Manager / Purchase User / Stock Manager / System Manager
Mirrored distributor invoices, newest first, with their lines.
| arg | type | required | default | description |
|---|---|---|---|---|
distributor |
string | null | no | None |
Optional Distributor filter. |
outside_pos |
— | no | 0 |
1 = only invoices no POS order matches. |
limit |
integer | no | 100 |
Row cap (default 100, max 500). |
Returns: [{name, distributor, invoice_number, invoice_date, account, po_number, order_ref, distributor_order, outside_pos, destination, received, likely_order, total, freight, fees, tracking_numbers, lines: [{sku, description, qty, unit_cost, amount, tracking_number, serials, upc, item_code, received_qty}]}]. likely_order: for an unreceived Store invoice no order is linked to, the open store-bound POS order that probably is this parcel (awaiting the status poll's link), else "".
Permissions: Distributor order roles.
apps/ffl_integrations/ffl_integrations/distributor/invoices.py:328
outside_open_orders¶
POST /api/method/ffl_integrations.distributor.invoices.outside_open_orders
Auth (derived from code): Roles: Purchase Manager / Purchase User / Stock Manager / System Manager
Orders on a house's account that were NOT placed from this POS and are not
invoiced yet, from the order headers the hourly sync cached (houses whose provider can list orders; no live distributor call here). Only orders dated inside the invoice mirror's window are judged: an older order's invoice may predate the mirror, so "no invoice on file" would not mean "not invoiced".
Returns: [{distributor, order_ref, po_number, order_date, status}].
Permissions: Distributor order roles.
apps/ffl_integrations/ffl_integrations/distributor/invoices.py:379
sync_invoices_now¶
POST /api/method/ffl_integrations.distributor.invoices.sync_invoices_now
Auth (derived from code): Roles: Purchase Manager / Purchase User / Stock Manager / System Manager
Queue a pull of every house's recent invoices now (the hourly job, on
demand). Runs on the worker; a pull already queued or running is not doubled.
Returns: {queued: True}.
Permissions: Distributor order roles.
apps/ffl_integrations/ffl_integrations/distributor/invoices.py:312