Revision f552f878
Von Jan Büren vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/Default.pm | ||
---|---|---|
10 | 10 |
table => 'defaults', |
11 | 11 |
|
12 | 12 |
columns => [ |
13 |
inventory_accno_id => { type => 'integer' }, |
|
14 |
income_accno_id => { type => 'integer' }, |
|
15 |
expense_accno_id => { type => 'integer' }, |
|
16 |
fxgain_accno_id => { type => 'integer' }, |
|
17 |
fxloss_accno_id => { type => 'integer' }, |
|
18 |
invnumber => { type => 'text' }, |
|
19 |
sonumber => { type => 'text' }, |
|
20 |
weightunit => { type => 'varchar', length => 5 }, |
|
21 |
businessnumber => { type => 'text' }, |
|
22 |
version => { type => 'varchar', length => 8 }, |
|
23 |
closedto => { type => 'date' }, |
|
24 |
revtrans => { type => 'boolean', default => 'false' }, |
|
25 |
ponumber => { type => 'text' }, |
|
26 |
sqnumber => { type => 'text' }, |
|
27 |
rfqnumber => { type => 'text' }, |
|
28 |
customernumber => { type => 'text' }, |
|
29 |
vendornumber => { type => 'text' }, |
|
30 |
audittrail => { type => 'boolean', default => 'false' }, |
|
31 |
articlenumber => { type => 'text' }, |
|
32 |
servicenumber => { type => 'text' }, |
|
33 |
coa => { type => 'text' }, |
|
34 |
itime => { type => 'timestamp', default => 'now()' }, |
|
35 |
mtime => { type => 'timestamp' }, |
|
36 |
rmanumber => { type => 'text' }, |
|
37 |
cnnumber => { type => 'text' }, |
|
38 |
dunning_ar_amount_fee => { type => 'integer' }, |
|
39 |
dunning_ar_amount_interest => { type => 'integer' }, |
|
40 |
dunning_ar => { type => 'integer' }, |
|
41 |
pdonumber => { type => 'text' }, |
|
42 |
sdonumber => { type => 'text' }, |
|
43 |
ar_paid_accno_id => { type => 'integer' }, |
|
44 |
id => { type => 'serial', not_null => 1 }, |
|
45 |
language_id => { type => 'integer' }, |
|
46 |
accounting_method => { type => 'text' }, |
|
47 |
inventory_system => { type => 'text' }, |
|
48 |
profit_determination => { type => 'text' }, |
|
49 |
datev_check_on_sales_invoice => { type => 'boolean', default => 'true' }, |
|
50 |
datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' }, |
|
51 |
datev_check_on_ar_transaction => { type => 'boolean', default => 'true' }, |
|
52 |
datev_check_on_ap_transaction => { type => 'boolean', default => 'true' }, |
|
53 |
datev_check_on_gl_transaction => { type => 'boolean', default => 'true' }, |
|
54 |
payments_changeable => { type => 'integer', default => '0', not_null => 1 }, |
|
55 |
is_changeable => { type => 'integer', default => 2, not_null => 1 }, |
|
56 |
ir_changeable => { type => 'integer', default => 2, not_null => 1 }, |
|
57 |
ar_changeable => { type => 'integer', default => 2, not_null => 1 }, |
|
58 |
ap_changeable => { type => 'integer', default => 2, not_null => 1 }, |
|
59 |
gl_changeable => { type => 'integer', default => 2, not_null => 1 }, |
|
60 |
show_bestbefore => { type => 'boolean', default => 'false' }, |
|
61 |
sales_order_show_delete => { type => 'boolean', default => 'true' }, |
|
62 |
purchase_order_show_delete => { type => 'boolean', default => 'true' }, |
|
63 |
sales_delivery_order_show_delete => { type => 'boolean', default => 'true' }, |
|
64 |
purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' }, |
|
65 |
is_show_mark_as_paid => { type => 'boolean', default => 'true' }, |
|
66 |
ir_show_mark_as_paid => { type => 'boolean', default => 'true' }, |
|
67 |
ar_show_mark_as_paid => { type => 'boolean', default => 'true' }, |
|
68 |
ap_show_mark_as_paid => { type => 'boolean', default => 'true' }, |
|
69 |
assemblynumber => { type => 'text' },
|
|
70 |
warehouse_id => { type => 'integer' },
|
|
71 |
bin_id => { type => 'integer' },
|
|
72 |
currency_id => { type => 'integer', not_null => 1 },
|
|
73 |
show_weight => { type => 'boolean', default => 'false', not_null => 1 }, |
|
13 |
inventory_accno_id => { type => 'integer' },
|
|
14 |
income_accno_id => { type => 'integer' },
|
|
15 |
expense_accno_id => { type => 'integer' },
|
|
16 |
fxgain_accno_id => { type => 'integer' },
|
|
17 |
fxloss_accno_id => { type => 'integer' },
|
|
18 |
invnumber => { type => 'text' },
|
|
19 |
sonumber => { type => 'text' },
|
|
20 |
weightunit => { type => 'varchar', length => 5 },
|
|
21 |
businessnumber => { type => 'text' },
|
|
22 |
version => { type => 'varchar', length => 8 },
|
|
23 |
closedto => { type => 'date' },
|
|
24 |
revtrans => { type => 'boolean', default => 'false' },
|
|
25 |
ponumber => { type => 'text' },
|
|
26 |
sqnumber => { type => 'text' },
|
|
27 |
rfqnumber => { type => 'text' },
|
|
28 |
customernumber => { type => 'text' },
|
|
29 |
vendornumber => { type => 'text' },
|
|
30 |
audittrail => { type => 'boolean', default => 'false' },
|
|
31 |
articlenumber => { type => 'text' },
|
|
32 |
servicenumber => { type => 'text' },
|
|
33 |
coa => { type => 'text' },
|
|
34 |
itime => { type => 'timestamp', default => 'now()' },
|
|
35 |
mtime => { type => 'timestamp' },
|
|
36 |
rmanumber => { type => 'text' },
|
|
37 |
cnnumber => { type => 'text' },
|
|
38 |
dunning_ar_amount_fee => { type => 'integer' },
|
|
39 |
dunning_ar_amount_interest => { type => 'integer' },
|
|
40 |
dunning_ar => { type => 'integer' },
|
|
41 |
pdonumber => { type => 'text' },
|
|
42 |
sdonumber => { type => 'text' },
|
|
43 |
ar_paid_accno_id => { type => 'integer' },
|
|
44 |
id => { type => 'serial', not_null => 1 },
|
|
45 |
language_id => { type => 'integer' },
|
|
46 |
accounting_method => { type => 'text' },
|
|
47 |
inventory_system => { type => 'text' },
|
|
48 |
profit_determination => { type => 'text' },
|
|
49 |
datev_check_on_sales_invoice => { type => 'boolean', default => 'true' },
|
|
50 |
datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' },
|
|
51 |
datev_check_on_ar_transaction => { type => 'boolean', default => 'true' },
|
|
52 |
datev_check_on_ap_transaction => { type => 'boolean', default => 'true' },
|
|
53 |
datev_check_on_gl_transaction => { type => 'boolean', default => 'true' },
|
|
54 |
payments_changeable => { type => 'integer', default => '0', not_null => 1 },
|
|
55 |
is_changeable => { type => 'integer', default => 2, not_null => 1 },
|
|
56 |
ir_changeable => { type => 'integer', default => 2, not_null => 1 },
|
|
57 |
ar_changeable => { type => 'integer', default => 2, not_null => 1 },
|
|
58 |
ap_changeable => { type => 'integer', default => 2, not_null => 1 },
|
|
59 |
gl_changeable => { type => 'integer', default => 2, not_null => 1 },
|
|
60 |
show_bestbefore => { type => 'boolean', default => 'false' },
|
|
61 |
sales_order_show_delete => { type => 'boolean', default => 'true' },
|
|
62 |
purchase_order_show_delete => { type => 'boolean', default => 'true' },
|
|
63 |
sales_delivery_order_show_delete => { type => 'boolean', default => 'true' },
|
|
64 |
purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' },
|
|
65 |
is_show_mark_as_paid => { type => 'boolean', default => 'true' },
|
|
66 |
ir_show_mark_as_paid => { type => 'boolean', default => 'true' },
|
|
67 |
ar_show_mark_as_paid => { type => 'boolean', default => 'true' },
|
|
68 |
ap_show_mark_as_paid => { type => 'boolean', default => 'true' },
|
|
69 |
max_future_booking_interval => { type => 'integer', default => 360 },
|
|
70 |
assemblynumber => { type => 'text' },
|
|
71 |
warehouse_id => { type => 'integer' },
|
|
72 |
bin_id => { type => 'integer' },
|
|
73 |
show_weight => { type => 'boolean', default => 'false', not_null => 1 },
|
|
74 | 74 |
transfer_default => { type => 'boolean', default => 'true' }, |
75 | 75 |
transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' }, |
76 | 76 |
transfer_default_ignore_onhand => { type => 'boolean', default => 'false' }, |
77 | 77 |
warehouse_id_ignore_onhand => { type => 'integer' }, |
78 | 78 |
bin_id_ignore_onhand => { type => 'integer' }, |
79 |
], |
|
79 |
currency_id => { type => 'integer', not_null => 1 }, |
|
80 |
], |
|
80 | 81 |
|
81 | 82 |
primary_key_columns => [ 'id' ], |
82 | 83 |
|
83 |
allow_inline_column_values => 1, |
|
84 | 84 |
foreign_keys => [ |
85 | 85 |
bin => { |
86 | 86 |
class => 'SL::DB::Bin', |
SL/Form.pm | ||
---|---|---|
1 |
#==================================================================== |
|
1 |
#========= ===========================================================
|
|
2 | 2 |
# LX-Office ERP |
3 | 3 |
# Copyright (C) 2004 |
4 | 4 |
# Based on SQL-Ledger Version 2.1.9 |
... | ... | |
1455 | 1455 |
return $closed; |
1456 | 1456 |
} |
1457 | 1457 |
|
1458 |
# prevents bookings to the to far away future |
|
1459 |
sub date_max_future { |
|
1460 |
$main::lxdebug->enter_sub(); |
|
1461 |
|
|
1462 |
my ($self, $date, $myconfig) = @_; |
|
1463 |
my $dbh = $self->dbconnect($myconfig); |
|
1464 |
|
|
1465 |
my $query = "SELECT 1 FROM defaults WHERE ? - current_date > max_future_booking_interval"; |
|
1466 |
my $sth = prepare_execute_query($self, $dbh, $query, conv_date($date)); |
|
1467 |
|
|
1468 |
my ($max_future_booking_interval) = $sth->fetchrow_array; |
|
1469 |
|
|
1470 |
$main::lxdebug->leave_sub(); |
|
1471 |
|
|
1472 |
return $max_future_booking_interval; |
|
1473 |
} |
|
1474 |
|
|
1475 |
|
|
1458 | 1476 |
sub update_balance { |
1459 | 1477 |
$main::lxdebug->enter_sub(); |
1460 | 1478 |
|
SL/InstanceConfiguration.pm | ||
---|---|---|
178 | 178 |
my ($self) = @_; |
179 | 179 |
return ($self->{data}->{transfer_default_ignore_onhand}); |
180 | 180 |
} |
181 |
# currently unused - value is set via audit_control (Bücherkontrolle) |
|
182 |
sub get_max_future_booking_interval { |
|
183 |
my ($self) = @_; |
|
184 |
return ($self->{data}->{max_future_booking_interval}); |
|
185 |
} |
|
186 |
|
|
181 | 187 |
|
182 | 188 |
|
183 | 189 |
1; |
... | ... | |
320 | 326 |
|
321 | 327 |
Returns the default behavior for the transfer out default feature (true or false) |
322 | 328 |
|
329 |
=item C<get_max_future_booking_interval> |
|
330 |
|
|
331 |
Returns the maximum interval value for future bookings |
|
323 | 332 |
|
324 | 333 |
=back |
325 | 334 |
|
locale/de/all | ||
---|---|---|
388 | 388 |
'Cannot post payment for a closed period!' => 'Es können keine Zahlungen für abgeschlossene Bücher gebucht werden!', |
389 | 389 |
'Cannot post payment!' => 'Zahlung kann nicht gebucht werden!', |
390 | 390 |
'Cannot post storno for a closed period!' => 'Für einen geschlossenen Zeitraum können keine Stornos gebucht werden!', |
391 |
'Cannot post transaction above the maximum future booking date!' => 'Das Buchungsdatum liegt oberhalb des maximal zulässigen Werts. Bitte korrigieren oder Wert erhöhen', |
|
391 | 392 |
'Cannot post transaction for a closed period!' => 'Für einen bereits abgeschlossenen Zeitraum kann keine Buchung angelegt werden!', |
392 | 393 |
'Cannot post transaction with a debit and credit entry for the same account!' => 'Kann Soll und Haben nicht auf dasselbe Konto buchen!', |
393 | 394 |
'Cannot post transaction!' => 'Rechnung kann nicht gebucht werden!', |
... | ... | |
824 | 825 |
'Employee' => 'Bearbeiter', |
825 | 826 |
'Employee #1 saved!' => 'Benutzer #1 gespeichert!', |
826 | 827 |
'Employees' => 'Benutzer', |
827 |
'Empty selection for warehouse will not be added, even if the old bin is still visible (use back and forth to edit again).' => '', |
|
828 |
'Empty selection for warehouse will not be added, even if the old bin is still visible (use back and forth to edit again).' => 'Leere Lager-Auswahl wird ignoriert, selbst wenn noch ein Lagerplatz ausgewählt ist. Alle Daten können durch zurück und vorwärts korrigiert werden.',
|
|
828 | 829 |
'Empty transaction!' => 'Buchung ist leer!', |
829 | 830 |
'End date' => 'Enddatum', |
830 | 831 |
'Enter a description for this new draft.' => 'Geben Sie eine Beschreibung für diesen Entwurf ein.', |
... | ... | |
1223 | 1224 |
'Master Data' => 'Stammdaten', |
1224 | 1225 |
'Master Data Bin Text Deleted' => 'Gelöschte Stammdaten Freitext-Lagerplätze', |
1225 | 1226 |
'Max. Dunning Level' => 'höchste Mahnstufe', |
1227 |
'Maximum future booking interval' => 'Maximale Anzahl von Tagen an denen Buchungen in der Zukunft erlaubt sind.', |
|
1226 | 1228 |
'May' => 'Mai', |
1227 | 1229 |
'May ' => 'Mai', |
1228 | 1230 |
'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen', |
sql/Pg-upgrade2/defaults_add_max_future_booking_date.sql | ||
---|---|---|
1 |
-- @tag: defaults_add_max_future_booking_intervall |
|
2 |
-- @description: Fehleingaben für Buchungen in der Zukunft verhindern (s.a. 1897) |
|
3 |
-- @depends: release_3_0_0 |
|
4 |
-- @charset: utf-8 |
|
5 |
|
|
6 |
ALTER TABLE defaults ADD COLUMN max_future_booking_interval integer DEFAULT 360; |
templates/webpages/am/audit_control.html | ||
---|---|---|
12 | 12 |
<th>[% 'Close Books up to' | $T8 %]</th> |
13 | 13 |
<td>[% L.date_tag('closedto', closedto) %]</td> |
14 | 14 |
</tr> |
15 |
<tr> |
|
16 |
<th>[% 'Maximum future booking interval' | $T8 %]</th> |
|
17 |
<td><input type="text" name="max_future_booking_interval" id="max_future_booking_interval" value="[% HTML.escape(max_future_booking_interval) %]"></td> |
|
18 |
</tr> |
|
15 | 19 |
</table> |
16 | 20 |
|
17 | 21 |
<hr size=3 noshade> |
Auch abrufbar als: Unified diff
Buchungen in unrealistischen Zukunfts-Intervallen vermeiden s.a. Trac 1897
Hinzufügen eines neuen defaults "max_future_booking_interval".
Entsprechend editierbar wie closedto