X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=997fd2c284006041dfa1049e787ee6d553dc0556;hb=e36cc2a647f25b9b8f1b9b8965f9fdef09a5cd8b;hp=04b0e9adcaea55fc19cd81e7681efc41074e5ae9;hpb=1167841707ec8fe4ac5964830cd292f129e9f98d;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 04b0e9adc..997fd2c28 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -345,6 +345,14 @@ sub account_header { } + # account where AR_tax or AP_tax is set are not orphaned if they are used as + # tax-o-matic account + if ( $form->{id} && !$form->{orphaned} && ($form->{link} =~ m/(AP_tax|AR_tax)/) ) { + if (SL::DB::Manager::Tax->find_by(chart_id => $form->{id})) { + $form->{orphaned} = 0; + } + } + my $ChartTypeIsAccount = ($form->{charttype} eq "A") ? "1":""; my $AccountIsPosted = ($form->{orphaned} ) ? "":"1"; @@ -560,7 +568,6 @@ sub list_account_details { : ( $link eq 'IC_income' ) ? $locale->text('Account Link IC_income') : ( $link eq 'IC_expense' ) ? $locale->text('Account Link IC_expense') : ( $link eq 'IC_taxservice' ) ? $locale->text('Account Link IC_taxservice') -# : ( $link eq 'CT_tax' ) ? $locale->text('Account Link CT_tax') : $locale->text('Unknown Link') . ': ' . $link; $ca->{link} .= ($link ne '') ? "[$link] ":''; }