Revision 30f8afeb
Von Bernd Bleßmann vor etwa 1 Jahr hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
233 | 233 |
|
234 | 234 |
sub is_sales { |
235 | 235 |
croak 'not an accessor' if @_ > 1; |
236 |
my $type = shift->type(); |
|
237 |
if (any { $type eq $_ } ( |
|
238 |
SALES_ORDER_TYPE(), |
|
239 |
SALES_QUOTATION_TYPE(), |
|
240 |
)) { |
|
241 |
return 1; |
|
242 |
}; |
|
243 |
return 0; |
|
236 |
$_[0]->type_data->properties('is_customer'); |
|
244 | 237 |
} |
245 | 238 |
|
246 | 239 |
sub daily_exchangerate { |
... | ... | |
646 | 639 |
} |
647 | 640 |
|
648 | 641 |
sub customervendor { |
649 |
$_[0]->is_sales ? $_[0]->customer : $_[0]->vendor;
|
|
642 |
$_[0]->type_data->properties('is_customer') ? $_[0]->customer : $_[0]->vendor;
|
|
650 | 643 |
} |
651 | 644 |
|
652 | 645 |
sub date { |
Auch abrufbar als: Unified diff
S:D:Order: is_sales und customervender verwenden TypeData