X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fca.pl;h=12aef7aa6c86a17636732a00abbd38f40256b70c;hb=2fda509c7dc417aad28ed072e91e8ffe2396314d;hp=56ae60813eb00aa44f7a87947ebfef68d33b7788;hpb=ee072e4f077213bf6f8792ca8f0a1afebbb6282f;p=kivitendo-erp.git
diff --git a/bin/mozilla/ca.pl b/bin/mozilla/ca.pl
index 56ae60813..12aef7aa6 100644
--- a/bin/mozilla/ca.pl
+++ b/bin/mozilla/ca.pl
@@ -71,12 +71,10 @@ sub chart_of_accounts {
CA->all_accounts(\%myconfig, \%$form);
- @column_index = qw(accno gifi_accno description debit credit);
+ @column_index = qw(accno description debit credit);
$column_header{accno} =
qq|
| . $locale->text('Account') . qq| | \n|;
- $column_header{gifi_accno} =
- qq|| . $locale->text('GIFI') . qq| | \n|;
$column_header{description} =
qq|| . $locale->text('Description') . qq| | \n|;
$column_header{debit} =
@@ -107,32 +105,35 @@ sub chart_of_accounts {
foreach $ca (@{ $form->{CA} }) {
$description = $form->escape($ca->{description});
- $gifi_description = $form->escape($ca->{gifi_description});
$href =
- qq|$form->{script}?path=$form->{path}&action=list&accno=$ca->{accno}&login=$form->{login}&password=$form->{password}&description=$description&gifi_accno=$ca->{gifi_accno}&gifi_description=$gifi_description|;
+ qq|$form->{script}?action=list&accno=$ca->{accno}&login=$form->{login}&password=$form->{password}&description=$description|;
if ($ca->{charttype} eq "H") {
print qq||;
map { $column_data{$_} = "$ca->{$_} | "; } qw(accno description);
- $column_data{gifi_accno} = "$ca->{gifi_accno} | ";
} else {
$i++;
$i %= 2;
print qq|
|;
$column_data{accno} = "$ca->{accno} | ";
- $column_data{gifi_accno} =
- "$ca->{gifi_accno} | ";
$column_data{description} = "$ca->{description} | ";
}
-
+ my $debit = "";
+ my $credit = "";
+ if ($ca->{debit}) {
+ $debit = $form->format_amount(\%myconfig, $ca->{debit}, 2, " ");
+ }
+ if ($ca->{credit}) {
+ $credit = $form->format_amount(\%myconfig, $ca->{credit}, 2, " ");
+ }
$column_data{debit} =
""
- . $form->format_amount(\%myconfig, $ca->{debit}, 2, " ")
+ . $debit
. " | \n";
$column_data{credit} =
""
- . $form->format_amount(\%myconfig, $ca->{credit}, 2, " ")
+ . $credit
. " | \n";
$totaldebit += $ca->{debit};
@@ -146,7 +147,7 @@ sub chart_of_accounts {
}
map { $column_data{$_} = " | "; }
- qw(accno gifi_accno description);
+ qw(accno description);
$column_data{debit} =
""
@@ -177,11 +178,7 @@ sub list {
$lxdebug->enter_sub();
$form->{title} = $locale->text('List Transactions');
- if ($form->{accounttype} eq 'gifi') {
- $form->{title} .= " - " . $locale->text('GIFI') . " $form->{gifi_accno}";
- } else {
- $form->{title} .= " - " . $locale->text('Account') . " $form->{accno}";
- }
+ $form->{title} .= " - " . $locale->text('Account') . " $form->{accno}";
# get departments
$form->all_departments(\%myconfig);
@@ -203,7 +200,7 @@ sub list {
$form->header;
- map { $form->{$_} =~ s/\"/"/g; } qw(description gifi_description);
+ $form->{description} =~ s/\"/"/g;
print qq|
@@ -215,8 +212,6 @@ sub list {
{accounttype}>
-{gifi_accno}>
-
@@ -245,7 +239,6 @@ sub list {
{login}>
-{path}>
{password}>
{script}?path=$form->{path}&action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&gifi_accno=$form->{gifi_accno}&gifi_description=$gifi_description&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title";
+ "$form->{script}?action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title";
$description = $form->escape($form->{description}, 1);
- $gifi_description = $form->escape($form->{gifi_description}, 1);
$department = $form->escape($form->{department}, 1);
$projectnumber = $form->escape($form->{projectnumber}, 1);
$title = $form->escape($form->{title}, 1);
# construct callback
$callback =
- "$form->{script}?path=$form->{path}&action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&gifi_accno=$form->{gifi_accno}&gifi_description=$gifi_description&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title";
+ "$form->{script}?action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title";
# figure out which column comes first
$column_header{transdate} =
@@ -304,19 +295,12 @@ sub list_transactions {
@column_index =
$form->sort_columns(qw(transdate reference description debit credit));
- if ($form->{accounttype} eq 'gifi') {
- map { $form->{$_} = $form->{"gifi_$_"} } qw(accno description);
- }
if ($form->{accno}) {
push @column_index, "balance";
}
- $form->{title} =
- ($form->{accounttype} eq 'gifi')
- ? $locale->text('GIFI')
- : $locale->text('Account');
-
- $form->{title} .= " $form->{accno} - $form->{description}";
+ $form->{title} = $locale->text('Account') .
+ " $form->{accno} - $form->{description}";
if ($form->{department}) {
($department) = split /--/, $form->{department};
@@ -406,14 +390,13 @@ sub list_transactions {
# construct link to source
$href =
- "{module}.pl?path=$form->{path}&action=edit&id=$ca->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{reference}";
-
+ "{module}.pl?action=edit&id=$ca->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{reference}";
+ my $debit = ($ca->{debit} != 0) ? $form->format_amount(\%myconfig, $ca->{debit}, 2, " ") : " ";
$column_data{debit} =
- " | "
- . $form->format_amount(\%myconfig, $ca->{debit}, 2, " ") . " | ";
+ "$debit | ";
+ my $credit = ($ca->{credit} != 0) ? $form->format_amount(\%myconfig, $ca->{credit}, 2, " ") : " ";
$column_data{credit} =
- ""
- . $form->format_amount(\%myconfig, $ca->{credit}, 2, " ") . " | ";
+ "$credit | ";
$form->{balance} += $ca->{amount};
$column_data{balance} =