76 |
76 |
->calculate($purchase_order)
|
77 |
77 |
->write_to_objects;
|
78 |
78 |
|
79 |
|
is($purchase_order->orderitems->[0]->{shipped_qty}, undef, "first purchase orderitem has no shipped_qty");
|
80 |
|
is($purchase_order->orderitems->[0]->{delivered}, '', "first purchase orderitem is not delivered");
|
|
79 |
is($purchase_order->orderitems->[0]->{shipped_qty}, 0, "first purchase orderitem has no shipped_qty");
|
|
80 |
is($purchase_order->orderitems->[0]->{delivered}, '', "first purchase orderitem is not delivered");
|
81 |
81 |
|
82 |
82 |
my $purchase_orderitem_part1 = SL::DB::Manager::OrderItem->find_by( parts_id => $part1->id, trans_id => $purchase_order->id);
|
83 |
83 |
|
84 |
|
is($purchase_orderitem_part1->shipped_qty, undef, "OrderItem shipped_qty method ok");
|
|
84 |
is($purchase_orderitem_part1->shipped_qty, 0, "OrderItem shipped_qty method ok");
|
85 |
85 |
|
86 |
86 |
is($purchase_order->closed, 0, 'purchase order is open');
|
87 |
87 |
is($purchase_order->delivered, '', 'purchase order is not delivered');
|
... | ... | |
108 |
108 |
->calculate($purchase_order)
|
109 |
109 |
->write_to_objects;
|
110 |
110 |
|
111 |
|
is($purchase_order->orderitems->[0]->{shipped_qty}, undef, "require_stock_out => 1: first purchase orderitem has no shipped_qty");
|
112 |
|
is($purchase_order->orderitems->[0]->{delivered}, '', "require_stock_out => 1: first purchase orderitem is not delivered");
|
|
111 |
is($purchase_order->orderitems->[0]->{shipped_qty}, 0, "require_stock_out => 1: first purchase orderitem has no shipped_qty");
|
|
112 |
is($purchase_order->orderitems->[0]->{delivered}, '', "require_stock_out => 1: first purchase orderitem is not delivered");
|
113 |
113 |
|
114 |
114 |
# ship items from delivery order
|
115 |
115 |
SL::Dev::Inventory::transfer_purchase_delivery_order($purchase_delivery_order);
|
... | ... | |
145 |
145 |
->calculate($sales_order)
|
146 |
146 |
->write_to_objects;
|
147 |
147 |
|
148 |
|
is($sales_order->orderitems->[0]->{shipped_qty}, undef, "first sales orderitem has no shipped_qty");
|
149 |
|
is($sales_order->orderitems->[0]->{delivered}, '', "first sales orderitem is not delivered");
|
|
148 |
is($sales_order->orderitems->[0]->{shipped_qty}, 0, "first sales orderitem has no shipped_qty");
|
|
149 |
is($sales_order->orderitems->[0]->{delivered}, '', "first sales orderitem is not delivered");
|
150 |
150 |
|
151 |
151 |
my $orderitem_part1 = SL::DB::Manager::OrderItem->find_by(parts_id => $part1->id, trans_id => $sales_order->id);
|
152 |
152 |
my $orderitem_part2 = SL::DB::Manager::OrderItem->find_by(parts_id => $part2->id, trans_id => $sales_order->id);
|
153 |
153 |
|
154 |
|
is($orderitem_part1->shipped_qty, undef, "OrderItem shipped_qty method ok");
|
|
154 |
is($orderitem_part1->shipped_qty, 0, "OrderItem shipped_qty method ok");
|
155 |
155 |
|
156 |
156 |
# create sales delivery order from sales order
|
157 |
157 |
my $sales_delivery_order = $sales_order->convert_to_delivery_order;
|
... | ... | |
172 |
172 |
->calculate($sales_order)
|
173 |
173 |
->write_to_objects;
|
174 |
174 |
|
175 |
|
is($sales_order->orderitems->[0]->{shipped_qty}, undef, "require_stock_out => 1: first sales orderitem has no shipped_qty");
|
176 |
|
is($sales_order->orderitems->[0]->{delivered}, '', "require_stock_out => 1: first sales orderitem is not delivered");
|
|
175 |
is($sales_order->orderitems->[0]->{shipped_qty}, 0, "require_stock_out => 1: first sales orderitem has no shipped_qty");
|
|
176 |
is($sales_order->orderitems->[0]->{delivered}, '', "require_stock_out => 1: first sales orderitem is not delivered");
|
177 |
177 |
|
178 |
178 |
# ship items from delivery order
|
179 |
179 |
SL::Dev::Inventory::transfer_sales_delivery_order($sales_delivery_order);
|
SL::Helper::ShippedQty: write_to garantiert eine Zahl für shipped_qty