X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fam.pl;h=1571e24c0786007956a283efa275f14be2fcf1e7;hb=3ac9bdcaf2633da20fc12464eddc946417689b48;hp=fcf7d018b65b57392380f737a49b3739ea9c3344;hpb=1beff66b3fa058377168668daac8a51092bfea5d;p=kivitendo-erp.git
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index fcf7d018b..1571e24c0 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -94,14 +94,13 @@ sub account_header {
$form->{description} =~ s/\"/"/g;
if (@{ $form->{TAXKEY} }) {
- $form->{selecttaxkey} = "
@@ -1661,15 +1675,33 @@ sub language_header {
| . $locale->text('Language') . qq| |
- |
+ |
| . $locale->text('Template Code') . qq| |
- {template_code}> |
+ |
| . $locale->text('Article Code') . qq| |
- {article_code}> |
+ |
+
+
+ | . $locale->text('Number Format') . qq| |
+ |
+
+
+ | . $locale->text('Date Format') . qq| |
+ |
+
+
+ | . $locale->text('Long Dates') . qq| |
+ {output_longdates} ? " checked" : "") .
+ qq|>| . $locale->text("Yes") .
+ qq|{output_longdates} ? "" : " checked") .
+ qq|>| . $locale->text("No") .
+ qq| |
|
@@ -1712,8 +1744,10 @@ sub add_buchungsgruppe {
"$form->{script}?action=add_buchungsgruppe&path=$form->{path}&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
AM->get_buchungsgruppe(\%myconfig, \%$form);
- if ($eur) {
- $form->{"inventory_accno_id"} = $form->{"std_inventory_accno_id"};
+ $form->{"inventory_accno_id"} = $form->{"std_inventory_accno_id"};
+ for (my $i = 0; 4 > $i; $i++) {
+ map({ $form->{"${_}_accno_id_$i"} = $form->{"std_${_}_accno_id"}; }
+ qw(income expense));
}
&buchungsgruppe_header;
@@ -1748,14 +1782,26 @@ sub list_buchungsgruppe {
$form->{title} = $locale->text('Buchungsgruppen');
- @column_index = qw(description inventory_accno income_accno_0 expense_accno_0 income_accno_1 expense_accno_1 income_accno_2 expense_accno_2 income_accno_3 expense_accno_3 );
+ @column_index = qw(up down description inventory_accno
+ income_accno_0 expense_accno_0
+ income_accno_1 expense_accno_1
+ income_accno_2 expense_accno_2
+ income_accno_3 expense_accno_3 );
+ $column_header{up} =
+ qq||
+ . qq||
+ . qq| | |;
+ $column_header{down} =
+ qq||
+ . qq||
+ . qq| | |;
$column_header{description} =
- qq||
+ qq| | |
. $locale->text('Description')
. qq| | |;
$column_header{inventory_accno} =
- qq||
+ qq| | |
. $locale->text('Bestandskonto')
. qq| | |;
$column_header{income_accno_0} =
@@ -1812,6 +1858,11 @@ sub list_buchungsgruppe {
|;
+ my $swap_link = qq|$form->{script}?action=swap_buchungsgruppen&|;
+ map({ $swap_link .= $_ . "=" . $form->escape($form->{$_}) . "&" }
+ qw(login password path));
+
+ my $row = 0;
foreach $ref (@{ $form->{ALL} }) {
$i++;
@@ -1821,6 +1872,27 @@ sub list_buchungsgruppe {
|;
+ if ($row) {
+ my $pref = $form->{ALL}->[$row - 1];
+ $column_data{up} =
+ qq|| .
+ qq|| .
+ qq|| .
+ qq| | |;
+ } else {
+ $column_data{up} = qq| | |;
+ }
+
+ if ($row == (scalar(@{ $form->{ALL} }) - 1)) {
+ $column_data{down} = qq| | |;
+ } else {
+ my $nref = $form->{ALL}->[$row + 1];
+ $column_data{down} =
+ qq|| .
+ qq|| .
+ qq|| .
+ qq| | |;
+ }
$column_data{description} =
qq|{script}?action=edit_buchungsgruppe&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} | |;
@@ -1843,6 +1915,8 @@ sub list_buchungsgruppe {
print qq|
|;
+
+ $row++;
}
print qq|
@@ -1866,14 +1940,7 @@ sub list_buchungsgruppe {
{password}>
|;
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
-
- print qq|
+ . $locale->text('Add') . qq|">
@@ -2044,6 +2111,15 @@ sub delete_buchungsgruppe {
$lxdebug->leave_sub();
}
+sub swap_buchungsgruppen {
+ $lxdebug->enter_sub();
+
+ AM->swap_sortkeys(\%myconfig, $form, "buchungsgruppen");
+ list_buchungsgruppe();
+
+ $lxdebug->leave_sub();
+}
+
sub add_printer {
$lxdebug->enter_sub();
@@ -2168,14 +2244,7 @@ sub list_printer {
{password}>
|;
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
-
- print qq|
+ . $locale->text('Add') . qq|">
@@ -2264,6 +2333,9 @@ sub add_payment {
"$form->{script}?action=add_payment&path=$form->{path}&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
+ $form->{terms_netto} = 0;
+ $form->{terms_skonto} = 0;
+ $form->{percent_skonto} = 0;
&payment_header;
&form_footer;
@@ -2276,6 +2348,8 @@ sub edit_payment {
$form->{title} = "Edit";
AM->get_payment(\%myconfig, \%$form);
+ $form->{percent_skonto} =
+ $form->format_amount(\%myconfig, $form->{percent_skonto} * 100);
&payment_header;
@@ -2290,15 +2364,23 @@ sub list_payment {
AM->payment(\%myconfig, \%$form);
- $form->{callback} =
- "$form->{script}?action=list_payment&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ $form->{callback} = build_std_url("action=list_payment");
$callback = $form->escape($form->{callback});
$form->{title} = $locale->text('Payment Terms');
- @column_index = qw(description description_long terms_netto terms_skonto percent_skonto);
+ @column_index = qw(up down description description_long terms_netto
+ terms_skonto percent_skonto);
+ $column_header{up} =
+ qq||
+ . qq||
+ . qq| | |;
+ $column_header{down} =
+ qq||
+ . qq||
+ . qq| | |;
$column_header{description} =
qq||
. $locale->text('Description')
@@ -2342,6 +2424,9 @@ sub list_payment {
|;
+ my $swap_link = build_std_url("action=swap_payment_terms");
+
+ my $row = 0;
foreach $ref (@{ $form->{ALL} }) {
$i++;
@@ -2351,21 +2436,48 @@ sub list_payment {
|
|;
+ if ($row) {
+ my $pref = $form->{ALL}->[$row - 1];
+ $column_data{up} =
+ qq|| .
+ qq|| .
+ qq|| .
+ qq| | |;
+ } else {
+ $column_data{up} = qq| | |;
+ }
+
+ if ($row == (scalar(@{ $form->{ALL} }) - 1)) {
+ $column_data{down} = qq| | |;
+ } else {
+ my $nref = $form->{ALL}->[$row + 1];
+ $column_data{down} =
+ qq|| .
+ qq|| .
+ qq|| .
+ qq| | |;
+ }
$column_data{description} =
- qq|{script}?action=edit_payment&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} | |;
- $column_data{description_long} = qq|$ref->{description_long} | |;
+ qq|{id}", "callback=$callback") .
+ qq|">| . H($ref->{description}) . qq| | |;
+ $column_data{description_long} =
+ qq|| . H($ref->{description_long}) . qq| | |;
$column_data{terms_netto} =
qq|$ref->{terms_netto} | |;
$column_data{terms_skonto} =
qq|$ref->{terms_skonto} | |;
$column_data{percent_skonto} =
- qq|$ref->{percent_skonto} % | |;
+ qq|| .
+ $form->format_amount(\%myconfig, $ref->{percent_skonto} * 100) .
+ qq|% | |;
map { print "$column_data{$_}\n" } @column_index;
print qq|
|;
+ $row++;
}
print qq|
@@ -2382,21 +2494,14 @@ sub list_payment {
-
+
{path}>
{login}>
{password}>
|;
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
-
- print qq|
+ . $locale->text('Add') . qq|">
@@ -2438,10 +2543,6 @@ sub payment_header {
| . $locale->text('Description') . qq| |
|
-
- | . $locale->text('Ranking') . qq| |
- |
-
| . $locale->text('Long Description') . qq| |
|
@@ -2469,7 +2570,9 @@ sub payment_header {
sub save_payment {
$lxdebug->enter_sub();
- $form->isblank("description", $locale->text('Language missing!'));
+ $form->isblank("description", $locale->text('Description missing!'));
+ $form->{"percent_skonto"} =
+ $form->parse_amount(\%myconfig, $form->{percent_skonto}) / 100;
AM->save_payment(\%myconfig, \%$form);
$form->redirect($locale->text('Payment Terms saved!'));
@@ -2485,6 +2588,15 @@ sub delete_payment {
$lxdebug->leave_sub();
}
+sub swap_payment_terms {
+ $lxdebug->enter_sub();
+
+ AM->swap_sortkeys(\%myconfig, $form, "payment_terms");
+ list_payment();
+
+ $lxdebug->leave_sub();
+}
+
sub add_sic {
$lxdebug->enter_sub();
@@ -2608,14 +2720,8 @@ sub list_sic {
{password}>
|;
+ . $locale->text('Add') . qq|">
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
-
- print qq|
@@ -2969,10 +3126,43 @@ sub config {
| . $locale->text('Setup Menu') . qq| |
- New
- Old |
-
+ | .
+ $locale->text("Top (CSS)") . qq|
+ | .
+ $locale->text("Top (Javascript)") . qq|
+ | .
+ $locale->text("Old (on the side)") . qq| |
+
+
+ | . $locale->text('Form details (second row)') . qq| |
+
+
+
+ |
+
+
+ | . $locale->text("Print options") . qq| |
+
+
+ | . $locale->text('Default template format') . qq| |
+ |
+
+
+ | . $locale->text('Default output medium') . qq| |
+ |
+
+
+ | . $locale->text('Default printer') . qq| |
+ |
+
+
+ | . $locale->text('Number of copies') . qq| |
+ |
+
+
+
|
@@ -2981,16 +3171,8 @@ sub config {
|
-
-
- |
|
@@ -3076,40 +3258,40 @@ sub config {
|
-
-
- | . $locale->text('Tax Accounts') . qq| |
-
-
-
-
- |
-
-
+ |;
+#
+# | . $locale->text('Tax Accounts') . qq| |
+#
+#
+#
+#
+# |
+#
+print qq|
@@ -3123,14 +3305,8 @@ sub config {
|;
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
+ . $locale->text('Save') . qq|">
- print qq|