Se integro el modulo de manifestacion base

This commit is contained in:
2026-02-06 16:22:04 -06:00
parent 276a020f58
commit f2005e33a0
79 changed files with 5614 additions and 347 deletions

View File

@@ -73,6 +73,16 @@ class InvoiceService:
):
query = query.filter(models.InvoiceHeader.operation_type != "REPAR")
if filters.get("manifest_number"):
# Avoid duplicate joins if pedimento filter was also applied (though rare in this context)
# For safety, we can just use the relationship attribute directly if mapped,
# but explicit join is clearer given the previous pattern.
# Assuming SQLAlchemy handles the join overlap or we just accept it for now.
# To be safe and consistent with previous 'pedimento' block:
query = query.join(models.InvoiceComplianceMx).filter(
models.InvoiceComplianceMx.manifest_number.ilike(f"%{filters['manifest_number']}%")
)
total = query.count()
items = query.offset(skip).limit(limit).all()
return items, total