X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=d9d484269d0e26c55810f58f36cf99e8eb39c74c;hb=a3f90d6fa23d0a8d026682511e7624bd847d532f;hp=e6bf0fc753f4c5cff1af7d8aaf8245062ed18d04;hpb=031251fb29209279fd44f1e564a255753c4e6176;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index e6bf0fc75..d9d484269 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -194,7 +194,7 @@ sub account_header {
}
# Newaccount Folgekonto
- if (@{ $form->{NEWACCOUNT} }) {
+ if (@{ $form->{NEWACCOUNT} || [] }) {
if (!$form->{new_chart_valid}) {
$form->{selectnewaccount} = qq||;
}
@@ -727,7 +727,7 @@ sub list_department {
map { print "$column_data{$_}\n" } @column_index;
print qq|
-
+
|;
}
@@ -929,7 +929,7 @@ sub list_lead {
map { print "$column_header{$_}\n" } @column_index;
print qq|
-
+
|;
my ($i, %column_data);
@@ -939,17 +939,17 @@ sub list_lead {
$i %= 2;
print qq|
-
+
|;
-# $lead = $ref->{lead};
+# $lead = $ref->{lead};
$column_data{description} = qq|$ref->{lead} | |;
map { print "$column_data{$_}\n" } @column_index;
print qq|
-
+
|;
}
@@ -1107,6 +1107,7 @@ sub list_business {
$form->{title} = $locale->text('Type of Business');
my @column_index = qw(description discount customernumberinit);
+ push @column_index, 'salesman' if $::vertreter;
my %column_header;
$column_header{description} =
qq||
@@ -1120,6 +1121,10 @@ sub list_business {
qq| | |
. $locale->text('Customernumberinit')
. qq| | |;
+ $column_header{salesman} =
+ qq||
+ . $locale->text('Representative')
+ . qq| | |;
$form->header;
@@ -1159,11 +1164,12 @@ sub list_business {
$column_data{discount} = qq|$discount | |;
$column_data{customernumberinit} =
qq|$ref->{customernumberinit} | |;
+ $column_data{salesman} = '' . ($ref->{salesman} ? $::locale->text('Yes') : $::locale->text('No')) . ' | ';
map { print "$column_data{$_}\n" } @column_index;
print qq|
-
+
|;
}
@@ -1213,6 +1219,18 @@ sub business_header {
$form->{discount} =
$form->format_amount(\%myconfig, $form->{discount} * 100);
+ my $salesman_code;
+ if ($::vertreter) {
+ $salesman_code = qq|
+
+ | . $locale->text('Representative') . qq| |
+ | . $::cgi->checkbox(-name => "salesman", -value => 1, -label => '', 'checked' => $form->{salesman} ? 1 : 0) . qq| |
+
+|;
+ } else {
+ $salesman_code = $::cgi->hidden(-name => 'salesman', -value => $form->{salesman} ? 1 : 0);
+ }
+
$form->header;
print qq|
@@ -1240,6 +1258,7 @@ sub business_header {
| . $locale->text('Customernumberinit') . qq| |
{customernumberinit}> |
+$salesman_code
|
@@ -1417,7 +1436,7 @@ sub list_language {
map { print "$column_data{$_}\n" } @column_index;
print qq|
-
+
|;
}
@@ -1769,7 +1788,7 @@ sub list_buchungsgruppe {
map { print "$column_data{$_}\n" } @column_index;
print qq|
-
+
|;
$row++;
@@ -1853,10 +1872,10 @@ sub buchungsgruppe_header {
if (!$main::eur) {
$linkaccounts = qq|
- | . $locale->text('Inventory') . qq| |
- |
-
-
|;
+ | . $locale->text('Inventory') . qq| |
+ |
+
+ |;
} else {
$linkaccounts = qq|
{inventory_accno_id}>|;
@@ -1864,28 +1883,28 @@ sub buchungsgruppe_header {
$linkaccounts .= qq|
-
- | . $locale->text('National Revenues') . qq| |
- |
-
-
- | . $locale->text('National Expenses') . qq| |
- |
-
|;
+
+ | . $locale->text('National Revenues') . qq| |
+ |
+
+
+ | . $locale->text('National Expenses') . qq| |
+ |
+
|;
if ($form->{id}) {
$form->{selectIC_income} =~ s/selected//g;
$form->{selectIC_income} =~ s/ value=\Q$form->{income_accno_id_1}\E/ value=$form->{income_accno_id_1} selected/;
$form->{selectIC_expense} =~ s/selected//g;
$form->{selectIC_expense} =~ s/ value=\Q$form->{expense_accno_id_1}\E/ value=$form->{expense_accno_id_1} selected/;
}
- $linkaccounts .= qq|
- | . $locale->text('Revenues EU with UStId') . qq| |
- |
-
-
- | . $locale->text('Expenses EU with UStId') . qq| |
- |
-
|;
+ $linkaccounts .= qq|
+ | . $locale->text('Revenues EU with UStId') . qq| |
+ |
+
+
+ | . $locale->text('Expenses EU with UStId') . qq| |
+ |
+
|;
if ($form->{id}) {
$form->{selectIC_income} =~ s/selected//g;
@@ -1894,14 +1913,14 @@ sub buchungsgruppe_header {
$form->{selectIC_expense} =~ s/ value=\Q$form->{expense_accno_id_2}\E/ value=$form->{expense_accno_id_2} selected/;
}
- $linkaccounts .= qq|
- | . $locale->text('Revenues EU without UStId') . qq| |
- |
-
-
- | . $locale->text('Expenses EU without UStId') . qq| |
- |
-
|;
+ $linkaccounts .= qq|
+ | . $locale->text('Revenues EU without UStId') . qq| |
+ |
+
+
+ | . $locale->text('Expenses EU without UStId') . qq| |
+ |
+
|;
if ($form->{id}) {
$form->{selectIC_income} =~ s/selected//g;
@@ -1910,14 +1929,14 @@ sub buchungsgruppe_header {
$form->{selectIC_expense} =~ s/ value=\Q$form->{expense_accno_id_3}\E/ value=$form->{expense_accno_id_3} selected/;
}
- $linkaccounts .= qq|
- | . $locale->text('Foreign Revenues') . qq| |
- |
-
-
- | . $locale->text('Foreign Expenses') . qq| |
- |
-
+ $linkaccounts .= qq|
+ | . $locale->text('Foreign Revenues') . qq| |
+ |
+
+
+ | . $locale->text('Foreign Expenses') . qq| |
+ |
+
|;
@@ -1995,234 +2014,6 @@ sub swap_buchungsgruppen {
$main::lxdebug->leave_sub();
}
-
-sub add_printer {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
-
- $main::auth->assert('config');
-
- $form->{title} = "Add";
-
- $form->{callback} = "am.pl?action=add_printer" unless $form->{callback};
-
- &printer_header;
- &form_footer;
-
- $main::lxdebug->leave_sub();
-}
-
-sub edit_printer {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
- my %myconfig = %main::myconfig;
-
- $main::auth->assert('config');
-
- $form->{title} = "Edit";
-
- AM->get_printer(\%myconfig, \%$form);
-
- &printer_header;
-
- $form->{orphaned} = 1;
- &form_footer;
-
- $main::lxdebug->leave_sub();
-}
-
-sub list_printer {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
- my %myconfig = %main::myconfig;
- my $locale = $main::locale;
-
- $main::auth->assert('config');
-
- AM->printer(\%myconfig, \%$form);
-
- $form->{callback} = "am.pl?action=list_printer";
-
- my $callback = $form->escape($form->{callback});
-
- $form->{title} = $locale->text('Printer');
-
- my @column_index = qw(printer_description printer_command template_code);
- my %column_header;
- $column_header{printer_description} =
- qq||
- . $locale->text('Printer Description')
- . qq| | |;
- $column_header{printer_command} =
- qq||
- . $locale->text('Printer Command')
- . qq| | |;
- $column_header{template_code} =
- qq||
- . $locale->text('Template Code')
- . qq| | |;
-
- $form->header;
-
- print qq|
-
-
-
-
- $form->{title} |
-
-
-
-
-
-
-|;
-
- map { print "$column_header{$_}\n" } @column_index;
-
- print qq|
-
-|;
-
- my ($i, %column_data);
- foreach my $ref (@{ $form->{ALL} }) {
-
- $i++;
- $i %= 2;
-
- print qq|
-
-|;
-
-
- $column_data{printer_description} = qq|$ref->{printer_description} | |;
- $column_data{printer_command} = qq|$ref->{printer_command} | |;
- $column_data{template_code} =
- qq|$ref->{template_code} | |;
-
- map { print "$column_data{$_}\n" } @column_index;
-
- print qq|
-
-|;
- }
-
- print qq|
-
- |
-
-
-
|
-
-
-
-
-
-
-
-