X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/35429440e41f131dfc153e67c8ae3c2680353736..d22f2fe4829e8334eb28a17c8b45c19a3357d5f2:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 0e27f8adf..6f8438f1c 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -303,14 +303,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; + } } } @@ -362,6 +364,7 @@ sub add_ar_amount_row { chart_id => $params{chart}->id, chart_link => $params{chart}->link, transdate => $self->transdate, + gldate => $self->gldate, taxkey => $tax->taxkey, tax_id => $tax->id, project_id => $params{project_id}, @@ -376,6 +379,7 @@ sub add_ar_amount_row { chart_id => $tax->chart_id, chart_link => $tax->chart->link, transdate => $self->transdate, + gldate => $self->gldate, taxkey => $tax->taxkey, tax_id => $tax->id, );