Refactor item management: Update schemas, models, and API routes
- Renamed customs-related schemas in line_items to LineCustomCreate, LineCustomUpdate, and LineCustomResponse. - Adjusted models to streamline invoice_id mapping in Item model. - Enhanced item routes to include company_id in summary statistics endpoint. - Refactored ItemService to improve item creation and update logic, removing redundant methods. - Updated frontend components for item management, including new item creation and editing functionalities. - Added API client for items with CRUD operations and improved error handling.
This commit is contained in:
@@ -28,8 +28,7 @@ class Item(Base, TenantScopedMixin, TimestampMixin):
|
||||
}
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
|
||||
invoice_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("a76.invoice_header.id")) # CONSECUTIVO
|
||||
invoice_id: Mapped[int] = mapped_column(ForeignKey("a76.invoice_header.id")) # CONSECUTIVO
|
||||
# Type: IMPORT_TEMP, IMPORT_DEF, EXPORT, REPAIR, etc.
|
||||
item_type: Mapped[str] = mapped_column(String(20))
|
||||
system_origin: Mapped[str] = mapped_column(String(10)) # SCAF or SCAII
|
||||
|
||||
Reference in New Issue
Block a user