Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.7.0] - 2026-04-06
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add release link references for 3.7.0 (and update Unreleased compare target)

You introduced ## [3.7.0] but the link-reference block still stops at 3.4.0, so the new heading won’t resolve as a clickable compare link. Also, [Unreleased] still compares from v3.4.0, which is now stale.

Suggested footer patch
-[Unreleased]: https://github.com/Blb3D/filaops/compare/v3.4.0...HEAD
+[Unreleased]: https://github.com/Blb3D/filaops/compare/v3.7.0...HEAD
+[3.7.0]: https://github.com/Blb3D/filaops/compare/v3.6.0...v3.7.0
+[3.6.0]: https://github.com/Blb3D/filaops/compare/v3.5.0...v3.6.0
+[3.5.0]: https://github.com/Blb3D/filaops/compare/v3.4.0...v3.5.0
 [3.4.0]: https://github.com/Blb3D/filaops/compare/v3.3.0...v3.4.0

Tiny fix, big clickability. TARS approves efficient trajectories.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 10, The CHANGELOG has a new heading "## [3.7.0]" but
the link-reference footer still stops at "3.4.0" and the "[Unreleased]" compare
target is stale; update the link-reference block at the bottom to add a
reference for "3.7.0" (pointing to the appropriate GitHub compare URL or tag)
and change the "[Unreleased]" URL to compare from "v3.6.0" (or the correct
previous release) to HEAD so the "## [3.7.0]" heading resolves as a clickable
compare link and Unreleased compares from the correct prior tag.


### Added

- **Close-short workflow** — accept partial fulfillment when full quantity cannot be produced or shipped; close-short preview shows per-line achievable quantities before executing (#495, #501)
- **PO accept-short** — complete a production order with less than the ordered quantity; BOM-aware guard prevents breaking assembly dependencies (#499)
- **SO line editing** — edit quantities on confirmed/in-production/on-hold/pending orders with reason tracking (#495)
- **SO line removal** — remove a line from an editable order; guarded by shipped quantity, active PO check, and minimum one-line requirement (#505, #506)
- **PO refresh-routing** — re-snapshot a product's current active routing onto an existing production order; solves POs created before routing existed (#505)
- **Quote PDF redesign** — professional B2B layout with brand colors, two-column header, itemized lines, and terms (#497)
- **Invoice PDF redesign** — professional layout with full customer info, payment terms, calculated due date, and packing slip match (#504)
- **Packing slip redesign** — matches invoice/quote style with brand header, dark table header, and alternating row stripes (#504)
- **Admin messaging** — admin-initiated direct messaging (PRO-gated with `isPro` feature flag) (#493)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

isPro wording doesn’t match the current implementation

This line says PRO gating uses an isPro feature flag, but the provided frontend code gates on n derived from tier (professional|enterprise), not a flag named isPro. Suggest rewording to avoid drift in release notes.

Suggested wording tweak
-- **Admin messaging** — admin-initiated direct messaging (PRO-gated with `isPro` feature flag) (`#493`)
+- **Admin messaging** — admin-initiated direct messaging (PRO-tier gated in UI) (`#493`)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Admin messaging** — admin-initiated direct messaging (PRO-gated with `isPro` feature flag) (#493)
- **Admin messaging** — admin-initiated direct messaging (PRO-tier gated in UI) (`#493`)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 22, The release note incorrectly states the PRO gate
uses an isPro feature flag; update the wording to reflect the actual
implementation which gates admin-initiated direct messaging based on the derived
'n' value from 'tier' (e.g., "professional" or "enterprise") instead of an isPro
flag—adjust the line that currently mentions "isPro" so it references gating by
'tier'/'n' (professional|enterprise) or similar phrasing that matches the
frontend logic.


### Fixed

- Pending orders now included in editable statuses — line edits and removal were hidden on `pending` orders (#506)
- Quote-converted orders used `source='portal'` incorrectly — now `source='quote'`; PRO portal passes `source='portal'` explicitly (#505)
- `sales_orders.unit_price` was NOT NULL — caused conversion failures for multi-line quotes where header price is null by design (migration 077, #505)
- Packing slip header collision — "PACKING SLIP" title overlapped SO number; fixed with adequate `spaceAfter` spacing (#505)
- Close-short UI clarity — Short Closed state and multi-line Order Summary display (#502)

### Documentation

- Regenerated API-REFERENCE.md (438 endpoints), SCHEMA-REFERENCE.md (64 models), MIGRATIONS-LOG.md (60 migrations)
- Added close-short, line editing, and line removal workflows to orders user guide
- Added accept-short and refresh-routing sections to production user guide
- Added production shortfall path to quote-to-cash workflow
- Updated FEATURE-CATALOG.md: 41 → 50 features
- Removed stale planning document (496-architecture-review.md)

## [3.6.0] - 2026-03-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion backend/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.0
3.7.0
22 changes: 14 additions & 8 deletions docs/API-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@

| Metric | Count |
| ------ | ----- |
| **Total Endpoints** | ~432 |
| **Total Endpoints** | ~438 |
| **Router Files** | 49 |
| **Router Groups** | 28 (including 18 admin sub-modules) |
| **Base Path** | `/api/v1/` |

### HTTP Method Distribution

- **GET**: ~212 endpoints (read/query operations)
- **POST**: ~149 endpoints (create/execute operations)
- **PUT/PATCH**: ~41 endpoints (update operations)
- **DELETE**: ~30 endpoints (delete operations)
- **GET**: ~213 endpoints (read/query operations)
- **POST**: ~152 endpoints (create/execute operations)
- **PUT/PATCH**: ~42 endpoints (update operations)
- **DELETE**: ~31 endpoints (delete operations)

---

Expand Down Expand Up @@ -80,7 +80,7 @@ Authorization: Bearer <access_token>

**Tier**: Core
**File**: `endpoints/sales_orders.py`
**Endpoints**: 26
**Endpoints**: 30

| Method | Path | Description | Auth |
| ------ | ---- | ----------- | ---- |
Expand All @@ -101,6 +101,10 @@ Authorization: Bearer <access_token>
| PATCH | `/sales-orders/{order_id}/shipping` | Update shipping information for an order (admin only). | ADMIN |
| PATCH | `/sales-orders/{order_id}/address` | Update shipping address for an order (admin only). | ADMIN |
| POST | `/sales-orders/{order_id}/cancel` | Cancel a sales order. | ADMIN |
| PATCH | `/sales-orders/{order_id}/lines` | Edit line item quantities on a sales order. | ADMIN |
| DELETE | `/sales-orders/{order_id}/lines/{line_id}` | Remove a line item from a sales order. | ADMIN |
| GET | `/sales-orders/{order_id}/close-short-preview` | Preview close-short: shows per-line achievable quantities and PO status. | ADMIN |
| POST | `/sales-orders/{order_id}/close-short` | Close an order short — accept partial fulfillment, transition to ready_to_ship. | ADMIN |
| POST | `/sales-orders/{order_id}/confirm` | Confirm a pending_confirmation order from an external source. | ADMIN |
| POST | `/sales-orders/{order_id}/reject` | Reject a pending_confirmation order from an external source. | ADMIN |
| DELETE | `/sales-orders/{order_id}` | Delete a sales order (admin only). | ADMIN |
Expand Down Expand Up @@ -197,7 +201,7 @@ Authorization: Bearer <access_token>

**Tier**: Core
**File**: `endpoints/production_orders.py`, `endpoints/operation_status.py`
**Endpoints**: 40
**Endpoints**: 42

| Method | Path | Description | Auth |
| ------ | ---- | ----------- | ---- |
Expand All @@ -217,7 +221,9 @@ Authorization: Bearer <access_token>
| POST | `/production-orders/{order_id}/release` | Release a production order for manufacturing. | CUSTOMER |
| POST | `/production-orders/{order_id}/start` | Start production on an order. | CUSTOMER |
| POST | `/production-orders/{order_id}/complete` | Complete a production order. | CUSTOMER |
| POST | `/production-orders/{order_id}/accept-short` | Accept a production order short — complete it with the quantity already produced. | CUSTOMER |
| POST | `/production-orders/{order_id}/cancel` | Cancel a production order. | CUSTOMER |
| POST | `/production-orders/{order_id}/refresh-routing` | Re-snapshot the product's current active routing onto the production order. | CUSTOMER |
| POST | `/production-orders/{order_id}/hold` | Put a production order on hold. | CUSTOMER |
| PUT | `/production-orders/{order_id}/schedule` | Schedule a production order. | CUSTOMER |
| GET | `/production-orders/schedule/summary` | Get production schedule summary. | CUSTOMER |
Expand Down Expand Up @@ -971,5 +977,5 @@ All endpoints are prefixed with `/api/v1/`

---

*Last updated: 2026-03-30*
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.6.0*
Comment on lines +980 to 981
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

API reference footer still points to previous release.

Line 981 says v3.6.0 despite this document including new 3.7.0 endpoints. Please update to keep generated docs internally consistent.

Suggested fix
 *Last updated: 2026-04-06*
-*Generated for FilaOps Core v3.6.0*
+*Generated for FilaOps Core v3.7.0*
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.6.0*
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.7.0*
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/API-REFERENCE.md` around lines 980 - 981, The API reference footer
currently hardcodes the old release string "v3.6.0"; update that footer string
to "v3.7.0" so the generated docs match the new endpoints (replace the literal
"v3.6.0" found in the footer text with "v3.7.0").

33 changes: 29 additions & 4 deletions docs/FEATURE-CATALOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

| Tier | Features | Status |
| ------ | ---------- | -------- |
| **Core (Open Source)** | 41 | Released |
| **Total** | 41 | - |
| **Core (Open Source)** | 50 | Released |
| **Total** | 50 | - |

---

Expand All @@ -20,7 +20,7 @@

### Core (Open Source)

## Core Features (41)
## Core Features (50)

### Authentication & Access

Expand Down Expand Up @@ -98,6 +98,30 @@
| 40 | Duplicate Item | Clone items with inline BOM component swap for color variants | ✅ Complete |
| 41 | Copy BOM | Copy a BOM to a different product with target product picker | ✅ Complete |

### Sales Orders (v3.7.0)

| # | Feature | Description | Status |
| --- | ------- | ----------- | ------ |
| 42 | SO Line Editing | Edit quantities on confirmed/in-production/pending order lines with reason tracking | ✅ Complete |
| 43 | SO Line Removal | Remove a line from an editable order (guards: not shipped, no active POs, not last line) | ✅ Complete |
| 44 | Close-Short | Accept partial fulfillment — close an order short when full quantity cannot be produced/shipped | ✅ Complete |
| 45 | Close-Short Preview | Preview achievable quantities per line before executing close-short | ✅ Complete |
| 46 | Pending Orders Editable | Orders in 'pending' status allow line edits and removal | ✅ Complete |

### Production Orders (v3.7.0)

| # | Feature | Description | Status |
| --- | ------- | ----------- | ------ |
| 47 | PO Accept-Short | Complete a production order with less than the ordered quantity | ✅ Complete |
| 48 | PO Refresh Routing | Re-snapshot a product's current active routing onto an existing PO (useful when routing added after PO created) | ✅ Complete |

### PDF Documents (v3.7.0)

| # | Feature | Description | Status |
| --- | ------- | ----------- | ------ |
| 49 | Quote PDF Redesign | Professional B2B quote layout with brand colors, itemized lines, and terms | ✅ Complete |
| 50 | Invoice PDF Redesign | Professional invoice layout with full customer info, payment terms, and due date | ✅ Complete |

---

## Hidden Features (Backend Only)
Expand Down Expand Up @@ -206,5 +230,6 @@ MRP

---

*Last updated: 2026-01-28*
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.7.0*
*Generated for FilaOps Core (Open Source)*
Comment on lines +233 to 235
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Footer metadata is now duplicated/inconsistent.

Line 234 already includes versioned generation metadata, but Line 235 leaves an older generic footer in place. Keep one canonical footer to avoid “which one is authoritative?” archaeology later.

Suggested cleanup
 *Last updated: 2026-04-06*  
 *Generated for FilaOps Core v3.7.0*
-*Generated for FilaOps Core (Open Source)*
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.7.0*
*Generated for FilaOps Core (Open Source)*
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.7.0*
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/FEATURE-CATALOG.md` around lines 233 - 235, Remove the duplicated footer
by keeping a single canonical metadata block and deleting the redundant line;
specifically locate the footer strings "*Last updated: 2026-04-06*", "*Generated
for FilaOps Core v3.7.0*" and the older "*Generated for FilaOps Core (Open
Source)*" and remove the older/generic "*Generated for FilaOps Core (Open
Source)*" so only the versioned generation metadata remains.

75 changes: 71 additions & 4 deletions docs/MIGRATIONS-LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

| Metric | Count |
| ------ | ----- |
| **Total Migrations** | 56 |
| **Total Migrations** | 60 |
| **Database** | PostgreSQL |
| **Tool** | Alembic |

Expand All @@ -29,12 +29,12 @@
| Purchasing | 5 | 019, 027, 028, 036, 2940c6a93ea7 |
| Settings | 3 | 020, 037, 062 |
| Performance | 1 | 905ef924f499 |
| Sales | 8 | 024, 038, 043, 061, 066, 069, 071, 072 |
| Sales | 11 | 024, 038, 043, 061, 066, 069, 071, 072, 074, 076, 077 |
| Maintenance | 2 | 025, 026 |
| Products | 3 | 040, 055, 065 |
| Accounting | 5 | 044, 045, 046, 052, 053 |
| Tax | 1 | 063 |
| Other | 2 | 070, 073 |
| Other | 3 | 070, 073, 075 |

---

Expand Down Expand Up @@ -1121,6 +1121,65 @@

---

#### `074_add_close_short_and_line_edit_fields.py`

**Tier**: Core
**Date**: 2026-04-02
**Purpose**: Add close_short fields to sales_orders and original_quantity to sales_order_lines
**Revises**: 073

**Adds Columns**:

- `sales_orders.closed_short`
- `sales_orders.closed_short_at`
- `sales_orders.close_short_reason`
- `sales_order_lines.original_quantity`

---

#### `075_add_close_short_records_table.py`

**Tier**: Core
**Date**: 2026-04-03
**Purpose**: Add close_short_records audit table
**Revises**: 074

**Creates Tables**:

- `close_short_records` - Close Short Records

**Creates Indexes**:

- `ix_close_short_records_entity_type_entity_id`

---

#### `076_add_fulfillment_status_to_so_lines.py`

**Tier**: Core
**Date**: 2026-04-03
**Purpose**: Add fulfillment_status to sales_order_lines
**Revises**: 075

**Adds Columns**:

- `sales_order_lines.fulfillment_status`

---

#### `077_make_so_unit_price_nullable.py`

**Tier**: Core
**Date**: 2026-04-05
**Purpose**: Make sales_orders.unit_price nullable
**Revises**: 076

**Alters Columns**:

- `sales_orders.unit_price`

---

## Migration Dependencies

```text
Expand Down Expand Up @@ -1237,6 +1296,14 @@ b1815de543ea (001_initial_postgres_schema)
072_portal_ingestion_notifications
|
073_add_quote_lines_table
|
074_add_close_short_and_line_edit_fields
|
075_add_close_short_records_table
|
076_add_fulfillment_status_to_so_lines
|
077_make_so_unit_price_nullable
```


Expand All @@ -1261,5 +1328,5 @@ alembic history --verbose

---

*Last updated: 2026-03-30*
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.6.0*
Comment on lines +1331 to 1332
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Generated version footer is stale.

Line 1332 still says v3.6.0 even though this file now documents migrations through 077 for the 3.7.0 release. Please update the footer to keep release metadata consistent.

Suggested fix
 *Last updated: 2026-04-06*
-*Generated for FilaOps Core v3.6.0*
+*Generated for FilaOps Core v3.7.0*
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.6.0*
*Last updated: 2026-04-06*
*Generated for FilaOps Core v3.7.0*
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/MIGRATIONS-LOG.md` around lines 1331 - 1332, Update the generated footer
string that currently reads "FilaOps Core v3.6.0" to reflect the new release
version "FilaOps Core v3.7.0" (the line containing the footer version text near
the "Last updated" timestamp).

37 changes: 30 additions & 7 deletions docs/SCHEMA-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# FilaOps Database Schema Reference

**Generated:** 2026-03-30
**Generated:** 2026-04-06
**Source:** FilaOps Core v3.6.0
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema reference header still says Source: FilaOps Core v3.6.0 even though this PR bumps the release to 3.7.0 and regenerates the schema. Update the source version (or ensure the generator pulls from backend/VERSION) so the doc matches the release being prepared.

Suggested change
**Source:** FilaOps Core v3.6.0
**Source:** FilaOps Core v3.7.0

Copilot uses AI. Check for mistakes.
**Total Models:** 63 (Core only)
**Total Models:** 64 (Core only)
Comment on lines +5 to +7
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Schema header source version is out of sync.

Line 6 still reports FilaOps Core v3.6.0 while this document includes 3.7.0 schema additions (e.g., close-short artifacts). Update the source version to prevent confusion during audits.

Suggested fix
 **Generated:** 2026-04-06
-**Source:** FilaOps Core v3.6.0
+**Source:** FilaOps Core v3.7.0
 **Total Models:** 64 (Core only)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Generated:** 2026-04-06
**Source:** FilaOps Core v3.6.0
**Total Models:** 63 (Core only)
**Total Models:** 64 (Core only)
**Generated:** 2026-04-06
**Source:** FilaOps Core v3.7.0
**Total Models:** 64 (Core only)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/SCHEMA-REFERENCE.md` around lines 5 - 7, The schema header in
docs/SCHEMA-REFERENCE.md is out of sync: replace the header line "Source:
FilaOps Core v3.6.0" with "Source: FilaOps Core v3.7.0" so the document
accurately reflects the included 3.7.0 schema additions (e.g., close-short
artifacts); locate the header block containing "**Generated:**", "**Source:**
FilaOps Core v3.6.0", and "**Total Models:**" and update the Source version
string accordingly.

**Purpose:** AI knowledge source for codebase understanding

> This is the **Core (Open Source)** schema reference.
Expand All @@ -25,7 +25,7 @@
10. [UOM Models](#uom-models) (1 model)
11. [Accounting Models](#accounting-models) (4 models)
12. [Tax Models](#tax-models) (1 model)
13. [Reference Data Models](#reference-data-models) (8 models)
13. [Reference Data Models](#reference-data-models) (9 models)

---

Expand Down Expand Up @@ -362,7 +362,7 @@
| material_type | String(50) | NOT NULL | Material type |
| color | String(50) | | Color |
| finish | String(50) | NOT NULL, DEFAULT 'standard' | Finish |
| unit_price | Numeric(10, 2) | NOT NULL | Unit price |
| unit_price | Numeric(10, 2) | | Unit price |
| total_price | Numeric(10, 2) | NOT NULL | Total price |
| tax_amount | Numeric(10, 2) | DEFAULT 0.0 | Tax amount |
| tax_rate | Numeric(5, 4) | | Tax rate |
Expand Down Expand Up @@ -398,6 +398,9 @@
| production_notes | Text | | Production notes |
| cancelled_at | DateTime | | Cancelled timestamp |
| cancellation_reason | Text | | Cancellation reason |
| closed_short | Boolean | NOT NULL, DEFAULT False | Closed short |
| closed_short_at | DateTime | | Closed Short timestamp |
| close_short_reason | Text | | Close short reason |
| created_at | DateTime | NOT NULL, DEFAULT utcnow, INDEX | Creation timestamp |
| updated_at | DateTime | NOT NULL, DEFAULT utcnow | Last update timestamp |
| confirmed_at | DateTime | | Confirmed timestamp |
Expand All @@ -419,7 +422,7 @@

### SalesOrderLine

**Table:** `sales_order_lines` | **Tier:** Core | **File:** `sales_order.py:175`
**Table:** `sales_order_lines` | **Tier:** Core | **File:** `sales_order.py:180`

| Column | Type | Constraints | Description |
| ------ | ---- | ----------- | ----------- |
Expand All @@ -435,6 +438,8 @@
| total | Numeric(10, 2) | NOT NULL | Total |
| allocated_quantity | Numeric(10, 2) | DEFAULT 0 | Quantity allocated to orders |
| shipped_quantity | Numeric(10, 2) | DEFAULT 0 | Shipped quantity |
| original_quantity | Numeric(10, 2) | | Original quantity |
| fulfillment_status | String(20) | | Fulfillment status |
| notes | Text | | Additional notes |
| created_by | Integer | | Creator reference |

Expand Down Expand Up @@ -1877,6 +1882,24 @@

---

### CloseShortRecord

**Table:** `close_short_records` | **Tier:** Core | **File:** `close_short_record.py:13`

| Column | Type | Constraints | Description |
| ------ | ---- | ----------- | ----------- |
| id | Integer | PK, INDEX | Primary key |
| entity_type | String(20) | NOT NULL, INDEX | Entity type |
| entity_id | Integer | NOT NULL, INDEX | Entity reference |
| performed_by | Integer | FK->users.id | FK reference to users.id |
| performed_at | DateTime | DEFAULT now(), NOT NULL | Performed timestamp |
| reason | Text | | Reason |
| line_adjustments | JSON | | Line adjustments |
| linked_po_states | JSON | | Linked po states |
| inventory_snapshot | JSON | | Inventory snapshot |

---

### Invoice

**Table:** `invoices` | **Tier:** Core | **File:** `invoice.py:10`
Expand Down Expand Up @@ -2037,5 +2060,5 @@
| UOM Models | 1 | 1 |
| Accounting Models | 4 | 4 |
| Tax Models | 1 | 1 |
| Reference Data Models | 8 | 8 |
| **Total** | **63** | **63** |
| Reference Data Models | 9 | 9 |
| **Total** | **64** | **64** |
Loading
Loading