Revision afc18fdc
Von Jan Büren vor etwa 2 Jahren hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
374 | 374 |
transdate => DateTime->today_local, |
375 | 375 |
employee => SL::DB::Manager::Employee->current, |
376 | 376 |
); |
377 |
# reqdate in quotation is 'offer is valid until reqdate' |
|
378 |
# reqdate in order is 'will be delivered until reqdate' |
|
379 |
# both dates are setable (on|off) |
|
380 |
# and may have a additional interval in days (+ n days) |
|
381 |
# dies if this convention will change |
|
382 |
$args{reqdate} = $from_to->{to} =~ m/_quotation$/ |
|
383 |
? $::instance_conf->get_reqdate_on |
|
384 |
? DateTime->today_local->next_workday(extra_days => $::instance_conf->get_reqdate_interval)->to_kivitendo |
|
385 |
: undef |
|
386 |
: $from_to->{to} =~ m/_order$/ |
|
387 |
? $::instance_conf->get_deliverydate_on |
|
388 |
? DateTime->today_local->next_workday(extra_days => $::instance_conf->get_delivery_date_interval)->to_kivitendo |
|
389 |
: undef |
|
390 |
: die "Wrong state for reqdate"; |
|
377 | 391 |
|
378 | 392 |
if ( $is_abbr_any->(qw(sopo poso rqso sosq porq rqsq sqrq sorq)) ) { |
379 | 393 |
$args{ordnumber} = undef; |
380 | 394 |
$args{quonumber} = undef; |
381 |
$args{reqdate} = DateTime->today_local->next_workday(); |
|
382 | 395 |
} |
383 | 396 |
if ( $is_abbr_any->(qw(sopo sqrq sorq)) ) { |
384 | 397 |
$args{customer_id} = undef; |
Auch abrufbar als: Unified diff
S/D/Order new_from reqdate je nach Beleg-Typ und Konfig setzen
offen: Aktuell wird der Einkauf exakt wie der Verkauf behandelt
ggf, genauer differenzieren. Wobei der vorherige Standard
(next_working_day) wahrscheinlich auch nicht passt.