X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=c6bb8e47c1ea6a6ca0bf4cfe6b30c7c4594adc0d;hb=088bf5a0944051fe84c0e8e3fff7991a2a172895;hp=fe9199ef0fba6f2b5b879f6cb810a2d99bab7dc7;hpb=54ea08cdb34a06dec0cb5575dc96f3d652637cc9;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index fe9199ef0..c6bb8e47c 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -31,7 +31,10 @@
#
#======================================================================
+use utf8;
+
use SL::Auth;
+use SL::Auth::PasswordPolicy;
use SL::AM;
use SL::CA;
use SL::Form;
@@ -39,6 +42,7 @@ use SL::User;
use SL::USTVA;
use SL::Iconv;
use SL::TODO;
+use SL::Printer;
use CGI::Ajax;
use CGI;
@@ -212,29 +216,29 @@ sub account_header {
my $select_eur = q|\n|;
my %eur = (
- 1 => "Umsatzerlöse",
- 2 => "sonstige Erlöse",
+ 1 => "Umsatzerlöse",
+ 2 => "sonstige Erlöse",
3 => "Privatanteile",
- 4 => "Zinserträge",
- 5 => "Ausserordentliche Erträge",
+ 4 => "Zinserträge",
+ 5 => "Ausserordentliche Erträge",
6 => "Vereinnahmte Umsatzst.",
7 => "Umsatzsteuererstattungen",
- 8 => "Wareneingänge",
- 9 => "Löhne und Gehälter",
+ 8 => "Wareneingänge",
+ 9 => "Löhne und Gehälter",
10 => "Gesetzl. sozialer Aufw.",
11 => "Mieten",
12 => "Gas, Strom, Wasser",
13 => "Instandhaltung",
- 14 => "Steuern, Versich., Beiträge",
+ 14 => "Steuern, Versich., Beiträge",
15 => "Kfz-Steuern",
16 => "Kfz-Versicherungen",
17 => "Sonst. Fahrzeugkosten",
18 => "Werbe- und Reisekosten",
19 => "Instandhaltung u. Werkzeuge",
- 20 => "Fachzeitschriften, Bücher",
- 21 => "Miete für Einrichtungen",
+ 20 => "Fachzeitschriften, Bücher",
+ 21 => "Miete für Einrichtungen",
22 => "Rechts- und Beratungskosten",
- 23 => "Bürobedarf, Porto, Telefon",
+ 23 => "Bürobedarf, Porto, Telefon",
24 => "Sonstige Aufwendungen",
25 => "Abschreibungen auf Anlagever.",
26 => "Abschreibungen auf GWG",
@@ -244,7 +248,7 @@ sub account_header {
30 => "Ausserordentlicher Aufwand",
31 => "Betriebliche Steuern");
foreach my $item (sort({ $a <=> $b } keys(%eur))) {
- my $text = H(SL::Iconv::convert("ISO-8859-15", $main::dbcharset, $eur{$item}));
+ my $text = H($::locale->{iconv_utf8}->convert($eur{$item}));
if ($item == $form->{pos_eur}) {
$select_eur .= qq|\n|;
} else {
@@ -256,30 +260,30 @@ sub account_header {
my $select_bwa = q|\n|;
my %bwapos = (
- 1 => 'Umsatzerlöse',
+ 1 => 'Umsatzerlöse',
2 => 'Best.Verdg.FE/UE',
3 => 'Aktiv.Eigenleistung',
4 => 'Mat./Wareneinkauf',
- 5 => 'So.betr.Erlöse',
+ 5 => 'So.betr.Erlöse',
10 => 'Personalkosten',
11 => 'Raumkosten',
12 => 'Betriebl.Steuern',
- 13 => 'Vers./Beiträge',
+ 13 => 'Vers./Beiträge',
14 => 'Kfz.Kosten o.St.',
15 => 'Werbe-Reisek.',
16 => 'Kosten Warenabgabe',
17 => 'Abschreibungen',
18 => 'Rep./instandhlt.',
- 19 => 'Übrige Steuern',
+ 19 => 'Ãbrige Steuern',
20 => 'Sonst.Kosten',
30 => 'Zinsauwand',
31 => 'Sonst.neutr.Aufw.',
- 32 => 'Zinserträge',
+ 32 => 'Zinserträge',
33 => 'Sonst.neutr.Ertrag',
34 => 'Verr.kalk.Kosten',
35 => 'Steuern Eink.u.Ertr.');
foreach my $item (sort({ $a <=> $b } keys %bwapos)) {
- my $text = H(SL::Iconv::convert("ISO-8859-15", $main::dbcharset, $bwapos{$item}));
+ my $text = H($::locale->{iconv_utf8}->convert($bwapos{$item}));
if ($item == $form->{pos_bwa}) {
$select_bwa .= qq|\n|;
foreach my $item ((1, 2, 3, 4)) {
if ($item == $form->{pos_bilanz}) {
@@ -331,7 +335,7 @@ sub account_header {
my %charttype = (
'A' => $locale->text('Account'),
- 'H' => $locale->text('Header'),
+ 'H' => $locale->text('Heading'),
);
foreach my $item ( sort({ $a <=> $b } keys %charttype) ) {
@@ -500,7 +504,7 @@ sub list_account {
push(@ { $form->{AJAX} }, $pjx);
- $form->{stylesheets} = "list_accounts.css";
+ $form->use_stylesheet("list_accounts.css");
$form->{title} = $locale->text('Chart of Accounts');
$form->header;
@@ -1107,7 +1111,7 @@ sub list_business {
$form->{title} = $locale->text('Type of Business');
my @column_index = qw(description discount customernumberinit);
- push @column_index, 'salesman' if $::vertreter;
+ push @column_index, 'salesman' if $::lx_office_conf{features}->{vertreter};
my %column_header;
$column_header{description} =
qq|
|
@@ -1220,7 +1224,7 @@ sub business_header {
$form->format_amount(\%myconfig, $form->{discount} * 100);
my $salesman_code;
- if ($::vertreter) {
+ if ($::lx_office_conf{features}->{vertreter}) {
$salesman_code = qq|
|
| . $locale->text('Representative') . qq| |
@@ -1869,7 +1873,7 @@ sub buchungsgruppe_header {
}
my $linkaccounts;
- if (!$main::eur) {
+ if (!$::lx_office_conf{system}->{eur}) {
$linkaccounts = qq|
| . $locale->text('Inventory') . qq| |
@@ -2014,595 +2018,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|
-
- |
-
-
-
|
-
-
-
-
-
-
-
-