projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Löschen und Häkchen Ändern bei Konten, die als Automatikkonten für andere Konten...
[kivitendo-erp.git]
/
bin
/
mozilla
/
am.pl
diff --git
a/bin/mozilla/am.pl
b/bin/mozilla/am.pl
index
111e14e
..
997fd2c
100644
(file)
--- a/
bin/mozilla/am.pl
+++ b/
bin/mozilla/am.pl
@@
-43,7
+43,6
@@
use SL::USTVA;
use SL::Iconv;
use SL::TODO;
use SL::Printer;
use SL::Iconv;
use SL::TODO;
use SL::Printer;
-use CGI::Ajax;
use CGI;
require "bin/mozilla/common.pl";
use CGI;
require "bin/mozilla/common.pl";
@@
-346,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";
my $ChartTypeIsAccount = ($form->{charttype} eq "A") ? "1":"";
my $AccountIsPosted = ($form->{orphaned} ) ? "":"1";
@@
-495,15
+502,6
@@
sub list_account {
$ca->{link_edit_account} = $link_edit_account . '&id=' . E($ca->{id});
}
$ca->{link_edit_account} = $link_edit_account . '&id=' . E($ca->{id});
}
- # Ajax
- my $pjx = new CGI::Ajax('list_account_details' => build_std_url('action=list_account_details'));
-
- # Eneable AJAX debuging
- #$pjx->DEBUG(1);
- #$pjx->JSDEBUG(1);
-
- push(@ { $form->{AJAX} }, $pjx);
-
$form->use_stylesheet("list_accounts.css");
$form->{title} = $locale->text('Chart of Accounts');
$form->use_stylesheet("list_accounts.css");
$form->{title} = $locale->text('Chart of Accounts');
@@
-570,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 '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] ":'';
}
: $locale->text('Unknown Link') . ': ' . $link;
$ca->{link} .= ($link ne '') ? "[$link] ":'';
}
@@
-586,9
+583,8
@@
sub list_account_details {
}
$form->{title} = $locale->text('Chart of Accounts');
}
$form->{title} = $locale->text('Chart of Accounts');
- $form->header();
- print $form->parse_html_template('am/list_account_details');
+ print $form->
ajax_response_header, $form->
parse_html_template('am/list_account_details');
$main::lxdebug->leave_sub();
$main::lxdebug->leave_sub();
@@
-2051,7
+2047,8
@@
sub show_am_history {
my $dbh = $form->dbconnect(\%myconfig);
my $dbh = $form->dbconnect(\%myconfig);
- my $restriction = qq| AND (| . join(' OR ', map { " addition = " . $dbh->quote($_) } split(m/\,/, $form->{einschraenkungen})) . qq|)| if $form->{einschraenkungen};
+ my $restriction;
+ $restriction = qq| AND (| . join(' OR ', map { " addition = " . $dbh->quote($_) } split(m/\,/, $form->{einschraenkungen})) . qq|)| if $form->{einschraenkungen};
$restriction .= qq| AND h.itime::date >= | . conv_dateq($form->{fromdate}) if $form->{fromdate};
$restriction .= qq| AND h.itime::date <= | . conv_dateq($form->{todate}) if $form->{todate};
if ($form->{mitarbeiter} =~ m/^\d+$/) {
$restriction .= qq| AND h.itime::date >= | . conv_dateq($form->{fromdate}) if $form->{fromdate};
$restriction .= qq| AND h.itime::date <= | . conv_dateq($form->{todate}) if $form->{todate};
if ($form->{mitarbeiter} =~ m/^\d+$/) {