bin => $dst_bin->id,
qty => $qty,
)->save;
- }
+ # Standardlagerplatz in Stammdaten gleich mitverschieben
+ if (defined($transfer->{change_default_bin})){
+ my $part = SL::DB::Part->new(id => conv_i($transfer->{parts_id}))->load;
+ $part->update_attributes(warehouse_id => conv_i($transfer->{dst_warehouse_id}));
+ $part->update_attributes(bin_id => conv_i($transfer->{dst_bin_id}));
+ }
+ }
push @trans_ids, $trans_id;
}
}
$transfer->{comment} = $form->{comment};
+ $transfer->{change_default_bin} = $form->{change_default_bin};
push @transfers, $transfer;
<td>[% 'Optional comment' | $T8 %]:</td>
<td><input name="comment" size="20"></td>
</tr>
+ <tr>
+ <td>[% 'Change default bin for this parts' | $T8 %]:</td>
+ <td><input type="checkbox" name="change_default_bin"<td>
+ </tr>
</table>
</p>