Revision 1c9c1ad9
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
149 | 149 |
my ($delivery_order, $custom_shipto); |
150 | 150 |
if (!$self->db->with_transaction(sub { |
151 | 151 |
require SL::DB::DeliveryOrder; |
152 |
($delivery_order, $custom_shipto) = SL::DB::DeliveryOrder->new_from($self); |
|
152 |
($delivery_order, $custom_shipto) = SL::DB::DeliveryOrder->new_from($self, %params);
|
|
153 | 153 |
$delivery_order->save; |
154 | 154 |
$custom_shipto->save if $custom_shipto; |
155 | 155 |
$self->link_to_record($delivery_order); |
156 |
$self->update_attributes(delivered => 1); |
|
156 | 157 |
1; |
157 | 158 |
})) { |
158 | 159 |
return wantarray ? () : undef; |
... | ... | |
212 | 213 |
|
213 | 214 |
Creates a new delivery order with C<$self> as the basis by calling |
214 | 215 |
L<SL::DB::DeliveryOrder::new_from>. That delivery order is saved, and |
215 |
C<$self> is linked to the new invoice via L<SL::DB::RecordLink>. |
|
216 |
C<$self> is linked to the new invoice via |
|
217 |
L<SL::DB::RecordLink>. C<$self>'s C<delivered> attribute is set to |
|
218 |
C<true>, and C<$self> is saved. |
|
216 | 219 |
|
217 | 220 |
The arguments in C<%params> are passed to |
218 | 221 |
L<SL::DB::DeliveryOrder::new_from>. |
Auch abrufbar als: Unified diff
SL::DB::Order: bei Wandlung in Lieferschein delivered auf 1 setzen