Revision 7cad87f8
Von Bernd Bleßmann vor mehr als 4 Jahren hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
58 | 58 |
|
59 | 59 |
__PACKAGE__->before_save('_before_save_set_ord_quo_number'); |
60 | 60 |
__PACKAGE__->before_save('_before_save_create_new_project'); |
61 |
__PACKAGE__->before_save('_before_save_remove_empty_custom_shipto'); |
|
62 |
__PACKAGE__->before_save('_before_save_set_custom_shipto_module'); |
|
61 | 63 |
|
62 | 64 |
# hooks |
63 | 65 |
|
... | ... | |
98 | 100 |
return 1; |
99 | 101 |
} |
100 | 102 |
|
103 |
|
|
104 |
sub _before_save_remove_empty_custom_shipto { |
|
105 |
my ($self) = @_; |
|
106 |
|
|
107 |
$self->custom_shipto(undef) if $self->custom_shipto && $self->custom_shipto->is_empty; |
|
108 |
|
|
109 |
return 1; |
|
110 |
} |
|
111 |
|
|
112 |
sub _before_save_set_custom_shipto_module { |
|
113 |
my ($self) = @_; |
|
114 |
|
|
115 |
$self->custom_shipto->module('OE') if $self->custom_shipto; |
|
116 |
|
|
117 |
return 1; |
|
118 |
} |
|
119 |
|
|
101 | 120 |
# methods |
102 | 121 |
|
103 | 122 |
sub items { goto &orderitems; } |
Auch abrufbar als: Unified diff
S/D/Order: before_save-hooks f. indiv. Lieferadressen, um …
- keine leeren zu speichern
- das Modul immer auf 'OE' zu setzen