MiCyte

← The wiki

Brevat

BuiltRendered from 46b-brevat.md in the public repository. Edits belong there.

Brevat keeps an instance's products, stock, supply purchases, sales and standing offers as datum documents.

Packagebrevat, version 1.3.0
KindApp. Hub tool brevat
ForAn instance that sells goods
Own sandboxYes, anchored from the farm template, whose numbering carries the price and currency vocabulary the ledgers write
PortsEmploys commerce_offering. No extension in the catalogue fills it
PreviewDemo

What it turns on

Installing exposes six tools. The hub is drawn on a sandbox that holds at least one of farm_profile, invoices, sales or offering, and shows one tab per ledger:

TabToolDocumentDeclared write
Overview (default)brevatNone of its ownNone; it summarizes the other tabs from the same row builders
Productsproduct_catalogproduct_profiles (offering_record)add_product
Stockstock_logstock_log (stock_entry)record_stock
Supplysupply_ledgerinvoices (invoice)add_supply
Salessales_ledgersales (invoice)add_sale
Offeringoffer_ledgeroffering (offer)set_offer

Installing provisions the five documents and the app sandbox. The sandbox also receives a plantings document (archetype planting), which the planting map's add_planting writes. Supply and sales use the same invoice archetype; the document a row is in records its direction.

Stock rules

The instance has one stock_log document. Each row is stock_entry = lcl_id (product), lcl_id (kind), nominal (count), msn_id (party), utc, title (optional). The count has no unit; the unit is the product profile's nominal.

The kind sets the direction: supply, return and adjustment_up add; output, spoilage and adjustment_down subtract. The on-hand figure is the sum.

A movement is refused when:

  • the product is not a node defined in the sandbox's local domain;
  • the kind is not a node under stock_events, or has no declared direction;
  • the count is not a whole number greater than zero;
  • a subtracting movement is larger than the amount on hand;
  • a party is given and the registrar does not hold that msn (the check is skipped when the store holds no registrar).

Ports

commerce_offering is declared for the Offering tab, with two calls: paypal order.create and paypal order.capture. Installing does not bind or grant it. No extension in the catalogue fills the port, so it cannot be bound from the Ports page. unfillable_ports() in _packages.py reports this.

Status

The ledgers, the stock log and the Overview are built and published. Payment capture through commerce_offering is not built: the port has no filling extension. A demo exists.

Source