Revision bee7d33f
Von Jan Büren vor fast 4 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
71 | 71 |
$self->order->transdate(DateTime->now_local()); |
72 | 72 |
my $extra_days = $self->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : |
73 | 73 |
$self->{type} eq 'sales_order' ? $::instance_conf->get_delivery_date_interval : 1; |
74 |
$self->order->reqdate(DateTime->today_local->next_workday(extra_days => $extra_days)) if !$self->order->reqdate; |
|
74 |
|
|
75 |
if ( ($self->{type} eq 'sales_order' && $::instance_conf->get_deliverydate_on) |
|
76 |
|| ($self->{type} eq 'sales_quotation' && $::instance_conf->get_reqdate_on) |
|
77 |
&& (!$self->order->reqdate)) { |
|
78 |
$self->order->reqdate(DateTime->today_local->next_workday(extra_days => $extra_days)); |
|
79 |
} |
|
75 | 80 |
|
76 | 81 |
|
77 | 82 |
$self->pre_render(); |
... | ... | |
220 | 225 |
? DateTime->today_local |
221 | 226 |
: $order->transdate; |
222 | 227 |
|
223 |
# Set new reqdate unless changed |
|
228 |
# Set new reqdate unless changed if it is enabled in client config
|
|
224 | 229 |
if ($order->reqdate == $saved_order->reqdate) { |
225 | 230 |
my $extra_days = $self->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : |
226 | 231 |
$self->{type} eq 'sales_order' ? $::instance_conf->get_delivery_date_interval : 1; |
227 |
$new_attrs{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days); |
|
232 |
|
|
233 |
if ( ($self->{type} eq 'sales_order' && !$::instance_conf->get_deliverydate_on) |
|
234 |
|| ($self->{type} eq 'sales_quotation' && !$::instance_conf->get_reqdate_on)) { |
|
235 |
$new_attrs{reqdate} = ''; |
|
236 |
} else { |
|
237 |
$new_attrs{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days); |
|
238 |
} |
|
228 | 239 |
} else { |
229 | 240 |
$new_attrs{reqdate} = $order->reqdate; |
230 | 241 |
} |
SL/DB/MetaSetup/Default.pm | ||
---|---|---|
56 | 56 |
datev_check_on_sales_invoice => { type => 'boolean', default => 'true' }, |
57 | 57 |
datev_export_format => { type => 'enum', check_in => [ 'cp1252', 'cp1252-translit', 'utf-8' ], db_type => 'datev_export_format_enum', default => 'cp1252-translit' }, |
58 | 58 |
delivery_date_interval => { type => 'integer', default => '0' }, |
59 |
deliverydate_on => { type => 'boolean', default => 'true' }, |
|
59 | 60 |
disabled_price_sources => { type => 'array' }, |
60 | 61 |
doc_delete_printfiles => { type => 'boolean', default => 'false' }, |
61 | 62 |
doc_files => { type => 'boolean', default => 'false' }, |
... | ... | |
133 | 134 |
purchase_order_show_delete => { type => 'boolean', default => 'true' }, |
134 | 135 |
quick_search_modules => { type => 'array' }, |
135 | 136 |
reqdate_interval => { type => 'integer', default => '0' }, |
137 |
reqdate_on => { type => 'boolean', default => 'true' }, |
|
136 | 138 |
require_transaction_description_ps => { type => 'boolean', default => 'false', not_null => 1 }, |
137 | 139 |
requirement_spec_section_order_part_id => { type => 'integer' }, |
138 | 140 |
revtrans => { type => 'boolean', default => 'false' }, |
SL/OE.pm | ||
---|---|---|
986 | 986 |
if (!$form->{id}) { |
987 | 987 |
my $extra_days = $form->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : |
988 | 988 |
$form->{type} eq 'sales_order' ? $::instance_conf->get_delivery_date_interval : 1; |
989 |
$form->{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days)->to_kivitendo; |
|
989 |
if ( ($form->{type} eq 'sales_order' && !$::instance_conf->get_deliverydate_on) |
|
990 |
|| ($form->{type} eq 'sales_quotation' && !$::instance_conf->get_reqdate_on)) { |
|
991 |
$form->{reqdate} = ''; |
|
992 |
} else { |
|
993 |
$form->{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days)->to_kivitendo; |
|
994 |
} |
|
990 | 995 |
$form->{transdate} = DateTime->today_local->to_kivitendo; |
991 | 996 |
} |
992 | 997 |
|
bin/mozilla/oe.pl | ||
---|---|---|
1781 | 1781 |
if ( $saved_order && $saved_order->{reqdate} eq $form->{reqdate} && $saved_order->{transdate} eq $form->{transdate} ) { |
1782 | 1782 |
my $extra_days = $form->{type} eq 'sales_quotation' ? $::instance_conf->get_reqdate_interval : |
1783 | 1783 |
$form->{type} eq 'sales_order' ? $::instance_conf->get_delivery_date_interval : 1; |
1784 |
|
|
1785 |
if ( ($form->{type} eq 'sales_order' && !$::instance_conf->get_deliverydate_on) |
|
1786 |
|| ($form->{type} eq 'sales_quotation' && !$::instance_conf->get_reqdate_on)) { |
|
1787 |
$form->{reqdate} = ''; |
|
1788 |
} else { |
|
1784 | 1789 |
$form->{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days)->to_kivitendo; |
1790 |
} |
|
1785 | 1791 |
$form->{transdate} = DateTime->today_local->to_kivitendo; |
1786 | 1792 |
} |
1787 | 1793 |
} |
1788 |
|
|
1789 | 1794 |
# update employee |
1790 | 1795 |
$form->get_employee(); |
1791 | 1796 |
|
doc/changelog | ||
---|---|---|
47 | 47 |
eines Loginnamens auch eine E-Mail-Adresse verwendet werden. Es ist |
48 | 48 |
nicht nötig, dass diese Adresse einem der Anwenderkonten zugeordnet |
49 | 49 |
ist. |
50 |
- Lieferdatum und Gültigkeitsdatum können optional auch nicht mehr gesetzt werden |
|
50 | 51 |
|
51 | 52 |
Bugfixes (Tracker: https://www.kivitendo.de/redmine): |
52 | 53 |
97 Benutzer löschen unter System->Benutzer funktioniert nicht |
locale/de/all | ||
---|---|---|
1649 | 1649 |
'If missing then the start date will be used.' => 'Falls es fehlt, so wird die erste Rechnung für das Startdatum erzeugt.', |
1650 | 1650 |
'If one or more space separated serial numbers are assigned in a sales invoice, match the charge number of the inventory item. Assumes that Serial Number and Charge Number have 1:1 relation. Otherwise throw a error message for the default sales invoice transfer.' => 'Falls eine oder mehrere Leerzeichen separierte Seriennummern in Verkaufsrechnungen definiert sind, nutz diese als Chargennummern fürs Standard-Auslagern über Rechnung. Seriennummern und eingelagerte Chargen kommen jeweils exakt nur einmal vor. Falls die Chargennummer oder das Mengenverhältnis (1:1) in keinem Lagerort existiert wird eine Fehlermeldung beim Auslagern generiert.', |
1651 | 1651 |
'If searching a part from a document and no part is found then offer to create a new part.' => 'Wenn bei der Artikelsuche aus einem Dokument heraus kein Artikel gefunden wird, dann wird ermöglicht, von dort aus einen neuen Artikel anzulegen.', |
1652 |
'If set to no the \'delivery date\' field for sales orders won\'t be set at all.' => 'Falls der Wert auf Nein gesetzt wird, wird überhaupt kein Lieferdatum in Verkaufsaufträgen gesetzt', |
|
1653 |
'If set to no the \'valid until\' field for sales quotation won\'t be set at all.' => 'Falls der Wert auf Nein gesetzt wird, wird überhaupt kein Gültigkeitsdatum bei Verkaufs-Angeboten gesetzt', |
|
1652 | 1654 |
'If the article type is set to \'mixed\' then a column called \'part_type\' or called \'pclass\' must be present.' => 'Falls der Artikeltyp auf \'mixed\' gesetzt ist muss entweder eine Spalte \'part_type\' oder \'pclass\' im Import vorhanden sein', |
1653 | 1655 |
'If the automatic creation of invoices for fees and interest is switched on for a dunning level then the following accounts will be used for the invoice.' => 'Wenn das automatische Erstellen einer Rechnung über Mahngebühren und Zinsen für ein Mahnlevel aktiviert ist, so werden die folgenden Konten für die Rechnung benutzt.', |
1654 | 1656 |
'If the counted quantity differs more than this threshold from the quantity in the database, a warning will be shown. Set to 0 to switch of this feature.' => 'Wenn die gezählte Menge mehr als diesen Schwellenwert von der Menge in der Datenbank abweicht, wird eine Warnmeldung angezeigt. Setzen Sie den Schwellenwert auf 0, um dieses Feature abzuschalten.', |
... | ... | |
2934 | 2936 |
'Set (set to)' => 'Setze', |
2935 | 2937 |
'Set all source and memo fields' => 'Alle Beleg-/Memo-Felder setzen', |
2936 | 2938 |
'Set count for one or more of the items to select them' => 'Zum Selektieren bitte Menge für einen oder mehrere Artikel setzen', |
2939 |
'Set delivery date for Sales Orders' => 'Lieferdatum im Verkaufsauftrag setzen', |
|
2937 | 2940 |
'Set eMail text' => 'E-Mail Text eingeben', |
2938 | 2941 |
'Set fields' => 'Felder setzen', |
2939 | 2942 |
'Set lastcost' => 'EK-Preis übernehmen', |
... | ... | |
2941 | 2944 |
'Set the invoice duedate as the default execution date for SEPA export.' => 'Das Fälligkeitsdatum des Belegs als Ausführungsdatum im SEPA-Export setzen.', |
2942 | 2945 |
'Set the invoice skonto date (if exists) as the default execution date for SEPA export.' => 'Das Skonto-Datum des Belegs als Ausführungsdatum im SEPA-Export setzen. Hat Priorität vor dem Fälligkeitsdatum.', |
2943 | 2946 |
'Set to paid missing' => 'Fehlbetrag setzen', |
2947 |
'Set valid until date for Sales Quotation' => 'Gültigkeitsdatum bei Verkaufs-Angeboten setzen', |
|
2944 | 2948 |
'Settings' => 'Einstellungen', |
2945 | 2949 |
'Setup Menu' => 'Menü-Variante', |
2946 | 2950 |
'Ship to (database ID)' => 'Lieferadresse (Datenbank-ID)', |
locale/en/all | ||
---|---|---|
1649 | 1649 |
'If missing then the start date will be used.' => '', |
1650 | 1650 |
'If one or more space separated serial numbers are assigned in a sales invoice, match the charge number of the inventory item. Assumes that Serial Number and Charge Number have 1:1 relation. Otherwise throw a error message for the default sales invoice transfer.' => '', |
1651 | 1651 |
'If searching a part from a document and no part is found then offer to create a new part.' => '', |
1652 |
'If set to no the \'delivery date\' field for sales orders won\'t be set at all.' => '', |
|
1653 |
'If set to no the \'valid until\' field for sales quotation won\'t be set at all.' => '', |
|
1652 | 1654 |
'If the article type is set to \'mixed\' then a column called \'part_type\' or called \'pclass\' must be present.' => '', |
1653 | 1655 |
'If the automatic creation of invoices for fees and interest is switched on for a dunning level then the following accounts will be used for the invoice.' => '', |
1654 | 1656 |
'If the counted quantity differs more than this threshold from the quantity in the database, a warning will be shown. Set to 0 to switch of this feature.' => '', |
... | ... | |
2934 | 2936 |
'Set (set to)' => '', |
2935 | 2937 |
'Set all source and memo fields' => '', |
2936 | 2938 |
'Set count for one or more of the items to select them' => '', |
2939 |
'Set delivery date for Sales Orders' => '', |
|
2937 | 2940 |
'Set eMail text' => '', |
2938 | 2941 |
'Set fields' => '', |
2939 | 2942 |
'Set lastcost' => '', |
... | ... | |
2941 | 2944 |
'Set the invoice duedate as the default execution date for SEPA export.' => '', |
2942 | 2945 |
'Set the invoice skonto date (if exists) as the default execution date for SEPA export.' => '', |
2943 | 2946 |
'Set to paid missing' => '', |
2947 |
'Set valid until date for Sales Quotation' => '', |
|
2944 | 2948 |
'Settings' => '', |
2945 | 2949 |
'Setup Menu' => '', |
2946 | 2950 |
'Ship to (database ID)' => '', |
sql/Pg-upgrade2/defaults_req_delivery_date.pl | ||
---|---|---|
1 |
# @tag: defaults_req_delivery_date |
|
2 |
# @description: Einstellung ob Liefertermin oder Gültigkeitstermin überhaupt gesetzt werden soll |
|
3 |
# @depends: release_3_5_6_1 |
|
4 |
package SL::DBUpgrade2::defaults_req_delivery_date; |
|
5 |
|
|
6 |
use utf8; |
|
7 |
|
|
8 |
use parent qw(SL::DBUpgrade2::Base); |
|
9 |
use strict; |
|
10 |
|
|
11 |
sub run { |
|
12 |
my ($self) = @_; |
|
13 |
|
|
14 |
# this query will fail if column already exist (new database) |
|
15 |
$self->db_query(qq|ALTER TABLE defaults ADD COLUMN reqdate_on boolean DEFAULT true|); |
|
16 |
$self->db_query(qq|ALTER TABLE defaults ADD COLUMN deliverydate_on boolean DEFAULT true|); |
|
17 |
return 1; |
|
18 |
} |
|
19 |
|
|
20 |
1; |
templates/webpages/client_config/_posting_configuration.html | ||
---|---|---|
86 | 86 |
<td>[% L.select_tag('defaults.balance_startdate_method', SELF.balance_startdate_method_options, value_key = 'value', title_key = 'title', default = SELF.defaults.balance_startdate_method) %]</td> |
87 | 87 |
<td>[% LxERP.t8('This option controls the method used for determining the startdate for the balance report.') %]</td> |
88 | 88 |
</tr> |
89 |
<tr> |
|
90 |
<td align="right">[% LxERP.t8('Set valid until date for Sales Quotation') %]</td> |
|
91 |
<td>[% L.yes_no_tag('defaults.reqdate_on', SELF.defaults.reqdate_on) %]</td> |
|
92 |
<td>[% LxERP.t8("If set to no the 'valid until' field for sales quotation won't be set at all.") %]</td> |
|
93 |
</tr> |
|
89 | 94 |
<tr> |
90 | 95 |
<td align="right">[% LxERP.t8('Sales Quotation valid interval') %]</td> |
91 | 96 |
<td>[% L.input_tag('defaults.reqdate_interval', LxERP.format_amount(SELF.defaults.reqdate_interval, 0), style=style) %]</td> |
92 | 97 |
<td>[% LxERP.t8('Usually the sales quotation is valid until the next working day. If a value is set here then the quotation will be valid for at least that many days. The resulting date will be adjusted to the next working day if it ends up on a weekend.') %]</td> |
93 | 98 |
</tr> |
99 |
<tr> |
|
100 |
<td align="right">[% LxERP.t8('Set delivery date for Sales Orders') %]</td> |
|
101 |
<td>[% L.yes_no_tag('defaults.deliverydate_on', SELF.defaults.deliverydate_on) %]</td> |
|
102 |
<td>[% LxERP.t8("If set to no the 'delivery date' field for sales orders won't be set at all.") %]</td> |
|
103 |
</tr> |
|
94 | 104 |
<tr> |
95 | 105 |
<td align="right">[% LxERP.t8('Sales Order delivery date interval') %]</td> |
96 | 106 |
<td>[% L.input_tag('defaults.delivery_date_interval', LxERP.format_amount(SELF.defaults.delivery_date_interval, 0), style=style) %]</td> |
Auch abrufbar als: Unified diff
Mandantenkonfig: Lieferdatum bei VK-Auftrag und Gültigsdatum bei VK-Angebot
Anstatt diese beiden Werte zu berechnen, gibt es die Möglichkeit
diese konfigurativ gar nicht zu setzen. Hoffentlich letzmalig auch
für die OE.pm implementiert.