SL::DB::Invoice: Eine Warning unterdrücken.
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 16 Jan 2012 17:36:30 +0000 (18:36 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 16 Jan 2012 17:36:30 +0000 (18:36 +0100)
SL/DB/Invoice.pm

index 91ee14c..14c11fa 100644 (file)
@@ -93,7 +93,7 @@ sub taxamount {
   my $self = shift;
   die 'not a setter method' if @_;
 
-  return $self->amount - $self->netamount;
+  return ($self->amount || 0) - ($self->netamount || 0);
 }
 
 __PACKAGE__->meta->make_attr_helpers(taxamount => 'numeric(15,5)');