Revision dbbf8923
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
880 | 880 |
# connect to database |
881 | 881 |
my $dbh = $form->dbconnect_noauto($myconfig); |
882 | 882 |
|
883 |
foreach my $table (qw(translation_payment_terms units_language)) {
|
|
883 |
foreach my $table (qw(generic_translations units_language)) {
|
|
884 | 884 |
$query = qq|DELETE FROM $table WHERE language_id = ?|; |
885 | 885 |
do_query($form, $dbh, $query, $form->{"id"}); |
886 | 886 |
} |
... | ... | |
1124 | 1124 |
$main::lxdebug->leave_sub(); |
1125 | 1125 |
} |
1126 | 1126 |
|
1127 |
sub payment { |
|
1128 |
$main::lxdebug->enter_sub(); |
|
1129 |
|
|
1130 |
my ($self, $myconfig, $form) = @_; |
|
1131 |
|
|
1132 |
# connect to database |
|
1133 |
my $dbh = $form->dbconnect($myconfig); |
|
1134 |
|
|
1135 |
my $query = qq|SELECT * FROM payment_terms ORDER BY sortkey|; |
|
1136 |
|
|
1137 |
my $sth = $dbh->prepare($query); |
|
1138 |
$sth->execute || $form->dberror($query); |
|
1139 |
|
|
1140 |
$form->{ALL} = []; |
|
1141 |
while (my $ref = $sth->fetchrow_hashref("NAME_lc")) { |
|
1142 |
push @{ $form->{ALL} }, $ref; |
|
1143 |
} |
|
1144 |
|
|
1145 |
$sth->finish; |
|
1146 |
$dbh->disconnect; |
|
1147 |
|
|
1148 |
$main::lxdebug->leave_sub(); |
|
1149 |
} |
|
1150 |
|
|
1151 |
sub get_payment { |
|
1152 |
$main::lxdebug->enter_sub(); |
|
1153 |
|
|
1154 |
my ($self, $myconfig, $form) = @_; |
|
1155 |
|
|
1156 |
# connect to database |
|
1157 |
my $dbh = $form->dbconnect($myconfig); |
|
1158 |
|
|
1159 |
my $query = qq|SELECT * FROM payment_terms WHERE id = ?|; |
|
1160 |
my $sth = $dbh->prepare($query); |
|
1161 |
$sth->execute($form->{"id"}) || $form->dberror($query . " ($form->{id})"); |
|
1162 |
|
|
1163 |
my $ref = $sth->fetchrow_hashref("NAME_lc"); |
|
1164 |
map { $form->{$_} = $ref->{$_} } keys %$ref; |
|
1165 |
$sth->finish(); |
|
1166 |
|
|
1167 |
$query = |
|
1168 |
qq|SELECT t.language_id, t.description_long, l.description AS language | . |
|
1169 |
qq|FROM translation_payment_terms t | . |
|
1170 |
qq|LEFT JOIN language l ON t.language_id = l.id | . |
|
1171 |
qq|WHERE t.payment_terms_id = ? | . |
|
1172 |
qq|UNION | . |
|
1173 |
qq|SELECT l.id AS language_id, NULL AS description_long, | . |
|
1174 |
qq| l.description AS language | . |
|
1175 |
qq|FROM language l|; |
|
1176 |
$sth = $dbh->prepare($query); |
|
1177 |
$sth->execute($form->{"id"}) || $form->dberror($query . " ($form->{id})"); |
|
1178 |
|
|
1179 |
my %mapping; |
|
1180 |
while (my $ref = $sth->fetchrow_hashref("NAME_lc")) { |
|
1181 |
$mapping{ $ref->{"language_id"} } = $ref |
|
1182 |
unless (defined($mapping{ $ref->{"language_id"} })); |
|
1183 |
} |
|
1184 |
$sth->finish; |
|
1185 |
|
|
1186 |
$form->{"TRANSLATION"} = [sort({ $a->{"language"} cmp $b->{"language"} } |
|
1187 |
values(%mapping))]; |
|
1188 |
|
|
1189 |
$dbh->disconnect; |
|
1190 |
|
|
1191 |
$main::lxdebug->leave_sub(); |
|
1192 |
} |
|
1193 |
|
|
1194 |
sub save_payment { |
|
1195 |
$main::lxdebug->enter_sub(); |
|
1196 |
|
|
1197 |
my ($self, $myconfig, $form) = @_; |
|
1198 |
|
|
1199 |
# connect to database |
|
1200 |
my $dbh = $form->dbconnect_noauto($myconfig); |
|
1201 |
|
|
1202 |
my $query; |
|
1203 |
|
|
1204 |
if (!$form->{id}) { |
|
1205 |
$query = qq|SELECT nextval('id'), COALESCE(MAX(sortkey) + 1, 1) | . |
|
1206 |
qq|FROM payment_terms|; |
|
1207 |
my $sortkey; |
|
1208 |
($form->{id}, $sortkey) = selectrow_query($form, $dbh, $query); |
|
1209 |
|
|
1210 |
$query = qq|INSERT INTO payment_terms (id, sortkey) VALUES (?, ?)|; |
|
1211 |
do_query($form, $dbh, $query, $form->{id}, $sortkey); |
|
1212 |
|
|
1213 |
} else { |
|
1214 |
$query = |
|
1215 |
qq|DELETE FROM translation_payment_terms | . |
|
1216 |
qq|WHERE payment_terms_id = ?|; |
|
1217 |
do_query($form, $dbh, $query, $form->{"id"}); |
|
1218 |
} |
|
1219 |
|
|
1220 |
$query = qq|UPDATE payment_terms SET |
|
1221 |
description = ?, description_long = ?, |
|
1222 |
terms_netto = ?, terms_skonto = ?, |
|
1223 |
percent_skonto = ? |
|
1224 |
WHERE id = ?|; |
|
1225 |
my @values = ($form->{description}, $form->{description_long}, |
|
1226 |
$form->{terms_netto} * 1, $form->{terms_skonto} * 1, |
|
1227 |
$form->{percent_skonto} * 1, |
|
1228 |
$form->{id}); |
|
1229 |
do_query($form, $dbh, $query, @values); |
|
1230 |
|
|
1231 |
$query = qq|SELECT id FROM language|; |
|
1232 |
my @language_ids; |
|
1233 |
my $sth = $dbh->prepare($query); |
|
1234 |
$sth->execute() || $form->dberror($query); |
|
1235 |
|
|
1236 |
while (my ($id) = $sth->fetchrow_array()) { |
|
1237 |
push(@language_ids, $id); |
|
1238 |
} |
|
1239 |
$sth->finish(); |
|
1240 |
|
|
1241 |
$query = |
|
1242 |
qq|INSERT INTO translation_payment_terms | . |
|
1243 |
qq|(language_id, payment_terms_id, description_long) | . |
|
1244 |
qq|VALUES (?, ?, ?)|; |
|
1245 |
$sth = $dbh->prepare($query); |
|
1246 |
|
|
1247 |
foreach my $language_id (@language_ids) { |
|
1248 |
do_statement($form, $sth, $query, $language_id, $form->{"id"}, |
|
1249 |
$form->{"description_long_${language_id}"}); |
|
1250 |
} |
|
1251 |
$sth->finish(); |
|
1252 |
|
|
1253 |
$dbh->commit(); |
|
1254 |
$dbh->disconnect; |
|
1255 |
|
|
1256 |
$main::lxdebug->leave_sub(); |
|
1257 |
} |
|
1258 |
|
|
1259 |
sub delete_payment { |
|
1260 |
$main::lxdebug->enter_sub(); |
|
1261 |
|
|
1262 |
my ($self, $myconfig, $form) = @_; |
|
1263 |
|
|
1264 |
# connect to database |
|
1265 |
my $dbh = $form->dbconnect_noauto($myconfig); |
|
1266 |
|
|
1267 |
my $query = |
|
1268 |
qq|DELETE FROM translation_payment_terms WHERE payment_terms_id = ?|; |
|
1269 |
do_query($form, $dbh, $query, $form->{"id"}); |
|
1270 |
|
|
1271 |
$query = qq|DELETE FROM payment_terms WHERE id = ?|; |
|
1272 |
do_query($form, $dbh, $query, $form->{"id"}); |
|
1273 |
|
|
1274 |
$dbh->commit(); |
|
1275 |
$dbh->disconnect; |
|
1276 |
|
|
1277 |
$main::lxdebug->leave_sub(); |
|
1278 |
} |
|
1279 |
|
|
1280 |
|
|
1281 | 1127 |
sub prepare_template_filename { |
1282 | 1128 |
$main::lxdebug->enter_sub(); |
1283 | 1129 |
|
SL/Controller/PaymentTerm.pm | ||
---|---|---|
1 |
package SL::Controller::PaymentTerm; |
|
2 |
|
|
3 |
use strict; |
|
4 |
|
|
5 |
use parent qw(SL::Controller::Base); |
|
6 |
|
|
7 |
use SL::DB::PaymentTerm; |
|
8 |
use SL::DB::Language; |
|
9 |
use SL::Helper::Flash; |
|
10 |
|
|
11 |
use Rose::Object::MakeMethods::Generic |
|
12 |
( |
|
13 |
scalar => [ qw(payment_term languages) ], |
|
14 |
); |
|
15 |
|
|
16 |
__PACKAGE__->run_before('load_payment_term', only => [ qw( edit update destroy move_up move_down) ]); |
|
17 |
__PACKAGE__->run_before('load_languages', only => [ qw(new list edit create update) ]); |
|
18 |
|
|
19 |
# |
|
20 |
# actions |
|
21 |
# |
|
22 |
|
|
23 |
sub action_list { |
|
24 |
my ($self) = @_; |
|
25 |
|
|
26 |
$self->render('payment_term/list', |
|
27 |
title => $::locale->text('Payment terms'), |
|
28 |
PAYMENT_TERMS => SL::DB::Manager::PaymentTerm->get_all_sorted); |
|
29 |
} |
|
30 |
|
|
31 |
sub action_new { |
|
32 |
my ($self) = @_; |
|
33 |
|
|
34 |
$self->{payment_term} = SL::DB::PaymentTerm->new; |
|
35 |
$self->render('payment_term/form', title => $::locale->text('Create a new payment term')); |
|
36 |
} |
|
37 |
|
|
38 |
sub action_edit { |
|
39 |
my ($self) = @_; |
|
40 |
$self->render('payment_term/form', title => $::locale->text('Edit payment term')); |
|
41 |
} |
|
42 |
|
|
43 |
sub action_create { |
|
44 |
my ($self) = @_; |
|
45 |
|
|
46 |
$self->{payment_term} = SL::DB::PaymentTerm->new; |
|
47 |
$self->create_or_update; |
|
48 |
} |
|
49 |
|
|
50 |
sub action_update { |
|
51 |
my ($self) = @_; |
|
52 |
$self->create_or_update; |
|
53 |
} |
|
54 |
|
|
55 |
sub action_destroy { |
|
56 |
my ($self) = @_; |
|
57 |
|
|
58 |
if (eval { $self->{payment_term}->delete; 1; }) { |
|
59 |
flash_later('info', $::locale->text('The payment term has been deleted.')); |
|
60 |
} else { |
|
61 |
flash_later('error', $::locale->text('The payment term is in use and cannot be deleted.')); |
|
62 |
} |
|
63 |
|
|
64 |
$self->redirect_to(action => 'list'); |
|
65 |
} |
|
66 |
|
|
67 |
sub action_move_up { |
|
68 |
my ($self) = @_; |
|
69 |
$self->{payment_term}->move_position_up; |
|
70 |
$self->redirect_to(action => 'list'); |
|
71 |
} |
|
72 |
|
|
73 |
sub action_move_down { |
|
74 |
my ($self) = @_; |
|
75 |
$self->{payment_term}->move_position_down; |
|
76 |
$self->redirect_to(action => 'list'); |
|
77 |
} |
|
78 |
|
|
79 |
# |
|
80 |
# helpers |
|
81 |
# |
|
82 |
|
|
83 |
sub create_or_update { |
|
84 |
my $self = shift; |
|
85 |
my $is_new = !$self->{payment_term}->id; |
|
86 |
my $params = delete($::form->{payment_term}) || { }; |
|
87 |
|
|
88 |
$self->{payment_term}->assign_attributes(%{ $params }); |
|
89 |
|
|
90 |
my @errors = $self->{payment_term}->validate; |
|
91 |
|
|
92 |
if (@errors) { |
|
93 |
flash('error', @errors); |
|
94 |
$self->render('payment_term/form', title => $is_new ? $::locale->text('Create a new payment term') : $::locale->text('Edit payment term')); |
|
95 |
return; |
|
96 |
} |
|
97 |
|
|
98 |
$self->{payment_term}->save; |
|
99 |
foreach my $language (@{ $self->{languages} }) { |
|
100 |
$self->{payment_term}->save_attribute_translation('description_long', $language, $::form->{"translation_" . $language->id}); |
|
101 |
} |
|
102 |
|
|
103 |
flash_later('info', $is_new ? $::locale->text('The payment term has been created.') : $::locale->text('The payment term has been saved.')); |
|
104 |
$self->redirect_to(action => 'list'); |
|
105 |
} |
|
106 |
|
|
107 |
sub load_payment_term { |
|
108 |
my ($self) = @_; |
|
109 |
$self->{payment_term} = SL::DB::PaymentTerm->new(id => $::form->{id})->load; |
|
110 |
} |
|
111 |
|
|
112 |
sub load_languages { |
|
113 |
my ($self) = @_; |
|
114 |
$self->{languages} = SL::DB::Manager::Language->get_all_sorted; |
|
115 |
} |
|
116 |
|
|
117 |
1; |
SL/DB/Manager/PaymentTerm.pm | ||
---|---|---|
1 |
package SL::DB::Manager::PaymentTerm; |
|
2 |
|
|
3 |
use strict; |
|
4 |
|
|
5 |
use SL::DB::Helper::Manager; |
|
6 |
use base qw(SL::DB::Helper::Manager); |
|
7 |
|
|
8 |
use SL::DB::Helper::Sorted; |
|
9 |
|
|
10 |
sub object_class { 'SL::DB::PaymentTerm' } |
|
11 |
|
|
12 |
__PACKAGE__->make_manager_methods; |
|
13 |
|
|
14 |
sub _sort_spec { |
|
15 |
return ( default => [ 'sortkey', 1 ], |
|
16 |
columns => { SIMPLE => 'ALL', |
|
17 |
map { ( $_ => "lower(payment_terms.${_})" ) } qw(description description_long), |
|
18 |
}); |
|
19 |
} |
|
20 |
|
|
21 |
1; |
SL/DB/PaymentTerm.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 | 1 |
package SL::DB::PaymentTerm; |
5 | 2 |
|
6 | 3 |
use strict; |
7 | 4 |
|
8 | 5 |
use SL::DB::MetaSetup::PaymentTerm; |
6 |
use SL::DB::Manager::PaymentTerm; |
|
7 |
use SL::DB::Helper::ActsAsList; |
|
8 |
use SL::DB::Helper::TranslatedAttributes; |
|
9 |
|
|
10 |
sub validate { |
|
11 |
my ($self) = @_; |
|
12 |
|
|
13 |
my @errors; |
|
14 |
push @errors, $::locale->text('The description is missing.') if !$self->description; |
|
15 |
push @errors, $::locale->text('The long description is missing.') if !$self->description_long; |
|
9 | 16 |
|
10 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
|
|
11 |
__PACKAGE__->meta->make_manager_class;
|
|
17 |
return @errors;
|
|
18 |
}
|
|
12 | 19 |
|
13 | 20 |
1; |
SL/Form.pm | ||
---|---|---|
1904 | 1904 |
|
1905 | 1905 |
if ($self->{"language_id"}) { |
1906 | 1906 |
$query = |
1907 |
qq|SELECT t.description_long, l.output_numberformat, l.output_dateformat, l.output_longdates | .
|
|
1908 |
qq|FROM translation_payment_terms t | .
|
|
1907 |
qq|SELECT t.translation, l.output_numberformat, l.output_dateformat, l.output_longdates | .
|
|
1908 |
qq|FROM generic_translations t | .
|
|
1909 | 1909 |
qq|LEFT JOIN language l ON t.language_id = l.id | . |
1910 |
qq|WHERE (t.language_id = ?) AND (t.payment_terms_id = ?)|; |
|
1910 |
qq|WHERE (t.language_id = ?) |
|
1911 |
AND (t.translation_id = ?) |
|
1912 |
AND (t.translation_type = 'SL::DB::PaymentTerm/description_long')|; |
|
1911 | 1913 |
my ($description_long, $output_numberformat, $output_dateformat, |
1912 | 1914 |
$output_longdates) = |
1913 | 1915 |
selectrow_query($self, $dbh, $query, |
bin/mozilla/am.pl | ||
---|---|---|
2018 | 2018 |
$main::lxdebug->leave_sub(); |
2019 | 2019 |
} |
2020 | 2020 |
|
2021 |
sub add_payment { |
|
2022 |
$main::lxdebug->enter_sub(); |
|
2023 |
|
|
2024 |
my $form = $main::form; |
|
2025 |
my %myconfig = %main::myconfig; |
|
2026 |
|
|
2027 |
$main::auth->assert('config'); |
|
2028 |
|
|
2029 |
$form->{title} = "Add"; |
|
2030 |
|
|
2031 |
$form->{callback} = "am.pl?action=add_payment" unless $form->{callback}; |
|
2032 |
|
|
2033 |
$form->{terms_netto} = 0; |
|
2034 |
$form->{terms_skonto} = 0; |
|
2035 |
$form->{percent_skonto} = 0; |
|
2036 |
my @languages = AM->language(\%myconfig, $form, 1); |
|
2037 |
map({ $_->{"language"} = $_->{"description"}; |
|
2038 |
$_->{"language_id"} = $_->{"id"}; } @languages); |
|
2039 |
$form->{"TRANSLATION"} = \@languages; |
|
2040 |
&payment_header; |
|
2041 |
&form_footer; |
|
2042 |
|
|
2043 |
$main::lxdebug->leave_sub(); |
|
2044 |
} |
|
2045 |
|
|
2046 |
sub edit_payment { |
|
2047 |
$main::lxdebug->enter_sub(); |
|
2048 |
|
|
2049 |
my $form = $main::form; |
|
2050 |
my %myconfig = %main::myconfig; |
|
2051 |
|
|
2052 |
$main::auth->assert('config'); |
|
2053 |
|
|
2054 |
$form->{title} = "Edit"; |
|
2055 |
|
|
2056 |
AM->get_payment(\%myconfig, $form); |
|
2057 |
$form->{percent_skonto} = |
|
2058 |
$form->format_amount(\%myconfig, $form->{percent_skonto} * 100); |
|
2059 |
|
|
2060 |
&payment_header; |
|
2061 |
|
|
2062 |
$form->{orphaned} = 1; |
|
2063 |
&form_footer; |
|
2064 |
|
|
2065 |
$main::lxdebug->leave_sub(); |
|
2066 |
} |
|
2067 |
|
|
2068 |
sub list_payment { |
|
2069 |
$main::lxdebug->enter_sub(); |
|
2070 |
|
|
2071 |
my $form = $main::form; |
|
2072 |
my %myconfig = %main::myconfig; |
|
2073 |
my $locale = $main::locale; |
|
2074 |
|
|
2075 |
$main::auth->assert('config'); |
|
2076 |
|
|
2077 |
AM->payment(\%myconfig, \%$form); |
|
2078 |
|
|
2079 |
$form->{callback} = build_std_url("action=list_payment"); |
|
2080 |
|
|
2081 |
my $callback = $form->escape($form->{callback}); |
|
2082 |
|
|
2083 |
$form->{title} = $locale->text('Payment Terms'); |
|
2084 |
|
|
2085 |
my @column_index = qw(up down description description_long terms_netto |
|
2086 |
terms_skonto percent_skonto); |
|
2087 |
my %column_header; |
|
2088 |
$column_header{up} = |
|
2089 |
qq|<th class="listheading" align="center" valign="center" width="16">| |
|
2090 |
. qq|<img src="image/up.png" alt="| . $locale->text("up") . qq|">| |
|
2091 |
. qq|</th>|; |
|
2092 |
$column_header{down} = |
|
2093 |
qq|<th class="listheading" align="center" valign="center" width="16">| |
|
2094 |
. qq|<img src="image/down.png" alt="| . $locale->text("down") . qq|">| |
|
2095 |
. qq|</th>|; |
|
2096 |
$column_header{description} = |
|
2097 |
qq|<th class=listheading>| |
|
2098 |
. $locale->text('Description') |
|
2099 |
. qq|</th>|; |
|
2100 |
$column_header{description_long} = |
|
2101 |
qq|<th class=listheading>| |
|
2102 |
. $locale->text('Long Description') |
|
2103 |
. qq|</th>|; |
|
2104 |
$column_header{terms_netto} = |
|
2105 |
qq|<th class=listheading>| |
|
2106 |
. $locale->text('Netto Terms') |
|
2107 |
. qq|</th>|; |
|
2108 |
$column_header{terms_skonto} = |
|
2109 |
qq|<th class=listheading>| |
|
2110 |
. $locale->text('Skonto Terms') |
|
2111 |
. qq|</th>|; |
|
2112 |
$column_header{percent_skonto} = |
|
2113 |
qq|<th class=listheading>| |
|
2114 |
. $locale->text('Skonto') |
|
2115 |
. qq| %</th>|; |
|
2116 |
|
|
2117 |
$form->header; |
|
2118 |
|
|
2119 |
print qq| |
|
2120 |
<body> |
|
2121 |
|
|
2122 |
<table width=100%> |
|
2123 |
<tr> |
|
2124 |
<th class=listtop>$form->{title}</th> |
|
2125 |
</tr> |
|
2126 |
<tr height="5"></tr> |
|
2127 |
<tr> |
|
2128 |
<td> |
|
2129 |
<table width=100%> |
|
2130 |
<tr class=listheading> |
|
2131 |
|; |
|
2132 |
|
|
2133 |
map { print "$column_header{$_}\n" } @column_index; |
|
2134 |
|
|
2135 |
print qq| |
|
2136 |
</tr> |
|
2137 |
|; |
|
2138 |
|
|
2139 |
my $swap_link = build_std_url("action=swap_payment_terms"); |
|
2140 |
|
|
2141 |
my $row = 0; |
|
2142 |
my ($i, %column_data); |
|
2143 |
foreach my $ref (@{ $form->{ALL} }) { |
|
2144 |
|
|
2145 |
$i++; |
|
2146 |
$i %= 2; |
|
2147 |
|
|
2148 |
print qq| |
|
2149 |
<tr valign=top class=listrow$i> |
|
2150 |
|; |
|
2151 |
|
|
2152 |
if ($row) { |
|
2153 |
my $pref = $form->{ALL}->[$row - 1]; |
|
2154 |
$column_data{up} = |
|
2155 |
qq|<td align="center" valign="center" width="16">| . |
|
2156 |
qq|<a href="${swap_link}&id1=$ref->{id}&id2=$pref->{id}">| . |
|
2157 |
qq|<img border="0" src="image/up.png" alt="| . $locale->text("up") . qq|">| . |
|
2158 |
qq|</a></td>|; |
|
2159 |
} else { |
|
2160 |
$column_data{up} = qq|<td width="16"> </td>|; |
|
2161 |
} |
|
2162 |
|
|
2163 |
if ($row == (scalar(@{ $form->{ALL} }) - 1)) { |
|
2164 |
$column_data{down} = qq|<td width="16"> </td>|; |
|
2165 |
} else { |
|
2166 |
my $nref = $form->{ALL}->[$row + 1]; |
|
2167 |
$column_data{down} = |
|
2168 |
qq|<td align="center" valign="center" width="16">| . |
|
2169 |
qq|<a href="${swap_link}&id1=$ref->{id}&id2=$nref->{id}">| . |
|
2170 |
qq|<img border="0" src="image/down.png" alt="| . $locale->text("down") . qq|">| . |
|
2171 |
qq|</a></td>|; |
|
2172 |
} |
|
2173 |
|
|
2174 |
$column_data{description} = |
|
2175 |
qq|<td><a href="| . |
|
2176 |
build_std_url("action=edit_payment", "id=$ref->{id}", "callback=$callback") . |
|
2177 |
qq|">| . H($ref->{description}) . qq|</a></td>|; |
|
2178 |
$column_data{description_long} = |
|
2179 |
qq|<td>| . H($ref->{description_long}) . qq|</td>|; |
|
2180 |
$column_data{terms_netto} = |
|
2181 |
qq|<td align=right>$ref->{terms_netto}</td>|; |
|
2182 |
$column_data{terms_skonto} = |
|
2183 |
qq|<td align=right>$ref->{terms_skonto}</td>|; |
|
2184 |
$column_data{percent_skonto} = |
|
2185 |
qq|<td align=right>| . |
|
2186 |
$form->format_amount(\%myconfig, $ref->{percent_skonto} * 100) . |
|
2187 |
qq|%</td>|; |
|
2188 |
map { print "$column_data{$_}\n" } @column_index; |
|
2189 |
|
|
2190 |
print qq| |
|
2191 |
</tr> |
|
2192 |
|; |
|
2193 |
$row++; |
|
2194 |
} |
|
2195 |
|
|
2196 |
print qq| |
|
2197 |
</table> |
|
2198 |
</td> |
|
2199 |
</tr> |
|
2200 |
<tr> |
|
2201 |
<td><hr size=3 noshade></td> |
|
2202 |
</tr> |
|
2203 |
</table> |
|
2204 |
|
|
2205 |
<br> |
|
2206 |
<form method=post action=am.pl> |
|
2207 |
|
|
2208 |
<input name=callback type=hidden value="$form->{callback}"> |
|
2209 |
|
|
2210 |
<input type=hidden name=type value=payment> |
|
2211 |
|
|
2212 |
<input class=submit type=submit name=action value="| |
|
2213 |
. $locale->text('Add') . qq|"> |
|
2214 |
|
|
2215 |
</form> |
|
2216 |
|
|
2217 |
</body> |
|
2218 |
</html> |
|
2219 |
|; |
|
2220 |
|
|
2221 |
$main::lxdebug->leave_sub(); |
|
2222 |
} |
|
2223 |
|
|
2224 |
sub payment_header { |
|
2225 |
$main::lxdebug->enter_sub(); |
|
2226 |
|
|
2227 |
my $form = $main::form; |
|
2228 |
my $locale = $main::locale; |
|
2229 |
|
|
2230 |
$main::auth->assert('config'); |
|
2231 |
|
|
2232 |
$form->{title} = $locale->text("$form->{title} Payment Terms"); |
|
2233 |
|
|
2234 |
# $locale->text('Add Payment Terms') |
|
2235 |
# $locale->text('Edit Payment Terms') |
|
2236 |
|
|
2237 |
$form->{description} =~ s/\"/"/g; |
|
2238 |
|
|
2239 |
|
|
2240 |
|
|
2241 |
$form->header; |
|
2242 |
|
|
2243 |
print qq| |
|
2244 |
<body> |
|
2245 |
|
|
2246 |
<form method=post action=am.pl> |
|
2247 |
|
|
2248 |
<input type=hidden name=id value=$form->{id}> |
|
2249 |
<input type=hidden name=type value=payment> |
|
2250 |
|
|
2251 |
<table width=100%> |
|
2252 |
<tr> |
|
2253 |
<th class=listtop colspan=2>$form->{title}</th> |
|
2254 |
</tr> |
|
2255 |
<tr height="5"></tr> |
|
2256 |
<tr> |
|
2257 |
<th align=right>| . $locale->text('Description') . qq|</th> |
|
2258 |
<td><input name=description size=30 value="$form->{description}"></td> |
|
2259 |
<tr> |
|
2260 |
<tr> |
|
2261 |
<th align=right>| . $locale->text('Long Description') . qq|</th> |
|
2262 |
<td><input name=description_long size=50 value="$form->{description_long}"></td> |
|
2263 |
</tr> |
|
2264 |
|; |
|
2265 |
|
|
2266 |
foreach my $language (@{ $form->{"TRANSLATION"} }) { |
|
2267 |
print qq| |
|
2268 |
<tr> |
|
2269 |
<th align="right">| . |
|
2270 |
sprintf($locale->text('Translation (%s)'), |
|
2271 |
$language->{"language"}) |
|
2272 |
. qq|</th> |
|
2273 |
<td><input name="description_long_$language->{language_id}" size="50" |
|
2274 |
value="| . Q($language->{"description_long"}) . qq|"></td> |
|
2275 |
</tr> |
|
2276 |
|; |
|
2277 |
} |
|
2278 |
|
|
2279 |
print qq| |
|
2280 |
<tr> |
|
2281 |
<th align=right>| . $locale->text('Netto Terms') . qq|</th> |
|
2282 |
<td><input name=terms_netto size=10 value="$form->{terms_netto}"></td> |
|
2283 |
</tr> |
|
2284 |
<tr> |
|
2285 |
<th align=right>| . $locale->text('Skonto Terms') . qq|</th> |
|
2286 |
<td><input name=terms_skonto size=10 value="$form->{terms_skonto}"></td> |
|
2287 |
</tr> |
|
2288 |
<tr> |
|
2289 |
<th align=right>| . $locale->text('Skonto') . qq| %</th> |
|
2290 |
<td><input name=percent_skonto size=10 value="$form->{percent_skonto}"></td> |
|
2291 |
</tr> |
|
2292 |
<td colspan=2><hr size=3 noshade></td> |
|
2293 |
</tr> |
|
2294 |
</table> |
|
2295 |
|
|
2296 |
<p>| . $locale->text("You can use the following strings in the long " . |
|
2297 |
"description and all translations. They will be " . |
|
2298 |
"replaced by their actual values by Lx-Office " . |
|
2299 |
"before they're output.") |
|
2300 |
. qq|</p> |
|
2301 |
|
|
2302 |
<ul> |
|
2303 |
<li>| . $locale->text("<%netto_date%> -- Date the payment is due in " . |
|
2304 |
"full") |
|
2305 |
. qq|</li> |
|
2306 |
<li>| . $locale->text("<%skonto_date%> -- Date the payment is due " . |
|
2307 |
"with discount") |
|
2308 |
. qq|</li> |
|
2309 |
<li>| . $locale->text("<%skonto_amount%> -- The deductible amount") |
|
2310 |
. qq|</li> |
|
2311 |
<li>| . $locale->text("<%skonto_in_percent%> -- The discount in percent") |
|
2312 |
. qq|</li> |
|
2313 |
<li>| . $locale->text("<%total%> -- Amount payable") |
|
2314 |
. qq|</li> |
|
2315 |
<li>| . $locale->text("<%total_wo_skonto%> -- Amount payable less discount") |
|
2316 |
. qq|</li> |
|
2317 |
<li>| . $locale->text("<%invtotal%> -- Invoice total") |
|
2318 |
. qq|</li> |
|
2319 |
<li>| . $locale->text("<%invtotal_wo_skonto%> -- Invoice total less discount") |
|
2320 |
. qq|</li> |
|
2321 |
<li>| . $locale->text("<%currency%> -- The selected currency") |
|
2322 |
. qq|</li> |
|
2323 |
<li>| . $locale->text("<%terms_netto%> -- The number of days for " . |
|
2324 |
"full payment") |
|
2325 |
. qq|</li> |
|
2326 |
<li>| . $locale->text("<%account_number%> -- Your account number") |
|
2327 |
. qq|</li> |
|
2328 |
<li>| . $locale->text("<%bank%> -- Your bank") |
|
2329 |
. qq|</li> |
|
2330 |
<li>| . $locale->text("<%bank_code%> -- Your bank code") |
|
2331 |
. qq|</li> |
|
2332 |
</ul>|; |
|
2333 |
|
|
2334 |
$main::lxdebug->leave_sub(); |
|
2335 |
} |
|
2336 |
|
|
2337 |
sub save_payment { |
|
2338 |
$main::lxdebug->enter_sub(); |
|
2339 |
|
|
2340 |
my $form = $main::form; |
|
2341 |
my %myconfig = %main::myconfig; |
|
2342 |
my $locale = $main::locale; |
|
2343 |
|
|
2344 |
$main::auth->assert('config'); |
|
2345 |
|
|
2346 |
$form->isblank("description", $locale->text('Description missing!')); |
|
2347 |
$form->{"percent_skonto"} = |
|
2348 |
$form->parse_amount(\%myconfig, $form->{percent_skonto}) / 100; |
|
2349 |
AM->save_payment(\%myconfig, \%$form); |
|
2350 |
$form->redirect($locale->text('Payment Terms saved!')); |
|
2351 |
|
|
2352 |
$main::lxdebug->leave_sub(); |
|
2353 |
} |
|
2354 |
|
|
2355 |
sub delete_payment { |
|
2356 |
$main::lxdebug->enter_sub(); |
|
2357 |
|
|
2358 |
my $form = $main::form; |
|
2359 |
my %myconfig = %main::myconfig; |
|
2360 |
my $locale = $main::locale; |
|
2361 |
|
|
2362 |
$main::auth->assert('config'); |
|
2363 |
|
|
2364 |
AM->delete_payment(\%myconfig, \%$form); |
|
2365 |
$form->redirect($locale->text('Payment terms deleted!')); |
|
2366 |
|
|
2367 |
$main::lxdebug->leave_sub(); |
|
2368 |
} |
|
2369 |
|
|
2370 |
sub swap_payment_terms { |
|
2371 |
$main::lxdebug->enter_sub(); |
|
2372 |
|
|
2373 |
my $form = $main::form; |
|
2374 |
my %myconfig = %main::myconfig; |
|
2375 |
|
|
2376 |
$main::auth->assert('config'); |
|
2377 |
|
|
2378 |
AM->swap_sortkeys(\%myconfig, $form, "payment_terms"); |
|
2379 |
list_payment(); |
|
2380 |
|
|
2381 |
$main::lxdebug->leave_sub(); |
|
2382 |
} |
|
2383 |
|
|
2384 | 2021 |
sub edit_defaults { |
2385 | 2022 |
$main::lxdebug->enter_sub(); |
2386 | 2023 |
|
locale/de/all | ||
---|---|---|
14 | 14 |
' Part Number missing!' => ' Artikelnummer fehlt!', |
15 | 15 |
' missing!' => ' fehlt!', |
16 | 16 |
'#1 prices were updated.' => '#1 Preise wurden aktualisiert.', |
17 |
'<%account_number%> -- Your account number' => '<%account_number%> -- Ihre Kontonummer', |
|
18 |
'<%bank%> -- Your bank' => '<%bank%> -- Der Name Ihrer Bank', |
|
19 |
'<%bank_code%> -- Your bank code' => '<%bank_code%> -- Die Bankleitzahl Ihrer Bank', |
|
20 |
'<%currency%> -- The selected currency' => '<%currency%> -- Die ausgewählte Währung', |
|
21 |
'<%invtotal%> -- Invoice total' => '<%invtotal%> -- Die Rechnungssumme', |
|
22 |
'<%invtotal_wo_skonto%> -- Invoice total less discount' => '<%invtotal_wo_skonto%> -- Rechnungssumme abzüglich Skonto', |
|
23 |
'<%netto_date%> -- Date the payment is due in full' => '<%netto_date%> -- Das Datum, bis die Rechnung in voller Höhe bezahlt werden muss', |
|
24 |
'<%skonto_amount%> -- The deductible amount' => '<%skonto_amount%> -- Der abziehbare Skontobetrag', |
|
25 |
'<%skonto_date%> -- Date the payment is due with discount' => '<%skonto_date%> -- Das Datum, bis die Rechnung unter Abzug von Skonto bezahlt werden kann', |
|
26 |
'<%skonto_in_percent%> -- The discount in percent' => '<%skonto_in_percent%> -- Der prozentuale Rabatt', |
|
27 |
'<%terms_netto%> -- The number of days for full payment' => '<%terms_netto%> -- Die Anzahl Tage, bis die Rechnung in voller Höhe bezahlt werden muss', |
|
28 |
'<%total%> -- Amount payable' => '<%total%> -- Noch zu bezahlender Betrag', |
|
29 |
'<%total_wo_skonto%> -- Amount payable less discount' => '<%total_wo_skonto%> -- Noch zu bezahlender Betrag abzüglich Skonto', |
|
30 | 17 |
'*/' => '*/', |
31 | 18 |
'---please select---' => '---bitte auswählen---', |
32 | 19 |
'...after loggin in' => '...nach dem Anmelden', |
... | ... | |
64 | 51 |
'AR Transaction (abbreviation)' => 'D', |
65 | 52 |
'AR Transactions' => 'Debitorenbuchungen', |
66 | 53 |
'ASSETS' => 'AKTIVA', |
54 |
'Abort' => 'Abbrechen', |
|
67 | 55 |
'Abrechnungsnummer' => 'Abrechnungsnummer', |
68 | 56 |
'Abteilung' => 'Abteilung', |
69 | 57 |
'Account' => 'Konto', |
... | ... | |
184 | 172 |
'Amount' => 'Betrag', |
185 | 173 |
'Amount Due' => 'Betrag fällig', |
186 | 174 |
'Amount has to be greater then zero! Wrong row number: ' => 'Leere Eingabe oder Werte kleiner, gleich null eingegeben. Fehler in Reihe Nummer: ', |
175 |
'Amount payable' => 'Noch zu bezahlender Betrag', |
|
176 |
'Amount payable less discount' => 'Noch zu bezahlender Betrag abzüglich Skonto', |
|
187 | 177 |
'An invalid character was used (invalid characters: #1).' => 'Ein ungültiges Zeichen wurde benutzt (ungültige Zeichen: #1).', |
188 | 178 |
'An invalid character was used (valid characters: #1).' => 'Ein ungültiges Zeichen wurde benutzt (gültige Zeichen: #1).', |
189 | 179 |
'An upper-case character is required.' => 'Ein Großbuchstabe ist vorgeschrieben.', |
... | ... | |
202 | 192 |
'Are you sure you want to delete Order Number' => 'Soll der Auftrag mit folgender Nummer wirklich gelöscht werden:', |
203 | 193 |
'Are you sure you want to delete Quotation Number' => 'Sind Sie sicher, dass Angebotnummer gelöscht werden soll?', |
204 | 194 |
'Are you sure you want to delete Transaction' => 'Buchung wirklich löschen?', |
195 |
'Are you sure you want to delete this payment term?' => 'Wollen Sie diese Zahlungsbedingungen wirklich löschen?', |
|
205 | 196 |
'Are you sure you want to remove the marked entries from the queue?' => 'Sind Sie sicher, dass die markierten Einträge von der Warteschlange gelöscht werden sollen?', |
206 | 197 |
'Are you sure you want to update the prices' => 'Sind Sie sicher, dass Sie die Preise aktualisieren wollen?', |
207 | 198 |
'Article Code' => 'Artikelkürzel', |
... | ... | |
420 | 411 |
'Create Chart of Accounts' => 'Zu verwendender Kontenplan', |
421 | 412 |
'Create Dataset' => 'Neue Datenbank anlegen', |
422 | 413 |
'Create Date' => 'Erstelldatum', |
414 |
'Create a new payment term' => 'Neue Zahlungsbedingungen anlegen', |
|
423 | 415 |
'Create a standard group' => 'Eine Standard-Benutzergruppe anlegen', |
424 | 416 |
'Create and edit RFQs' => 'Lieferantenanfragen erfassen und bearbeiten', |
425 | 417 |
'Create and edit customers and vendors' => 'Kunden und Lieferanten erfassen und bearbeiten', |
... | ... | |
439 | 431 |
'Create bank transfer via SEPA XML' => 'Überweisung via SEPA XML erzeugen', |
440 | 432 |
'Create invoice?' => 'Rechnung erstellen?', |
441 | 433 |
'Create new' => 'Neu erfassen', |
434 |
'Create new payment term' => 'Neue Zahlungsbedingung anlegen', |
|
442 | 435 |
'Create tables' => 'Tabellen anlegen', |
443 | 436 |
'Created by' => 'Erstellt von', |
444 | 437 |
'Created for' => 'Erstellt für', |
... | ... | |
509 | 502 |
'Date Paid' => 'Zahlungsdatum', |
510 | 503 |
'Date and timestamp variables: If the default value equals \'NOW\' then the current date/current timestamp will be used. Otherwise the default value is copied as-is.' => 'Datums- und Uhrzeitvariablen: Wenn der Standardwert \'NOW\' ist, so wird das aktuelle Datum/die aktuelle Uhrzeit eingefügt. Andernfalls wird der Standardwert so wie er ist benutzt.', |
511 | 504 |
'Date missing!' => 'Datum fehlt!', |
505 |
'Date the payment is due in full' => 'Das Datum, bis die Rechnung in voller Höhe bezahlt werden muss', |
|
506 |
'Date the payment is due with discount' => 'Das Datum, bis die Rechnung unter Abzug von Skonto bezahlt werden kann', |
|
512 | 507 |
'Datevautomatik' => 'Datevexport', |
513 | 508 |
'Datum von' => 'Datum von', |
514 | 509 |
'Debit' => 'Soll', |
... | ... | |
652 | 647 |
'Edit Language' => 'Sprache bearbeiten', |
653 | 648 |
'Edit Lead' => 'Kundenquelle bearbeiten', |
654 | 649 |
'Edit Part' => 'Ware bearbeiten', |
655 |
'Edit Payment Terms' => 'Zahlungskonditionen bearbeiten', |
|
656 | 650 |
'Edit Preferences for #1' => 'Einstellungen von #1 bearbeiten', |
657 | 651 |
'Edit Price Factor' => 'Preisfaktor bearbeiten', |
658 | 652 |
'Edit Pricegroup' => 'Preisgruppe bearbeiten', |
... | ... | |
683 | 677 |
'Edit groups' => 'Gruppen bearbeiten', |
684 | 678 |
'Edit membership' => 'Mitgliedschaft bearbeiten', |
685 | 679 |
'Edit note' => 'Notiz bearbeiten', |
680 |
'Edit payment term' => 'Zahlungsbedingungen bearbeiten', |
|
686 | 681 |
'Edit rights' => 'Rechte bearbeiten', |
687 | 682 |
'Edit templates' => 'Vorlagen bearbeiten', |
688 | 683 |
'Edit the Delivery Order' => 'Lieferschein bearbeiten', |
... | ... | |
757 | 752 |
'Feb' => 'Feb', |
758 | 753 |
'February' => 'Februar', |
759 | 754 |
'Fee' => 'Gebühr', |
755 |
'Field' => 'Feld', |
|
760 | 756 |
'File' => 'Datei', |
761 | 757 |
'File name' => 'Dateiname', |
762 | 758 |
'Files created by Lx-Office\'s "Backup Dataset" function are such files.' => 'Dateien, die von Lx-Office\' Funktion "Datenbank sichern" erstellt wurden, erfüllen diese Kriterien.', |
... | ... | |
903 | 899 |
'Invoice for fees' => 'Rechnung über Gebühren', |
904 | 900 |
'Invoice has already been storno\'d!' => 'Diese Rechnung wurde bereits storniert.', |
905 | 901 |
'Invoice number' => 'Rechnungsnummer', |
902 |
'Invoice total' => 'Die Rechnungssumme', |
|
903 |
'Invoice total less discount' => 'Rechnungssumme abzüglich Skonto', |
|
906 | 904 |
'Invoice with Storno (abbreviation)' => 'R(S)', |
907 | 905 |
'Invoices' => 'Rechnungen', |
908 | 906 |
'Is Searchable' => 'Durchsuchbar', |
... | ... | |
971 | 969 |
'List Groups' => 'Warengruppen anzeigen', |
972 | 970 |
'List Languages' => 'Sprachen anzeigen', |
973 | 971 |
'List Lead' => 'Kundenquelle anzeigen', |
974 |
'List Payment Terms' => 'Zahlungskonditionen anzeigen',
|
|
972 |
'List Payment Terms' => 'Zahlungsbedingungen anzeigen',
|
|
975 | 973 |
'List Price' => 'Listenpreis', |
976 | 974 |
'List Price Factors' => 'Preisfaktoren anzeigen', |
977 | 975 |
'List Pricegroups' => 'Preisgruppen anzeigen', |
... | ... | |
1102 | 1100 |
'No licenses were found that match the search criteria.' => 'Es wurden keine Lizenzen gefunden, auf die die Suchkriterien zutreffen.', |
1103 | 1101 |
'No or an unknown authenticantion module specified in "config/lx_office.conf".' => 'Es wurde kein oder ein unbekanntes Authentifizierungsmodul in "config/lx_office.conf" angegeben.', |
1104 | 1102 |
'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.', |
1103 |
'No payment term has been created yet.' => 'Es wurden noch keine Zahlungsbedingungen angelegt.', |
|
1105 | 1104 |
'No prices will be updated because no prices have been entered.' => 'Es werden keine Preise aktualisiert, weil keine gültigen Preisänderungen eingegeben wurden.', |
1106 | 1105 |
'No problems were recognized.' => 'Es wurden keine Probleme gefunden.', |
1107 | 1106 |
'No transaction selected!' => 'Keine Transaktion ausgewählt', |
... | ... | |
1209 | 1208 |
'Payables' => 'Verbindlichkeiten', |
1210 | 1209 |
'Payment' => 'Zahlungsausgang', |
1211 | 1210 |
'Payment Reminder' => 'Zahlungserinnerung', |
1212 |
'Payment Terms' => 'Zahlungskonditionen',
|
|
1211 |
'Payment Terms' => 'Zahlungsbedingungen',
|
|
1213 | 1212 |
'Payment Terms missing in row ' => 'Zahlungsfrist fehlt in Zeile ', |
1214 |
'Payment Terms saved!' => 'Zahlungskonditionen gespeichert!', |
|
1215 | 1213 |
'Payment date missing!' => 'Tag der Zahlung fehlt!', |
1216 | 1214 |
'Payment list as PDF' => 'Zahlungsliste als PDF', |
1217 | 1215 |
'Payment posted!' => 'Zahlung gebucht!', |
1218 |
'Payment terms deleted!' => 'Zahlungskonditionen gelöscht!',
|
|
1216 |
'Payment terms' => 'Zahlungsbedingungen',
|
|
1219 | 1217 |
'Payments' => 'Zahlungsausgänge', |
1220 | 1218 |
'Per. Inv.' => 'Wied. Rech.', |
1221 | 1219 |
'Period' => 'Zeitraum', |
... | ... | |
1650 | 1648 |
'The dataset backup has been sent via email to #1.' => 'Die Datenbanksicherung wurde per Email an #1 verschickt.', |
1651 | 1649 |
'The dataset has to exist before a restoration can be started.' => 'Die Datenbank muss vor der Wiederherstellung bereits angelegt worden sein.', |
1652 | 1650 |
'The dataset name is missing.' => 'Der Datenbankname fehlt.', |
1651 |
'The deductible amount' => 'Der abziehbare Skontobetrag', |
|
1653 | 1652 |
'The default value depends on the variable type:' => 'Die Bedeutung des Standardwertes hängt vom Variablentypen ab:', |
1654 | 1653 |
'The delivery order has not been marked as delivered. The warehouse contents have not changed.' => 'Der Lieferschein wurde nicht als geliefert markiert. Der Lagerinhalt wurde nicht verändert.', |
1655 | 1654 |
'The description is missing.' => 'Die Beschreibung fehlt.', |
1656 | 1655 |
'The description is shown on the form. Chose something short and descriptive.' => 'Die Beschreibung wird in der jeweiligen Maske angezeigt. Sie sollte kurz und prägnant sein.', |
1657 | 1656 |
'The directory "%s" could not be created:\n%s' => 'Das Verzeichnis "%s" konnte nicht erstellt werden:\n%s', |
1658 | 1657 |
'The directory %s does not exist.' => 'Das Verzeichnis %s existiert nicht.', |
1658 |
'The discount in percent' => 'Der prozentuale Rabatt', |
|
1659 | 1659 |
'The dunning process started' => 'Der Mahnprozess ist gestartet.', |
1660 | 1660 |
'The dunnings have been printed.' => 'Die Mahnung(en) wurden gedruckt.', |
1661 | 1661 |
'The email address is missing.' => 'Die Emailadresse fehlt.', |
... | ... | |
1684 | 1684 |
'The licensing module has been deactivated in the configuration.' => 'Das Lizenzverwaltungsmodul wurde in der Konfiguration deaktiviert.', |
1685 | 1685 |
'The list has been printed.' => 'Die Liste wurde ausgedruckt.', |
1686 | 1686 |
'The login is missing.' => 'Das Login fehlt.', |
1687 |
'The long description is missing.' => 'Der Langtext fehlt.', |
|
1687 | 1688 |
'The name in row %d has already been used before.' => 'Der Name in Zeile %d wurde vorher bereits benutzt.', |
1688 | 1689 |
'The name is missing in row %d.' => 'Der Name fehlt in Zeile %d.', |
1689 | 1690 |
'The name is missing.' => 'Der Name fehlt.', |
1690 | 1691 |
'The name must only consist of letters, numbers and underscores and start with a letter.' => 'Der Name darf nur aus Buchstaben (keine Umlaute), Ziffern und Unterstrichen bestehen und muss mit einem Buchstaben beginnen.', |
1692 |
'The number of days for full payment' => 'Die Anzahl Tage, bis die Rechnung in voller Höhe bezahlt werden muss', |
|
1691 | 1693 |
'The old file containing the user information is still present ("#1"). Do you want to migrate these users into the database? If not then you will not be able to log in with any of the users present in the old file.' => 'Die alte Datei mit den Benutzerdaten existiert in dieser Installation noch immer ("#1"). Wollen Sie diese Benutzer in die neue Authentifizierungsdatenbank migrieren lassen? Falls nicht, so werden Sie sich nicht mehr mit den Benutzerdaten aus der alten Mitgliedsdatei anmelden können.', |
1692 | 1694 |
'The option field is empty.' => 'Das Optionsfeld ist leer.', |
1693 | 1695 |
'The parts for this delivery order have already been transferred in.' => 'Die Artikel dieses Lieferscheins wurden bereits eingelagert.', |
... | ... | |
1698 | 1700 |
'The password is too long (maximum length: #1).' => 'Das Passwort ist zu lang (maximale Länge: #1).', |
1699 | 1701 |
'The password is too short (minimum length: #1).' => 'Das Password ist zu kurz (minimale Länge: #1).', |
1700 | 1702 |
'The password is weak (e.g. it can be found in a dictionary).' => 'Das Passwort ist schwach (z.B. wenn es in einem Wörterbuch steht).', |
1703 |
'The payment term has been created.' => 'Die Zahlungsbedingungen wurden angelegt.', |
|
1704 |
'The payment term has been deleted.' => 'Die Zahlungsbedingungen wurden gelöscht.', |
|
1705 |
'The payment term has been saved.' => 'Die Zahlungsbedingungen wurden gespeichert.', |
|
1706 |
'The payment term is in use and cannot be deleted.' => 'Die Zahlungsbedingungen werden bereits benutzt und können nicht gelöscht werden.', |
|
1701 | 1707 |
'The payments have been posted.' => 'Die Zahlungen wurden gebucht.', |
1702 | 1708 |
'The pg_dump process could not be started.' => 'Der pg_dump-Prozess konnte nicht gestartet werden.', |
1703 | 1709 |
'The pg_restore process could not be started.' => 'Der pg_restore-Prozess konnte nicht gestartet werden.', |
... | ... | |
1712 | 1718 |
'The selected PostgreSQL installation uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Die ausgewählte PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Deshalb müssen Sie Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.', |
1713 | 1719 |
'The selected bank account does not exist anymore.' => 'Das ausgewählte Bankkonto existiert nicht mehr.', |
1714 | 1720 |
'The selected bin does not exist.' => 'Der ausgewählte Lagerplatz existiert nicht.', |
1721 |
'The selected currency' => 'Die ausgewählte Währung', |
|
1715 | 1722 |
'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.', |
1716 | 1723 |
'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.', |
1717 | 1724 |
'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => 'Das ausgewählte Lager ist leer, oder in ihm wurden keine zu den Sucheinstellungen passenden eingelagerten Artikel gefunden.', |
... | ... | |
1812 | 1819 |
'Transfer in' => 'Einlagern', |
1813 | 1820 |
'Transfer out' => 'Auslagern', |
1814 | 1821 |
'Transfer qty' => 'Umlagermenge', |
1815 |
'Translation (%s)' => 'Übersetzung (%s)',
|
|
1822 |
'Translation' => 'Übersetzung',
|
|
1816 | 1823 |
'Trial Balance' => 'Summen- und Saldenliste', |
1817 | 1824 |
'Trial balance between %s and %s' => 'Summen- und Saldenlisten vom %s bis zum %s', |
1818 | 1825 |
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.', |
... | ... | |
1972 | 1979 |
'You\'ve already chosen the following limitations:' => 'Sie haben bereits die folgenden Einschränkungen vorgenommen:', |
1973 | 1980 |
'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.', |
1974 | 1981 |
'Your TODO list' => 'Ihre Aufgabenliste', |
1982 |
'Your account number' => 'Ihre Kontonummer', |
|
1983 |
'Your bank' => 'Der Name Ihrer Bank', |
|
1984 |
'Your bank code' => 'Die Bankleitzahl Ihrer Bank', |
|
1975 | 1985 |
'Your browser does not currently support Javascript.' => 'Ihr Browser unterstützt im Moment kein Javascript!', |
1976 | 1986 |
'Your download does not exist anymore. Please re-run the DATEV export assistant.' => 'Ihr Download existiert nicht mehr. Bitte starten Sie den DATEV-Exportassistenten erneut.', |
1977 | 1987 |
'Zeitpunkt' => 'Zeitpunkt', |
menu.ini | ||
---|---|---|
698 | 698 |
submenu=1 |
699 | 699 |
|
700 | 700 |
[System--Payment Terms--Add Payment Terms] |
701 |
module=am.pl
|
|
702 |
action=add_payment
|
|
701 |
module=controller.pl
|
|
702 |
action=PaymentTerm/new
|
|
703 | 703 |
|
704 | 704 |
[System--Payment Terms--List Payment Terms] |
705 |
module=am.pl
|
|
706 |
action=list_payment
|
|
705 |
module=controller.pl
|
|
706 |
action=PaymentTerm/list
|
|
707 | 707 |
|
708 | 708 |
[System--Manage Custom Variables] |
709 | 709 |
module=menu.pl |
sql/Pg-upgrade2/payment_terms_translation2.sql | ||
---|---|---|
1 |
-- @tag: payment_terms_translation2 |
|
2 |
-- @description: Eingliederung von payment_terms_translation in generic_translations |
|
3 |
-- @depends: release_2_6_1 |
|
4 |
-- @charset: utf-8 |
|
5 |
INSERT INTO generic_translations (language_id, translation_type, translation_id, translation) |
|
6 |
SELECT language_id, 'SL::DB::PaymentTerm/description_long', payment_terms_id, description_long |
|
7 |
FROM translation_payment_terms; |
|
8 |
|
|
9 |
DROP TABLE translation_payment_terms; |
sql/Pg-upgrade2/schema_normalization_2.sql | ||
---|---|---|
24 | 24 |
ALTER TABLE tax_zones ADD PRIMARY KEY (id); |
25 | 25 |
ALTER TABLE todo_user_config ADD COLUMN id SERIAL PRIMARY KEY; |
26 | 26 |
ALTER TABLE translation ADD COLUMN id SERIAL PRIMARY KEY; |
27 |
ALTER TABLE translation_payment_terms ADD COLUMN id SERIAL PRIMARY KEY; |
|
28 | 27 |
ALTER TABLE units_language ADD COLUMN id SERIAL PRIMARY KEY; |
29 | 28 |
ALTER TABLE vendortax ADD COLUMN id SERIAL PRIMARY KEY; |
templates/webpages/payment_term/form.html | ||
---|---|---|
1 |
[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %] |
|
2 |
<body> |
|
3 |
|
|
4 |
<form method="post" action="controller.pl"> |
|
5 |
<div class="listtop">[% FORM.title %]</div> |
|
6 |
|
|
7 |
[%- INCLUDE 'common/flash.html' %] |
|
8 |
|
|
9 |
<table> |
|
10 |
<tr> |
|
11 |
<td>[%- 'Description' | $T8 %]</td> |
|
12 |
<td> |
|
13 |
<input name="payment_term.description" value="[%- HTML.escape(SELF.payment_term.description) %]"> |
|
14 |
</td> |
|
15 |
</tr> |
|
16 |
|
|
17 |
<tr> |
|
18 |
<td>[%- 'Long Description' | $T8 %]</td> |
|
19 |
<td> |
|
20 |
<input name="payment_term.description_long" value="[%- HTML.escape(SELF.payment_term.description_long) %]" size="60"> |
|
21 |
</td> |
|
22 |
</tr> |
|
23 |
|
|
24 |
[%- FOREACH language = SELF.languages %] |
|
25 |
<tr> |
|
26 |
<td>[%- HTML.escape(language.description) %] ([%- LxERP.t8('Translation') %])</td> |
|
27 |
<td> |
|
28 |
<input name="translation_[% language.id %]" value="[%- HTML.escape(SELF.payment_term.translated_attribute('description_long', language, 1)) %]" size="60"> |
|
29 |
</td> |
|
30 |
</tr> |
|
31 |
[%- END %] |
|
32 |
|
|
33 |
<tr> |
|
34 |
<td>[%- 'Netto Terms' | $T8 %]</td> |
|
35 |
<td> |
|
36 |
<input name="payment_term.terms_netto_as_number" value="[%- HTML.escape(SELF.payment_term.terms_netto_as_number) %]" size="6"> |
|
37 |
</td> |
|
38 |
</tr> |
|
39 |
|
|
40 |
<tr> |
|
41 |
<td>[%- 'Skonto Terms' | $T8 %]</td> |
|
42 |
<td> |
|
43 |
<input name="payment_term.terms_skonto_as_number" value="[%- HTML.escape(SELF.payment_term.terms_skonto_as_number) %]" size="6"> |
|
44 |
</td> |
|
45 |
</tr> |
|
46 |
|
|
47 |
<tr> |
|
48 |
<td>[%- 'Skonto' | $T8 %]</td> |
|
49 |
<td> |
|
50 |
<input name="payment_term.percent_skonto_as_number" value="[%- HTML.escape(SELF.payment_term.percent_skonto_as_number) %]" size="6">% |
|
51 |
</td> |
|
52 |
</tr> |
|
53 |
</table> |
|
54 |
|
|
55 |
<p> |
|
56 |
<input type="hidden" name="id" value="[% SELF.payment_term.id %]"> |
|
57 |
<input type="hidden" name="action" value="PaymentTerm/dispatch"> |
|
58 |
<input type="submit" class="submit" name="action_[% IF SELF.payment_term.id %]update[% ELSE %]create[% END %]" value="[% 'Save' | $T8 %]"> |
|
59 |
[%- IF SELF.payment_term.id %] |
|
60 |
<input type="submit" class="submit" name="action_destroy" value="[% 'Delete' | $T8 %]" |
|
61 |
onclick="if (confirm('[% 'Are you sure you want to delete this payment term?' | $T8 %]')) return true; else return false;"> |
|
62 |
[%- END %] |
|
63 |
<a href="[% SELF.url_for(action => 'list') %]">[%- 'Abort' | $T8 %]</a> |
|
64 |
</p> |
|
65 |
|
|
66 |
<hr size="3" noshade> |
|
67 |
|
|
68 |
<p>[% LxERP.t8("You can use the following strings in the long description and all translations. They will be replaced by their actual values by Lx-Office before they're output.") %]</p> |
|
69 |
|
|
70 |
<table> |
|
71 |
<tr class="listheading"><th>[%- LxERP.t8('Field') %]</th><th>[%- LxERP.t8('Description') %]</th></tr> |
|
72 |
<tr><td><%netto_date%></td><td>[% LxERP.t8("Date the payment is due in full") %]</td></tr> |
|
73 |
<tr><td><%skonto_date%></td><td>[% LxERP.t8("Date the payment is due with discount") %]</td></tr> |
|
74 |
<tr><td><%skonto_amount%></td><td>[% LxERP.t8("The deductible amount") %]</td></tr> |
|
75 |
<tr><td><%skonto_in_percent%></td><td>[% LxERP.t8("The discount in percent") %]</td></tr> |
|
76 |
<tr><td><%total%></td><td>[% LxERP.t8("Amount payable") %]</td></tr> |
|
77 |
<tr><td><%total_wo_skonto%></td><td>[% LxERP.t8("Amount payable less discount") %]</td></tr> |
|
78 |
<tr><td><%invtotal%></td><td>[% LxERP.t8("Invoice total") %]</td></tr> |
|
79 |
<tr><td><%invtotal_wo_skonto%></td><td>[% LxERP.t8("Invoice total less discount") %]</td></tr> |
|
80 |
<tr><td><%currency%></td><td>[% LxERP.t8("The selected currency") %]</td></tr> |
|
81 |
<tr><td><%terms_netto%></td><td>[% LxERP.t8("The number of days for full payment") %]</td></tr> |
|
82 |
<tr><td><%account_number%></td><td>[% LxERP.t8("Your account number") %]</td></tr> |
|
83 |
<tr><td><%bank%></td><td>[% LxERP.t8("Your bank") %]</td></tr> |
|
84 |
<tr><td><%bank_code%></td><td>[% LxERP.t8("Your bank code") %]</td></tr> |
|
85 |
</table> |
|
86 |
</form> |
|
87 |
|
|
88 |
</body> |
|
89 |
</html> |
templates/webpages/payment_term/list.html | ||
---|---|---|
1 |
[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %] |
|
2 |
<body> |
|
3 |
<div class="listtop">[% FORM.title %]</div> |
|
4 |
|
|
5 |
[%- INCLUDE 'common/flash.html' %] |
|
6 |
|
|
7 |
<form method="post" action="controller.pl"> |
|
8 |
[% IF !PAYMENT_TERMS.size %] |
|
9 |
<p> |
|
10 |
[%- 'No payment term has been created yet.' | $T8 %] |
|
11 |
</p> |
|
12 |
|
|
13 |
[%- ELSE %] |
|
14 |
<table> |
|
15 |
<tr class="listheading"> |
|
16 |
<th align="center"><img src="image/up.png"></th> |
|
17 |
<th align="center"><img src="image/down.png"></th> |
|
18 |
<th>[%- 'Description' | $T8 %]</th> |
|
19 |
<th>[%- 'Long Description' | $T8 %]</th> |
|
20 |
<th align="right">[%- 'Netto Terms' | $T8 %]</th> |
|
21 |
<th align="right">[%- 'Skonto Terms' | $T8 %]</th> |
|
22 |
<th align="right">[%- 'Skonto' | $T8 %]</th> |
|
23 |
</tr> |
|
24 |
|
|
25 |
[%- FOREACH payment_term = PAYMENT_TERMS %] |
|
26 |
<tr class="listrow[% loop.count % 2 %]"> |
|
27 |
<td align="center"> |
|
28 |
[%- UNLESS loop.first %] |
|
29 |
<a href="[% SELF.url_for(action => 'move_up', id => payment_term.id) %]"><img src="image/up.png" border="0"></a> |
|
30 |
[%- END %] |
|
31 |
</td> |
|
32 |
<td align="center"> |
|
33 |
[%- UNLESS loop.last %] |
|
34 |
<a href="[% SELF.url_for(action => 'move_down', id => payment_term.id) %]"><img src="image/down.png" border="0"></a> |
|
35 |
[%- END %] |
|
36 |
</td> |
|
37 |
<td> |
|
38 |
<a href="[% SELF.url_for(action => 'edit', id => payment_term.id) %]"> |
|
39 |
[%- HTML.escape(payment_term.description) %] |
|
40 |
</a> |
|
41 |
</td> |
|
42 |
<td>[%- HTML.escape(payment_term.description_long) %]</td> |
|
43 |
<td align="right">[%- HTML.escape(payment_term.terms_netto_as_number) %]</td> |
|
44 |
<td align="right">[%- HTML.escape(payment_term.terms_skonto_as_number) %]</td> |
|
45 |
<td align="right">[%- HTML.escape(payment_term.percent_skonto_as_number) %] %</td> |
|
46 |
</tr> |
|
47 |
[%- END %] |
|
48 |
</table> |
|
49 |
[%- END %] |
|
50 |
|
|
51 |
<p> |
|
52 |
<a href="[% SELF.url_for(action => 'new') %]">[%- 'Create new payment term' | $T8 %]</a> |
|
53 |
</p> |
|
54 |
</form> |
|
55 |
|
|
56 |
</body> |
|
57 |
</html> |
Auch abrufbar als: Unified diff
Verwaltung von Zahlungsbedingungen auf Controller/Model umgestellt
Conflicts: