Revision 2746ccd0
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
84 | 84 |
return shift->type eq shift; |
85 | 85 |
} |
86 | 86 |
|
87 |
sub displayable_type { |
|
88 |
my $type = shift->type; |
|
89 |
|
|
90 |
return $::locale->text('Sales quotation') if $type eq 'sales_quotation'; |
|
91 |
return $::locale->text('Request quotation') if $type eq 'request_quotation'; |
|
92 |
return $::locale->text('Sales Order') if $type eq 'sales_order'; |
|
93 |
return $::locale->text('Purchase Order') if $type eq 'purchase_order'; |
|
94 |
|
|
95 |
die 'invalid type'; |
|
96 |
} |
|
97 |
|
|
98 |
|
|
87 | 99 |
sub is_sales { |
88 | 100 |
croak 'not an accessor' if @_ > 1; |
89 | 101 |
return shift->customer_id; |
... | ... | |
105 | 117 |
} |
106 | 118 |
} |
107 | 119 |
|
120 |
sub displayable_state { |
|
121 |
my ($self) = @_; |
|
122 |
|
|
123 |
return $self->closed ? $::locale->text('closed') : $::locale->text('open'); |
|
124 |
} |
|
125 |
|
|
108 | 126 |
sub abschlag_invoices { |
109 | 127 |
return shift()->invoices(query => [ abschlag => 1 ]); |
110 | 128 |
} |
Auch abrufbar als: Unified diff
Helfermethoden in Belegobjekten.