Interactive demo of sqlalchemy-accumulator — the type-safe Python adapter for pg_accumulator
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %}Record inventory receipt or shipment via handle.post()
Cancel all movements for a recorder via handle.unpost()
Atomically replace movements via handle.repost()
Creates an ORM Order and posts inventory movement in a single transaction
| # | Client | Warehouse | Status | Action |
|---|---|---|---|---|
| {{ o.id }} | {{ o.client.name if o.client else '?' }} | {{ o.warehouse.name if o.warehouse else '?' }} | {% if o.status == 'posted' %} ● posted {% elif o.status == 'cancelled' %} ● cancelled {% else %} ● {{ o.status }} {% endif %} | {% if o.status == 'posted' %} {% endif %} |
| ID | Name | Address |
|---|---|---|
| {{ w.id }} | {{ w.name }} | {{ w.address or '—' }} |
| ID | SKU | Name | Price | Category |
|---|---|---|---|---|
| {{ p.id }} | {{ p.sku }} |
{{ p.name }} | ${{ p.unit_price }} | {{ p.category or '—' }} |
| ID | Name | Phone | |
|---|---|---|---|
| {{ c.id }} | {{ c.name }} | {{ c.email or '—' }} | {{ c.phone or '—' }} |
| Warehouse | Product | Quantity | Amount |
|---|---|---|---|
| {{ b.warehouse }} — {{ b.warehouse_name }} | {{ b.product }} — {{ b.product_name }} | {{ b.quantity }} | {{ b.amount }} |
| Recorder | Period | Warehouse | Product | Quantity | Amount |
|---|---|---|---|---|---|
| {{ m.get('recorder', '') }} | {{ m.get('period', '')[:10] if m.get('period') else '' }} | {{ m.get('warehouse', '') }} — {{ m.get('warehouse_name', '') }} | {{ m.get('product', '') }} — {{ m.get('product_name', '') }} | {{ m.get('quantity', '') }} | {{ m.get('amount', '') }} |
Get instant balance via handle.balance()
Aggregate turnover via handle.turnover()
Browse movement history via handle.movements()