Revision db7a2e79
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/DB/Letter.pm | ||
---|---|---|
28 | 28 |
$self; |
29 | 29 |
} |
30 | 30 |
|
31 |
sub is_sales { |
|
32 |
die 'not an accessor' if @_ > 1; |
|
33 |
$_[0]{customer_id} * 1; |
|
34 |
} |
|
35 |
|
|
36 |
sub has_customer_vendor { |
|
37 |
my ($self) = @_; |
|
38 |
die 'not an accessor' if @_ > 1; |
|
39 |
|
|
40 |
return $self->is_sales |
|
41 |
? ($self->customer_id && $self->customer) |
|
42 |
: ($self->vendor_id && $self->vendor); |
|
43 |
} |
|
44 |
|
|
45 |
sub customer_vendor { |
|
46 |
die 'not an accessor' if @_ > 1; |
|
47 |
$_[0]->is_sales ? $_[0]->customer : $_[0]->vendor; |
|
48 |
} |
|
49 |
|
|
50 |
sub customer_vendor_id { |
|
51 |
die 'not an accessor' if @_ > 1; |
|
52 |
$_[0]->customer_id || $_[0]->vendor_id; |
|
53 |
} |
|
54 |
|
|
31 | 55 |
1; |
Auch abrufbar als: Unified diff
Briefe: Lieferantenbriefe