Add catalog sale purchase summary endpoint

- Add CatalogSaleSummarySerializer and CatalogSummarySaleLineSerializer
- Add CatalogSaleSummary API view for GET requests
- Register endpoint at /don_confiao/resumen_compra_catalogo_json/<id>
- Add comprehensive test for catalog sale summary
- Include nested customer and product details in response
- Endpoint returns id, date, customer, and lines with products
This commit is contained in:
2026-05-30 20:32:20 -05:00
parent 52ff61354e
commit d4a61b8340
6 changed files with 80 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ from .api import (
SaleView,
CatalogSaleView,
SaleSummary,
CatalogSaleSummary,
SalesForTrytonView,
SalesToTrytonView,
# Payments
@@ -44,6 +45,11 @@ urlpatterns = [
SaleSummary.as_view(),
name="purchase_json_summary",
),
path(
"resumen_compra_catalogo_json/<int:id>",
CatalogSaleSummary.as_view(),
name="catalog_purchase_json_summary",
),
path(
"payment_methods/all/select_format",
PaymentMethodView.as_view(),