Revision c7dfa13f
Von Jan Büren vor mehr als 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
224 | 224 |
my ($self) = @_; |
225 | 225 |
|
226 | 226 |
try { |
227 |
my $new_version_number = $self->order->current_version_number + 1; |
|
227 |
my $current_version_number = $self->order->current_version_number; |
|
228 |
my $new_version_number = $current_version_number + 1; |
|
228 | 229 |
|
229 | 230 |
if ($self->type eq sales_quotation_type() || $self->type eq request_quotation_type()) { |
230 |
$self->order->quonumber($self->order->quonumber . '-' . $new_version_number); |
|
231 |
my $new_quonumber = $self->order->quonumber; |
|
232 |
$new_quonumber =~ s/-$current_version_number$//; |
|
233 |
$self->order->quonumber($new_quonumber . '-' . $new_version_number); |
|
231 | 234 |
} elsif ($self->type eq sales_order_type()|| $self->type eq purchase_order_type()) { |
232 |
$self->order->quonumber($self->order->quonumber . '-' . $new_version_number); |
|
235 |
my $new_ordnumber = $self->order->ordnumber; |
|
236 |
$new_ordnumber =~ s/-$current_version_number$//; |
|
237 |
$self->order->ordnumber($new_ordnumber . '-' . $new_version_number); |
|
233 | 238 |
} else { die "Invalid Call for Sub-Version. Need Order or Quotation."; } |
234 | 239 |
|
235 | 240 |
SL::DB::OrderVersion->new(oe_id => $self->order->id, |
Auch abrufbar als: Unified diff
Unterversionsnummer auch für ABs erhöhen
und postfix stabiler