Revision 7e8a3b38
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
93 | 93 |
# least an empty string, even if we're saving a quotation. |
94 | 94 |
$self->ordnumber('') if !$self->ordnumber; |
95 | 95 |
|
96 |
my $field = $self->quotation ? 'quonumber' : 'ordnumber'; |
|
97 |
$self->create_trans_number if !$self->$field; |
|
96 |
$self->create_trans_number if !$self->record_number; |
|
98 | 97 |
|
99 | 98 |
return 1; |
100 | 99 |
} |
... | ... | |
177 | 176 |
return shift->type eq shift; |
178 | 177 |
} |
179 | 178 |
|
179 |
sub quotation { |
|
180 |
my $type = shift->type(); |
|
181 |
if (any { $type eq $_ } ( |
|
182 |
SALES_ORDER_INTAKE_TYPE(), |
|
183 |
SALES_QUOTATION_TYPE(), |
|
184 |
REQUEST_QUOTATION_TYPE(), |
|
185 |
PURCHASE_QUOTATION_INTAKE_TYPE(), |
|
186 |
)) { |
|
187 |
return 1; |
|
188 |
}; |
|
189 |
return 0; |
|
190 |
} |
|
191 |
|
|
192 |
sub intake { |
|
193 |
my $type = shift->type(); |
|
194 |
if (any { $type eq $_ } ( |
|
195 |
SALES_ORDER_INTAKE_TYPE(), |
|
196 |
PURCHASE_QUOTATION_INTAKE_TYPE(), |
|
197 |
)) { |
|
198 |
return 1; |
|
199 |
}; |
|
200 |
return 0; |
|
201 |
} |
|
202 |
|
|
180 | 203 |
sub deliverydate { |
181 | 204 |
# oe doesn't have deliverydate, but it does have reqdate. |
182 | 205 |
# But this has a different meaning for sales quotations. |
... | ... | |
391 | 414 |
ordnumber payment_id quonumber reqdate salesman_id shippingpoint shipvia taxincluded tax_point taxzone_id |
392 | 415 |
transaction_description vendor_id billing_address_id |
393 | 416 |
)), |
394 |
quotation => !!(($destination_type =~ m{quotation$}) || ($destination_type eq 'purchase_quotation_intake')), |
|
395 |
intake => !!($destination_type =~ m{intake$}), |
|
396 | 417 |
closed => 0, |
397 | 418 |
delivered => 0, |
398 | 419 |
transdate => DateTime->today_local, |
Auch abrufbar als: Unified diff
DB::Order: Funktionen angepasst (kein Angebotsflag/Intakeflag)