@@ -286,12 +286,14 @@ def _get_qrbill(self, context):
286286 render = True ,
287287 dry_run = self .dry_run ,
288288 )
289- info = (
290- f"Vertrag-ID { self .contract .id } (Rechnung Nr. { self .invoice_id } , CHF { total_amount } )"
291- )
292289 if ret :
293- logger .error ("Fehler beim Erzeugen der Rechnung für %s: %s" % (info , ret ))
294- raise RuntimeError ("Fehler beim erzeugen der Rechnung für %s: %s" % (info , ret ))
290+ logger .error (
291+ f"Fehler beim Erzeugen der Rechnung für Vertrag { self .contract .id } : { ret } "
292+ )
293+ raise RuntimeError (
294+ f"Fehler beim erzeugen der Rechnung für Vertrag-ID { self .contract .id } "
295+ f"(Rechnung Nr. { self .invoice_id } , CHF { total_amount } ): { ret } "
296+ )
295297 return "/tmp/%s" % output_filename
296298
297299 def _get_akonto_qrbill (self , context ):
@@ -340,8 +342,8 @@ def _do_accounting(self, context: dict, book: AccountingBook):
340342 autosave = False ,
341343 )
342344 logger .info (
343- "%sAdded transaction: Verrechnung Akontozahlung CHF %s for contract id %s)."
344- % (self .dry_run_tag , total_akonto , self .contract .id )
345+ "%sAdded transaction: Verrechnung Akontozahlung for contract id %s)."
346+ % (self .dry_run_tag , self .contract .id )
345347 )
346348
347349 if not total_amount :
@@ -371,13 +373,12 @@ def _do_accounting(self, context: dict, book: AccountingBook):
371373 f"Konnte Rechnung-Objekt für Vertrag ID { self .contract .id } nicht erzeugen."
372374 )
373375 logger .info (
374- "%sAdded invoice %s for contract id %s: CHF %s / invoice id %s"
376+ "%sAdded invoice %s for contract id %s: invoice id %s"
375377 % (
376378 self .dry_run_tag ,
377379 invoice_category ,
378380 self .contract .id ,
379- total_amount ,
380- invoice .id ,
381+ invoice .id if invoice else "None" ,
381382 )
382383 )
383384 if not self .dry_run :
@@ -394,8 +395,8 @@ def _do_accounting(self, context: dict, book: AccountingBook):
394395 autosave = not self .dry_run ,
395396 )
396397 logger .info (
397- "%sAdded transaction: %s CHF %s for virtual contract '%s')."
398- % (self .dry_run_tag , description , total_amount , self .virtual_contract_account .name )
398+ "%sAdded transaction: %s for virtual contract '%s')."
399+ % (self .dry_run_tag , description , self .virtual_contract_account .name )
399400 )
400401
401402 @staticmethod
0 commit comments