formatting

This commit is contained in:
Frederik Jaeckel 2023-06-30 15:31:47 +02:00
parent 28a96bc7c9
commit 740b1e57d9

View file

@ -32,7 +32,7 @@ class Invoice(Invoice):
return -1.0 * amount return -1.0 * amount
elif isinstance(amount, int): elif isinstance(amount, int):
return -1 * amount return -1 * amount
else : else:
return amount return amount
def prepaid_amount(self, invoice): def prepaid_amount(self, invoice):
@ -122,10 +122,12 @@ class Invoice(Invoice):
os.path.join(os.path.dirname(__file__), 'template'), os.path.join(os.path.dirname(__file__), 'template'),
auto_reload=True) auto_reload=True)
if self.type_code in ['380', '389']: if self.type_code in ['380', '389']:
return loader.load(os.path.join(version, 'XRechnung_invoice.xml')) return loader.load(os.path.join(
version, 'XRechnung_invoice.xml'))
elif self.type_code in ['381', '261']: elif self.type_code in ['381', '261']:
return loader.load(os.path.join(version, 'XRechnung_credit.xml')) return loader.load(os.path.join(
else : version, 'XRechnung_credit.xml'))
else:
raise ValueError('invalid type-code "%s"' % self.type_code) raise ValueError('invalid type-code "%s"' % self.type_code)
else: else:
return super(Invoice, self)._get_template(version) return super(Invoice, self)._get_template(version)