Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-server.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-server.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-server.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 signup: the person chooses the password and name on the confirm page 83c7aa6 2 weeks, 5 days ago History
dbbasic-package.json · 4.5 KB · 76 lines
1{
2 "id": "app-receiving",
3 "name": "Receiving",
4 "version": "0.2.0",
5 "description": "A purchase order says what was ORDERED from a supplier; a receipt says what turned up on the dock -- and the difference between them is the whole reason this package exists. Every small system collapses the two into one 'received' tick on the PO, and then discovers, three weeks later when the supplier's invoice arrives, that it has no way to say 'you billed us for ten, eight came, two of those were crushed and went back on your van'. A receipt is the counterpart of a shipment with the direction reversed, and it carries the same doctrine: the quantities on receipt_lines are the FACTS, the purchase order's status is a read of them (partial when some of what was ordered has arrived, received when all of it has), derived by system_receipt_posting and never hand-typed. The discrepancy is a first-class shape rather than a note somebody meant to write: expected, received and rejected are three separate columns, because a short delivery and a rejection are opposite arguments -- one is goods that were never sent and must never be invoiced, the other is goods we hold and want credit for -- and one column for both is exactly how a supplier gets paid for what they never delivered. The gate that makes the fold trustworthy is one hook: cumulative received quantity per order line may never exceed what was ordered, refused with all three numbers so the receiver knows which delivery is the wrong one. Goods land on the shelf when the receipt is signed for: one `purchase` stock move per line for what was RECEIVED (rejected quantities compose nothing, because they never entered stock), idempotent by a per-line provenance marker so a replayed event never shelves the same carton twice. Each move carries unit_cost_cents stamped from the PO line's agreed price -- the cost on the way IN that FIFO and weighted-average valuation both need and that cannot be reconstructed once the supplier's price list moves on (see tests/test_cogs_on_sale.py for the COGS gap this feeds). The one site object is a READ, not a table: a printable check-in sheet for the person at the roller door, because the dock is where the paperwork actually happens and a clipboard beats a phone in a cold warehouse. What is deliberately NOT here, named so it reads as a decision rather than an omission: three-way matching against supplier invoices (that is app-invoices' purchase side meeting this one, and it needs a purchase-invoice noun first), landed costs and freight apportionment, serial and lot tracking, put-away routing to specific bins (nothing in this repo yet records which product lives in which bin), and returns to supplier -- a rejection is recorded here as the fact it is, and the credit note that follows is its own slice. Ships an attention provider for purchase orders left at `partial`: a supplier sent some of it, system_receipt_posting derived that fact by counting, and then no screen ever mentioned it again. The detail names the outstanding quantity, because three POs short by one unit and three short by two hundred are the same row count and different phone calls.",
6 "compatibility": {
7 "dbbasic_object_server": ">=0.1.0"
8 },
9 "dependencies": [
10 "app-orders",
11 "app-catalog"
12 ],
13 "objects": [
14 {
15 "id": "hook_receipt_lines",
16 "path": "objects/hook/receipt_lines.py"
17 },
18 {
19 "id": "action_receive_goods",
20 "path": "objects/action/receive_goods.py"
21 },
22 {
23 "id": "system_receipt_posting",
24 "path": "objects/system/receipt_posting.py"
25 },
26 {
27 "id": "site_receiving_sheet",
28 "path": "objects/site/receiving_sheet.py"
29 },
30 {
31 "id": "system_receiving_attention",
32 "path": "objects/system/receiving_attention.py"
33 }
34 ],
35 "schemas": [
36 {
37 "collection": "receipts",
38 "path": "schemas/receipts.json"
39 },
40 {
41 "collection": "receipt_lines",
42 "path": "schemas/receipt_lines.json"
43 }
44 ],
45 "permissions": [
46 {
47 "path": "permissions/rules.json"
48 }
49 ],
50 "seed": [
51 {
52 "collection": "receipts",
53 "path": "seed/receipts.tsv"
54 },
55 {
56 "collection": "receipt_lines",
57 "path": "seed/receipt_lines.tsv"
58 },
59 {
60 "collection": "site_routes",
61 "path": "seed/site_routes.tsv"
62 }
63 ],
64 "migrations": [],
65 "nav_optional": true,
66 "attention": [
67 {
68 "id": "pos_short_received",
69 "object_id": "system_receiving_attention",
70 "label": "Short-received POs",
71 "path": "/orders",
72 "group": "Warehouse",
73 "severity": "normal"
74 }
75 ]
76}