Revision 7f94d4ee
Von Werner Hahn vor mehr als 8 Jahren hinzugefügt
SL/WH.pm | ||
---|---|---|
47 | 47 |
|
48 | 48 |
my ($self, @args) = @_; |
49 | 49 |
|
50 |
$main::lxdebug->dump(0, 'WH: TRANSFER @_',\@_); |
|
51 |
$main::lxdebug->dump(0, 'WH: TRANSFER SELF',\$self); |
|
52 | 50 |
if (!@args) { |
53 | 51 |
$::lxdebug->leave_sub; |
54 | 52 |
return; |
... | ... | |
65 | 63 |
|
66 | 64 |
my $objectify = sub { |
67 | 65 |
my ($transfer, $field, $class, @find_by) = @_; |
68 |
$main::lxdebug->dump(0, 'WH: TRANSFER II @_',\@_); |
|
69 |
$main::lxdebug->dump(0, 'WH: TRANSFER II TRANSFER',\$transfer); |
|
70 | 66 |
|
71 | 67 |
@find_by = (description => $transfer->{$field}) unless @find_by; |
72 | 68 |
|
... | ... | |
83 | 79 |
my $db = SL::DB::Inventory->new->db; |
84 | 80 |
$db->with_transaction(sub{ |
85 | 81 |
while (my $transfer = shift @args) { |
86 |
$main::lxdebug->dump(0, 'WH: WAREHOUSE TRANSFER ',\$transfer); |
|
87 | 82 |
my ($trans_id) = selectrow_query($::form, $::form->get_standard_dbh, qq|SELECT nextval('id')|); |
88 | 83 |
|
89 | 84 |
my $part = $objectify->($transfer, 'parts', 'SL::DB::Part'); |
... | ... | |
115 | 110 |
? $now : $transfer->{shippingdate}, |
116 | 111 |
map { $_ => $transfer->{$_} } qw(chargenumber bestbefore oe_id delivery_order_items_stock_id invoice_id comment), |
117 | 112 |
); |
118 |
my $unit_obj = $part->unit_obj;## |
|
119 |
$main::lxdebug->dump(0, 'WH: WAREHOUSE PART:', \$part); |
|
120 |
$main::lxdebug->dump(0, "WH: WAREHOUSE I QTY: $qty --", \$unit); |
|
113 |
|
|
121 | 114 |
if ($unit) { |
122 |
$main::lxdebug->message(0, "WH: WAREHOUSE $qty -- $unit -- $part->unit_obj"); |
|
123 | 115 |
$qty = $unit->convert_to($qty, $part->unit_obj); |
124 | 116 |
} |
125 | 117 |
|
Auch abrufbar als: Unified diff
Shopordermasstrnsfer mit auslagern