Revision 133c31d7
Von Thomas Heck vor mehr als 12 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
1629 | 1629 |
delete($form->{$idx}); |
1630 | 1630 |
} |
1631 | 1631 |
|
1632 |
# clear reqdate unless changed |
|
1633 |
if ($form->{reqdate} && $form->{id}) {
|
|
1632 |
# clear reqdate and transdate unless changed
|
|
1633 |
if ( $form->{reqdate} && $form->{id} ) {
|
|
1634 | 1634 |
my $saved_order = OE->retrieve_simple(id => $form->{id}); |
1635 |
if ($saved_order && $saved_order->{reqdate} eq $form->{reqdate}) { |
|
1636 |
delete $form->{reqdate}; |
|
1635 |
if ( $saved_order && $saved_order->{reqdate} eq $form->{reqdate} && $saved_order->{transdate} eq $form->{transdate} ) { |
|
1636 |
|
|
1637 |
my $dbh = $form->get_standard_dbh; |
|
1638 |
|
|
1639 |
my $wday = (localtime(time))[6]; |
|
1640 |
my $next_workday = $wday == 5 ? 3 : $wday == 6 ? 2 : 1; |
|
1641 |
|
|
1642 |
my $query = 'SELECT |
|
1643 |
date(current_date + interval \''. $next_workday .' days\') AS reqdate, |
|
1644 |
date(current_date) AS transdate'; |
|
1645 |
my $ref = selectfirst_hashref_query($form, $dbh, $query); |
|
1646 |
|
|
1647 |
map( |
|
1648 |
{ $form->{$_} = $ref->{$_} } |
|
1649 |
keys %{$ref} |
|
1650 |
); |
|
1637 | 1651 |
} |
1638 | 1652 |
} |
1639 | 1653 |
|
Auch abrufbar als: Unified diff
Lieferdatum u. Auftragsdatum beim 'als neu speichern' von Aufträgen neuberechnen
fixt #1959