Revision 8f413df4
Von Jan Büren vor mehr als 3 Jahren hinzugefügt
SL/DB/Order.pm | ||
---|---|---|
275 | 275 |
} |
276 | 276 |
} |
277 | 277 |
|
278 |
$self->update_attributes(delivered => 1); |
|
278 |
$self->update_attributes(delivered => 1) unless $::instance_conf->get_shipped_qty_require_stock_out;
|
|
279 | 279 |
1; |
280 | 280 |
})) { |
281 | 281 |
return undef; |
t/helper/shipped_qty.t | ||
---|---|---|
75 | 75 |
Rose::DB::Object::Helpers::forget_related($purchase_order, 'orderitems'); |
76 | 76 |
$purchase_order->orderitems; |
77 | 77 |
|
78 |
local $::instance_conf->data->{shipped_qty_require_stock_out} = 1; |
|
78 | 79 |
SL::Helper::ShippedQty |
79 | 80 |
->new(require_stock_out => 1) # should make no difference while there is no delivery order |
80 | 81 |
->calculate($purchase_order) |
... | ... | |
88 | 89 |
is($purchase_orderitem_part1->shipped_qty, 0, "OrderItem shipped_qty method ok"); |
89 | 90 |
|
90 | 91 |
is($purchase_order->closed, 0, 'purchase order is open'); |
92 |
# set delivered only if the do is also stocked in |
|
91 | 93 |
ok(!$purchase_order->delivered, 'purchase order is not delivered'); |
92 | 94 |
|
93 | 95 |
note('converting purchase order to delivery order'); |
Auch abrufbar als: Unified diff
S/DB/Order convert_to_delivery_order delivered in Abhängigkeit von stock_out setzen
Testfall ergänzt