Skip to content

Commit 370067e

Browse files
committed
Add easybill csv export
1 parent 11fb8cf commit 370067e

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

bakeup/workshop/exports.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -533,16 +533,10 @@ def get_data(self):
533533
)
534534

535535
# Format dates
536-
purchase_date = first_order.created.strftime("%Y-%m-%d")
536+
purchase_date = order.created.strftime("%Y-%m-%d")
537537
shipping_date = ""
538538
payment_date = ""
539539

540-
if hasattr(order, "shipped_date") and order.shipped_date:
541-
shipping_date = order.shipped_date.strftime("%Y-%m-%d")
542-
543-
if hasattr(order, "paid_date") and order.paid_date:
544-
payment_date = order.paid_date.strftime("%Y-%m-%d")
545-
546540
row = [
547541
str(order_number),
548542
"item",
@@ -588,7 +582,11 @@ def get_data(self):
588582
"", # state
589583
"DE",
590584
str(position.product.pk) if position.product else "",
591-
position.product.name if position.product else "", # country
585+
(
586+
position.product.get_display_name()
587+
if position.product
588+
else ""
589+
), # country
592590
str(position.quantity),
593591
item_price,
594592
vat_percent,

0 commit comments

Comments
 (0)