forked from CGM_Public/pretix_original
Dekodi: Change semantics of signs
This commit is contained in:
@@ -30,13 +30,13 @@ class DekodiNREIExporter(BaseExporter):
|
|||||||
for l in invoice.lines.all():
|
for l in invoice.lines.all():
|
||||||
positions.append({
|
positions.append({
|
||||||
'ADes': l.description.replace("<br />", "\n"),
|
'ADes': l.description.replace("<br />", "\n"),
|
||||||
'ANetA': round(float(l.net_value), 2),
|
'ANetA': round(float((-1 if invoice.is_cancellation else 1) * l.net_value), 2),
|
||||||
'ANo': self.event.slug,
|
'ANo': self.event.slug,
|
||||||
'AQ': -1 if invoice.is_cancellation else 1,
|
'AQ': -1 if invoice.is_cancellation else 1,
|
||||||
'AVatP': round(float(l.tax_rate), 2),
|
'AVatP': round(float(l.tax_rate), 2),
|
||||||
'DIDt': (l.subevent or invoice.order.event).date_from.isoformat().replace('Z', '+00:00'),
|
'DIDt': (l.subevent or invoice.order.event).date_from.isoformat().replace('Z', '+00:00'),
|
||||||
'PosGrossA': round(float((-1 if invoice.is_cancellation else 1) * l.gross_value), 2),
|
'PosGrossA': round(float(l.gross_value), 2),
|
||||||
'PosNetA': round(float((-1 if invoice.is_cancellation else 1) * l.net_value), 2),
|
'PosNetA': round(float(l.net_value), 2),
|
||||||
})
|
})
|
||||||
gross_total += l.gross_value
|
gross_total += l.gross_value
|
||||||
net_total += l.net_value
|
net_total += l.net_value
|
||||||
|
|||||||
Reference in New Issue
Block a user