Revision dbd7c6a9
Von G. Richardson vor mehr als 5 Jahren hinzugefügt
SL/Dev/Inventory.pm | ||
---|---|---|
35 | 35 |
sub set_stock { |
36 | 36 |
my (%params) = @_; |
37 | 37 |
|
38 |
die "param part is missing or not an SL::DB::Part object" unless ref($params{part}) eq 'SL::DB::Part'; |
|
38 |
die "param part is missing or not an SL::DB::Part object" |
|
39 |
unless ref($params{part}) eq 'SL::DB::Part'; |
|
40 |
|
|
39 | 41 |
my $part = delete $params{part}; |
40 | 42 |
die "qty is missing" unless $params{qty} or $params{abs_qty}; |
41 | 43 |
die "need a bin or default bin" unless $part->warehouse_id or $part->bin_id or $params{bin} or $params{bin_id}; |
... | ... | |
196 | 198 |
|
197 | 199 |
my $transfer_type = delete $params{transfer_type}; |
198 | 200 |
|
199 |
die "param transfer_type is not a SL::DB::TransferType object: " . Dumper($transfer_type) unless ref($transfer_type) eq 'SL::DB::TransferType'; |
|
201 |
die "param transfer_type is not a SL::DB::TransferType object: " . Dumper($transfer_type) |
|
202 |
unless ref($transfer_type) eq 'SL::DB::TransferType'; |
|
200 | 203 |
|
201 | 204 |
my $shippingdate = delete $params{shippingdate} // DateTime->today; |
202 | 205 |
|
... | ... | |
229 | 232 |
|
230 | 233 |
my $transfer_type = delete $params{transfer_type} // 'stock'; |
231 | 234 |
|
232 |
my $transfer_type_obj = SL::DB::Manager::TransferType->find_by( direction => 'in', description => $transfer_type ) or die "Can't find transfer_type with direction in and descriptin " . $params{transfer_type}; |
|
235 |
my $transfer_type_obj = SL::DB::Manager::TransferType->find_by( |
|
236 |
direction => 'in', |
|
237 |
description => $transfer_type, |
|
238 |
) or die "Can't find transfer_type with direction in and description " . $params{transfer_type}; |
|
233 | 239 |
|
234 | 240 |
$params{transfer_type} = $transfer_type_obj; |
235 | 241 |
|
... | ... | |
241 | 247 |
|
242 | 248 |
my $transfer_type = delete $params{transfer_type} // 'shipped'; |
243 | 249 |
|
244 |
my $transfer_type_obj = SL::DB::Manager::TransferType->find_by( direction => 'out', description => $transfer_type ) or die "Can't find transfer_type with direction in and descriptin " . $params{transfer_type}; |
|
250 |
my $transfer_type_obj = SL::DB::Manager::TransferType->find_by( |
|
251 |
direction => 'out', |
|
252 |
description => $transfer_type, |
|
253 |
) or die "Can't find transfer_type with direction in and description " . $params{transfer_type}; |
|
245 | 254 |
|
246 | 255 |
$params{transfer_type} = $transfer_type_obj; |
247 | 256 |
|
... | ... | |
250 | 259 |
|
251 | 260 |
sub transfer_sales_delivery_order { |
252 | 261 |
my ($sales_delivery_order) = @_; |
253 |
die "first argument must be a sales delivery order Rose DB object" unless ref($sales_delivery_order) eq 'SL::DB::DeliveryOrder' and $sales_delivery_order->is_sales; |
|
262 |
die "first argument must be a sales delivery order Rose DB object" |
|
263 |
unless ref($sales_delivery_order) eq 'SL::DB::DeliveryOrder' |
|
264 |
and $sales_delivery_order->is_sales; |
|
254 | 265 |
|
255 | 266 |
die "the delivery order has already been delivered" if $sales_delivery_order->delivered; |
256 | 267 |
|
... | ... | |
271 | 282 |
|
272 | 283 |
sub transfer_purchase_delivery_order { |
273 | 284 |
my ($purchase_delivery_order) = @_; |
274 |
die "first argument must be a purchase delivery order Rose DB object" unless ref($purchase_delivery_order) eq 'SL::DB::DeliveryOrder' and not $purchase_delivery_order->is_sales; |
|
285 |
die "first argument must be a purchase delivery order Rose DB object" |
|
286 |
unless ref($purchase_delivery_order) eq 'SL::DB::DeliveryOrder' |
|
287 |
and not $purchase_delivery_order->is_sales; |
|
275 | 288 |
|
276 | 289 |
my ($wh, $bin, $trans_type); |
277 | 290 |
|
Auch abrufbar als: Unified diff
SL::Dev::Inventory - Typo und Formatierung
descriptin -> description
lange Zeilen in mehrere Zeilen umformatiert