Revision 314f8fd6
Von Sven Schöling vor etwa 3 Jahren hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
1161 | 1161 |
# order here solves this problem. |
1162 | 1162 |
my $order; |
1163 | 1163 |
$order = SL::DB::DeliveryOrder->new(id => $::form->{id})->load(with => [ 'orderitems', 'orderitems.part' ]) if $::form->{id}; |
1164 |
$order ||= SL::DB::DeliveryOrder->new(orderitems => [], currency_id => $::instance_conf->get_currency_id(), order_type => $self->type_data->validate_type($::form->{type}));
|
|
1164 |
$order ||= SL::DB::DeliveryOrder->new(orderitems => [], currency_id => $::instance_conf->get_currency_id(), order_type => $self->type_data->validate($::form->{type})); |
|
1165 | 1165 |
|
1166 | 1166 |
my $cv_id_method = $self->cv . '_id'; |
1167 | 1167 |
if (!$::form->{id} && $::form->{$cv_id_method}) { |
SL/Controller/DeliveryOrder/TypeData.pm | ||
---|---|---|
20 | 20 |
return $o; |
21 | 21 |
} |
22 | 22 |
|
23 |
sub validate { |
|
24 |
my ($self, $string) = @_; |
|
25 |
validate_type($string); |
|
26 |
} |
|
27 |
|
|
23 | 28 |
sub text { |
24 | 29 |
my ($self, $string) = @_; |
25 | 30 |
get3($self->c->type, "text", $string); |
SL/DB/Manager/DeliveryOrder.pm | ||
---|---|---|
29 | 29 |
my $class = shift; |
30 | 30 |
my $type = lc(shift || ''); |
31 | 31 |
|
32 |
return type => validate_type($type); |
|
32 |
return order_type => validate_type($type);
|
|
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
sub _sort_spec { |
Auch abrufbar als: Unified diff
DeliveryOrder: fix validate on save