ffl_woo_sync.woocommerce.order_audit¶
Source: apps/ffl_woo_sync/ffl_woo_sync/woocommerce/order_audit.py · 3 endpoint(s)
Generated by
make api-docs— do not edit by hand.
run_web_revenue_backstop_now¶
POST /api/method/ffl_woo_sync.woocommerce.order_audit.run_web_revenue_backstop_now
Auth (derived from code): Roles: Sales User / Sales Manager / Stock Manager / System Manager
Run the web revenue / stock backstop sweep by hand.
Same sweep the 2-hourly cron runs (scheduled_web_revenue_backstop):
books the revenue of Transferred web orders that never got an invoice and
issues the missing accessory stock legs, alerting instead of acting on
anything a person already touched.
Returns: {"booked": [...], "delivered": [...], "failed": [...], "held": [...]} — order / invoice names per outcome.
Permissions: Counter roles (same as the other web-order accounting actions).
apps/ffl_woo_sync/ffl_woo_sync/woocommerce/order_audit.py:456
shipped_undisposed_orders¶
POST /api/method/ffl_woo_sync.woocommerce.order_audit.shipped_undisposed_orders
Auth (derived from code): Roles: Sales User / Sales Manager / Stock Manager / System Manager
List web orders WooCommerce says shipped while POS still has them open.
Read-only: the same query (and grace period) as the daily
tasks.alert_shipped_undisposed_orders alarm, without its Error Log, so
the list and the alarm cannot disagree. Each one is a firearm that may have
left with no disposition booked: confirm the serial against ShipStation and
FastBound, then dispose the order in POS.
Returns: [{"name", "woo_order_id", "customer_name", "modified"}, ...], oldest first; empty when nothing is outstanding.
apps/ffl_woo_sync/ffl_woo_sync/woocommerce/order_audit.py:432
web_stock_legs_outstanding¶
POST /api/method/ffl_woo_sync.woocommerce.order_audit.web_stock_legs_outstanding
Auth (derived from code): Roles: Sales User / Sales Manager / Stock Manager / System Manager
List web invoices whose accessory stock never left — the month-end control.
Read-only. Before closing a month, call this for that month (first to last
day) and expect an empty list: a web invoice whose accessory Delivery Note
never posted still shows a cost in the Sales Report (its cost column is
qty x Bin valuation rate, not the GL), so the report cannot reveal the gap
and its cost can only be trusted against GL COGS once this is empty. A
non-zero count lists the invoices: run run_web_revenue_backstop_now to
issue the ones that can be issued, handle the rest by hand. Also before
closing: no open ToDo on a Sales Invoice or Woo Online Order from this
machinery (a stock leg that could not be issued, a revenue booking that
keeps failing, an order whose only invoice is cancelled, a refund held
because a person is holding the stock leg, an invoice left in Draft on a
total mismatch) — each is an unbooked sale or an overstated shelf. A
backfilled Delivery Note is posted on the invoice's own date while the
period is open (no Period Closing Voucher, no accounts/stock freeze, month
not yet handed to an outside accountant), otherwise on the correction date
with a comment saying so. After a submitted sales return against a web
Delivery Note, expect report cost to exceed GL COGS by the returned amount.
| arg | type | required | default | description |
|---|---|---|---|---|
from_date |
— | no | None |
First posting date to consider (default: 30 days ago). |
to_date |
— | no | None |
Last posting date to consider (default: no upper bound). |
Returns: {"invoices": [...], "count": n} — submitted web Sales Invoices still owing a Delivery Note in the window.
Permissions: Counter roles (same as the other web-order accounting actions).
apps/ffl_woo_sync/ffl_woo_sync/woocommerce/order_audit.py:391