Refactor invoice status handling to use 'processed' terminology

- Renamed instances of 'invoice_updated' to 'invoice_processed' across various modules to improve clarity and consistency in invoice status management.
- Updated validation and processing logic to reflect the new terminology, ensuring that all references are aligned with the recent changes in the invoice processing model.
- Adjusted related functions and validation checks to maintain functionality and accuracy in invoice processing workflows.
This commit is contained in:
2026-03-13 12:44:07 -05:00
parent 326f4019a2
commit 5522fbb0b9
12 changed files with 74 additions and 74 deletions

View File

@@ -21,7 +21,7 @@ from sqlalchemy.orm import Session, joinedload
from api.v1.modules.a76.invoices.common.common_validators import (
invoice_exists_by_id,
invoice_updated,
invoice_processed,
)
from core.exceptions import ErrorCollector
from .imports.validators.create import validate_create as validate_create_import
@@ -343,7 +343,7 @@ class ItemService:
if not invoice:
errors.raise_if_errors("Error al encontra la factura para el item")
if not invoice_updated(db, item_data.invoice_id, tenant_id, company_id, errors):
if not invoice_processed(db, item_data.invoice_id, tenant_id, company_id, errors):
errors.raise_if_errors("Error al crear el item - la factura ya fue actualizada, no se pueden agregar items")
# Lock invoice and calculate line number