fix(CSV): report tryton csv.

This commit is contained in:
Mono Mono 2025-04-12 12:06:07 -05:00
parent 32149b10e2
commit c7e1af9c81
3 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ class TestAPI(APITestCase):
expected_rows = [
[self.customer.name, self.customer.name, self.customer.name, "",
"", "2024-09-02 00:00:00+00:00", "Contado", "Almacén",
"", "2024-09-02", "Contado", "Almacén",
"Peso colombiano", self.product.name, "2.00", "3000.00", "Unidad",
"TIENDA LA ILUSIÓN", "Tienda La Ilusion", "La Ilusion", "True", ""
],

View File

@ -65,7 +65,7 @@ class TestExportarVentasParaTryton(TestCase):
self.assertEqual(next(csv_reader), expected_header)
expected_rows = [
["Camilo", "Camilo", "Camilo", "", "", "2024-09-02 00:00:00+00:00", "Contado", "Almacén", "Peso colombiano", "Panela", "2.00", "3000.00", "Unidad", "TIENDA LA ILUSIÓN", "Tienda La Ilusion", "La Ilusion", "True", ""],
["Camilo", "Camilo", "Camilo", "", "", "2024-09-02", "Contado", "Almacén", "Peso colombiano", "Panela", "2.00", "3000.00", "Unidad", "TIENDA LA ILUSIÓN", "Tienda La Ilusion", "La Ilusion", "True", ""],
["", "", "", "", "", "", "", "", "", "Panela", "3.00", "5000.00", "Unidad", "", "", "", "", ""],
]
csv_rows = list(csv_reader)

View File

@ -194,7 +194,7 @@ def sales_to_tryton_csv(sales):
first_sale_line = sale_lines[0]
customer_info = [sale.customer.name] * 3 + [sale.description] * 2
first_line = customer_info + [
sale.date,
sale.date.strftime('%Y-%m-%d'),
"Contado",
"Almacén",
"Peso colombiano",