Revision 56b09ede
Von Jan Büren vor mehr als 11 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
1593 | 1593 |
my $no_default_bin_entry = { 'id' => '0', description => '--', 'BINS' => [ { id => '0', description => ''} ] }; |
1594 | 1594 |
push @ { $form->{WAREHOUSES} }, $no_default_bin_entry; |
1595 | 1595 |
if (my $max = scalar @{ $form->{WAREHOUSES} }) { |
1596 |
|
|
1597 |
my $default_warehouse_id = $::instance_conf->get_default_warehouse_id; |
|
1598 |
my $default_bin_id = $::instance_conf->get_default_bin_id; |
|
1596 |
my ($default_warehouse_id, $default_bin_id); |
|
1597 |
if ($form->{action} eq 'add') { # default only for new entries |
|
1598 |
$default_warehouse_id = $::instance_conf->get_default_warehouse_id; |
|
1599 |
$default_bin_id = $::instance_conf->get_default_bin_id; |
|
1600 |
} |
|
1599 | 1601 |
$form->{warehouse_id} ||= $default_warehouse_id || $form->{WAREHOUSES}->[$max -1]->{id}; |
1600 | 1602 |
$form->{bin_id} ||= $default_bin_id || $form->{WAREHOUSES}->[$max -1]->{BINS}->[0]->{id}; |
1601 | 1603 |
} |
Auch abrufbar als: Unified diff
Standardlagerplatz nur für neu angelegte Waren vorauswählen