SPI-Helper: Im Fehlerfall genauere Angaben zur Analyse ausgeben
authorJan Büren <jan@kivitendo.de>
Wed, 23 Mar 2022 11:52:12 +0000 (12:52 +0100)
committerJan Büren <jan@kivitendo.de>
Thu, 24 Mar 2022 15:39:58 +0000 (16:39 +0100)
SL/DB/Helper/SalesPurchaseInvoice.pm

index ed1ba32..59e4697 100644 (file)
@@ -32,7 +32,7 @@ sub get_tax_and_amount_by_tax_chart_id {
     $total ||= 0;
     $total  += $transaction->amount;
   }
-  die "Invalid calculated amount" if abs($total) - abs($self->amount) > 0.001;
+  die "Invalid calculated amount. Calc: $total Amount: " . abs($self->amount) if abs($total) - abs($self->amount) > 0.001;
   return $tax_and_amount_by_tax_id;
 }