X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FInvoice.pm;h=f33d75dca57ec582a405c492d1e7a77f5510814c;hb=5e9f08d41ced9d75d868621c43b9b639e9e1b781;hp=38ec9c0f7549f56c84ce27ee5e7b8f5e24979df7;hpb=df1838155963d6de56cfb001365982a292820f45;p=kivitendo-erp.git diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 38ec9c0f7..f33d75dca 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -13,9 +13,11 @@ use SL::DB::Helper::AttrHTML; use SL::DB::Helper::AttrSorted; use SL::DB::Helper::FlattenToForm; use SL::DB::Helper::LinkedRecords; +use SL::DB::Helper::PDF_A; use SL::DB::Helper::PriceTaxCalculator; use SL::DB::Helper::PriceUpdater; use SL::DB::Helper::TransNumberGenerator; +use SL::DB::Helper::ZUGFeRD; use SL::Locale::String qw(t8); use SL::DB::CustomVariable; @@ -303,14 +305,16 @@ sub _post_add_acctrans { $chart_link = SL::DB::Manager::Chart->find_by(id => $chart_id)->{'link'}; $chart_link ||= ''; - SL::DB::AccTransaction->new(trans_id => $self->id, - chart_id => $chart_id, - amount => $spec->{amount}, - tax_id => $spec->{tax_id}, - taxkey => $spec->{taxkey}, - project_id => $self->globalproject_id, - transdate => $self->transdate, - chart_link => $chart_link)->save; + if ($spec->{amount} != 0) { + SL::DB::AccTransaction->new(trans_id => $self->id, + chart_id => $chart_id, + amount => $spec->{amount}, + tax_id => $spec->{tax_id}, + taxkey => $spec->{taxkey}, + project_id => $self->globalproject_id, + transdate => $self->transdate, + chart_link => $chart_link)->save; + } } }