Add invoice processing functionality and enhance models and routes

- Introduced new routes for processing invoices in the router.
- Added `InvoiceStatus` enum to manage invoice states.
- Enhanced `InvoiceHeader` and `InvoiceFinancials` models with new fields for status tracking and total packages.
- Updated schemas to include new fields for invoice processing.
- Implemented API methods for processing invoices and checking process status in the frontend.
- Removed outdated validation files related to invoice processing.
This commit is contained in:
2026-03-13 11:02:49 -05:00
parent 6099b9c873
commit ccd81d743e
31 changed files with 30281 additions and 415 deletions

View File

@@ -43,6 +43,9 @@ class ClassCreateDTO(BaseModel):
iva_exempt_fraction: Optional[str] = Field(
None, max_length=4, description="IVA exempt fraction"
)
is_active: Optional[bool] = Field(
True, description="Indicates if the class is active (default: true)"
)
class Config:
from_attributes = True
@@ -76,6 +79,9 @@ class ClassCreateDTOFA(ClassCreateDTO):
class_enabled: Optional[bool] = Field(
True, description="Indica si la clase está habilitada"
)
is_active: Optional[bool] = Field(
True, description="Indicates if the class is active (default: true)"
)
class Config:
from_attributes = True
@@ -116,6 +122,9 @@ class ClassUpdateDTO(BaseModel):
iva_exempt_fraction: Optional[str] = Field(
None, max_length=4, description="IVA exempt fraction"
)
is_active: Optional[bool] = Field(
True, description="Indicates if the class is active (default: true)"
)
model_config = ConfigDict(from_attributes=True, extra='forbid') # Explicitly forbid extra fields
@@ -136,6 +145,7 @@ class ClassResponseDTO(BaseModel):
sub_key: Optional[str] = None
physical_review: Optional[int] = None
iva_exempt_fraction: Optional[str] = None
is_active: Optional[bool] = None
created_at: datetime
updated_at: datetime