test ClubSellingCSVView

This commit is contained in:
imperosol
2025-11-12 21:59:34 +01:00
parent e00a64252e
commit 17421e5cc9
3 changed files with 70 additions and 17 deletions

View File

@@ -460,15 +460,15 @@ class ClubSellingCSVView(ClubSellingView):
*row,
selling.label,
selling.quantity,
selling.unit_price,
selling.quantity * selling.unit_price,
selling.get_payment_method_display(),
]
if selling.product:
row.append(selling.product.selling_price)
row.append(selling.product.purchase_price)
row.append(selling.product.selling_price - selling.product.purchase_price)
row.append(selling.unit_price - selling.product.purchase_price)
else:
row = [*row, "", "", ""]
row = [*row, "", ""]
return row
def get(self, request, *args, **kwargs):
@@ -489,9 +489,9 @@ class ClubSellingCSVView(ClubSellingView):
gettext("Customer"),
gettext("Label"),
gettext("Quantity"),
gettext("Unit price"),
gettext("Total"),
gettext("Payment method"),
gettext("Selling price"),
gettext("Purchase price"),
gettext("Benefit"),
],