removing decimal with precision and decimal count

This commit is contained in:
Filipriec
2026-08-24 21:31:06 +02:00
parent 16670f4375
commit 5e9b86c1fb
22 changed files with 50 additions and 467 deletions

View File

@@ -125,11 +125,11 @@ Create profile table `products`:
| `unit` | link(units) | required, auto-indexed |
| `sale_price` | money | EUR, exact rounding |
| `purchase_price` | money | USD, half-up rounding |
| `vat_rate` | decimal(5,2) | required |
| `vat_rate` | numeric | required |
| `package_count` | int | optional |
| `legacy_id` | bigint | indexed |
| `measured_weight` | numeric | optional |
| `stock` | decimal(18,3) | quantity ledger enabled |
| `stock` | numeric | quantity ledger enabled |
| `active` | boolean | required |
Confirm `stock` is displayed as quantity-ledger/read-only and starts at zero.
@@ -143,7 +143,7 @@ Create `stock_receipts` with:
- `product`: required link(products);
- `warehouse`: required link(warehouses);
- `supplier`: required link(partners);
- `quantity`: required decimal(18,3);
- `quantity`: required numeric;
- `received_on`: required date;
- `processed`: int.
@@ -176,9 +176,9 @@ Create `sales_order_lines`:
- `sales_order`: required link(sales_orders);
- `product`: required link(products);
- `quantity`: required decimal(18,3);
- `quantity`: required numeric;
- `unit_price`: required EUR money, exact rounding;
- `discount_rate`: decimal(5,2);
- `discount_rate`: numeric;
- `line_position`: required int.
This supplies a parent → child → product link chain and composite business
@@ -346,8 +346,8 @@ The live tables deliberately cover text, boolean, int, bigint, numeric,
decimal, EUR/USD money with both rounding modes, date/time/instant, duration,
period, phone, IBAN, email, credit card, GTIN-8/12/13/14, account, FK links,
accounting, accounting transfer, generated companions, and a
`products.stock` `decimal(12,3)` quantity ledger. The stock transaction tables
have `stock_effect decimal(12,3)` computed targets, because a script cannot
`products.stock` `numeric` quantity ledger. The stock transaction tables
have `stock_effect numeric` computed targets, because a script cannot
target its own source `quantity` column.
The saved Steel scripts are: