forked from CGM_Public/pretix_original
Add option to exclude Sales Channels from invoice generation
This commit is contained in:
@@ -257,7 +257,8 @@ def invoice_pdf_task(invoice: int):
|
||||
|
||||
|
||||
def invoice_qualified(order: Order):
|
||||
if order.total == Decimal('0.00') or order.require_approval:
|
||||
if order.total == Decimal('0.00') or order.require_approval or \
|
||||
order.sales_channel not in order.event.settings.get('invoice_generate_sales_channels'):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@@ -145,6 +145,10 @@ DEFAULTS = {
|
||||
'default': 'False',
|
||||
'type': str
|
||||
},
|
||||
'invoice_generate_sales_channels': {
|
||||
'default': json.dumps(['web']),
|
||||
'type': list
|
||||
},
|
||||
'invoice_address_from': {
|
||||
'default': '',
|
||||
'type': str
|
||||
|
||||
Reference in New Issue
Block a user