show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
my $units = AM->retrieve_units(\%myconfig, $form);
show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
my $units = AM->retrieve_units(\%myconfig, $form);
- $form->{UNITS} = AM->unit_select_data($units, $form->{unit}, 0, $form->{partunit});
+ # der zweite Parameter von unit_select_data gibt den default-Namen (selected) vor
+ $form->{UNITS} = AM->unit_select_data($units, $form->{partunit}, 0, $form->{partunit});
$form->{sort} = 'bindescription';
my @contents = WH->get_warehouse_report("warehouse_id" => $form->{warehouse_id},
"bin_id" => $form->{bin_id},
"chargenumber" => $form->{chargenumber},
$form->{sort} = 'bindescription';
my @contents = WH->get_warehouse_report("warehouse_id" => $form->{warehouse_id},
"bin_id" => $form->{bin_id},
"chargenumber" => $form->{chargenumber},
- "partnumber" => $form->{partnumber},
- "ean" => $form->{ean},
+ "bestbefore" => $form->{bestbefore},
+ "partnumber" => $form->{partnumber},
+ "ean" => $form->{ean},
$form->{sort} = 'bindescription';
my @contents = WH->get_warehouse_report("warehouse_id" => $form->{warehouse_id});
$form->{sort} = 'bindescription';
my @contents = WH->get_warehouse_report("warehouse_id" => $form->{warehouse_id});
if (!scalar @transfers) {
$form->show_generic_information($locale->text('Nothing has been selected for transfer.'));
if (!scalar @transfers) {
$form->show_generic_information($locale->text('Nothing has been selected for transfer.'));
- $form->{no_services} = 1;
- $form->{no_assemblies} = 0; # assemblies duerfen eingelagert werden (z.B. bei retouren)
+# $form->{no_services} = 1; # services may now be transfered. fix for Bug 1383.
+ $form->{no_assemblies} = 0; # assemblies duerfen eingelagert werden (z.B. bei retouren)
my $parts = Common->retrieve_parts(\%myconfig, $form, 'description', 1);
my $parts = Common->retrieve_parts(\%myconfig, $form, 'description', 1);
$form->show_generic_error($locale->text('Invalid quantity.'), 'back_button' => 1);
}
# TODO Es wäre schön, hier schon die maximale Anzahl der zu fertigenden Erzeugnisse zu haben
$form->show_generic_error($locale->text('Invalid quantity.'), 'back_button' => 1);
}
# TODO Es wäre schön, hier schon die maximale Anzahl der zu fertigenden Erzeugnisse zu haben
- #else { if ($form->{qty} > $maxcreate) { #s.o.
- # $form->show_generic_error($locale->text('Can not create that quantity with current stock'), 'back_button' => 1);
- # $form->show_generic_error('Maximale Stückzahl' . $maxcreate , 'back_button' => 1);
- # }
+ #else { if ($form->{qty} > $maxcreate) { #s.o.
+ # $form->show_generic_error($locale->text('Can not create that quantity with current stock'), 'back_button' => 1);
+ # $form->show_generic_error('Maximale Stückzahl' . $maxcreate , 'back_button' => 1);
+ # }
# }
if (!$form->{warehouse_id} || !$form->{bin_id}) {
$form->error($locale->text('The warehouse or the bin is missing.'));
}
# }
if (!$form->{warehouse_id} || !$form->{bin_id}) {
$form->error($locale->text('The warehouse or the bin is missing.'));
}
# WIESO war das nicht vorher schon ein %HASH?? ein hash ist ein hash! das hat mich mehr als eine Stunde gekostet herauszufinden. grr. jb 3.3.2009
# Anm. jb 18.3. vielleicht auch nur meine unwissenheit in perl-datenstrukturen
my %TRANSFER = (
'transfer_type' => 'assembly',
# WIESO war das nicht vorher schon ein %HASH?? ein hash ist ein hash! das hat mich mehr als eine Stunde gekostet herauszufinden. grr. jb 3.3.2009
# Anm. jb 18.3. vielleicht auch nur meine unwissenheit in perl-datenstrukturen
my %TRANSFER = (
'transfer_type' => 'assembly',
'dst_warehouse_id' => $form->{warehouse_id},
'dst_bin_id' => $form->{bin_id},
'chargenumber' => $form->{chargenumber},
'dst_warehouse_id' => $form->{warehouse_id},
'dst_bin_id' => $form->{bin_id},
'chargenumber' => $form->{chargenumber},
$form->{saved_message} = $locale->text('The assembly has been created.');
$form->{trans_type} = 'assembly';
$form->{saved_message} = $locale->text('The assembly has been created.');
$form->{trans_type} = 'assembly';
'dst_warehouse_id' => $form->{warehouse_id},
'dst_bin_id' => $form->{bin_id},
'chargenumber' => $form->{chargenumber},
'dst_warehouse_id' => $form->{warehouse_id},
'dst_bin_id' => $form->{bin_id},
'chargenumber' => $form->{chargenumber},
$form->{saved_message} = $locale->text('The parts have been stocked.');
$form->{trans_type} = 'stock';
$form->{saved_message} = $locale->text('The parts have been stocked.');
$form->{trans_type} = 'stock';
$form->{sort} = 'bindescription';
my @contents = WH->get_warehouse_report("warehouse_id" => $form->{warehouse_id});
$form->{sort} = 'bindescription';
my @contents = WH->get_warehouse_report("warehouse_id" => $form->{warehouse_id});
if (!scalar @transfers) {
$form->show_generic_information($locale->text('Nothing has been selected for removal.'));
if (!scalar @transfers) {
$form->show_generic_information($locale->text('Nothing has been selected for removal.'));
my $report = SL::ReportGenerator->new(\%myconfig, $form);
my @hidden_variables = map { "l_${_}" } @columns;
my $report = SL::ReportGenerator->new(\%myconfig, $form);
my @hidden_variables = map { "l_${_}" } @columns;
'bin_from' => { 'text' => $locale->text('Bin From'), },
'bin_to' => { 'text' => $locale->text('Bin To'), },
'partnumber' => { 'text' => $locale->text('Part Number'), },
'bin_from' => { 'text' => $locale->text('Bin From'), },
'bin_to' => { 'text' => $locale->text('Bin To'), },
'partnumber' => { 'text' => $locale->text('Part Number'), },
'qty' => { 'text' => $locale->text('Qty'), },
'employee' => { 'text' => $locale->text('Employee'), },
'projectnumber' => { 'text' => $locale->text('Project Number'), },
'qty' => { 'text' => $locale->text('Qty'), },
'employee' => { 'text' => $locale->text('Employee'), },
'projectnumber' => { 'text' => $locale->text('Project Number'), },
'title' => $form->{title},
'attachment_basename' => strftime($locale->text('warehouse_journal_list') . '_%Y%m%d', localtime time));
$report->set_options_from_form();
'title' => $form->{title},
'attachment_basename' => strftime($locale->text('warehouse_journal_list') . '_%Y%m%d', localtime time));
$report->set_options_from_form();
my $all_units = AM->retrieve_units(\%myconfig, $form);
my @contents = WH->get_warehouse_journal(%filter);
my $all_units = AM->retrieve_units(\%myconfig, $form);
my @contents = WH->get_warehouse_journal(%filter);
- $form->{fokus} = "partnumber";
- $form->{onload} .= "focus();";
- $form->{title} = $locale->text("Report about wareouse contents");
+ $form->{jsscript} = 1;
+
+# $form->{fokus} = "partnumber";
+# $form->{onload} .= "focus();";
+ $form->{title} = $locale->text("Report about warehouse contents");
my $report = SL::ReportGenerator->new(\%myconfig, $form);
my @hidden_variables = map { "l_${_}" } @columns;
my $report = SL::ReportGenerator->new(\%myconfig, $form);
my @hidden_variables = map { "l_${_}" } @columns;
push @hidden_variables, qw(include_empty_bins subtotal);
my %column_defs = (
'warehousedescription' => { 'text' => $locale->text('Warehouse'), },
'bindescription' => { 'text' => $locale->text('Bin'), },
'partnumber' => { 'text' => $locale->text('Part Number'), },
push @hidden_variables, qw(include_empty_bins subtotal);
my %column_defs = (
'warehousedescription' => { 'text' => $locale->text('Warehouse'), },
'bindescription' => { 'text' => $locale->text('Bin'), },
'partnumber' => { 'text' => $locale->text('Part Number'), },
'qty' => { 'text' => $locale->text('Qty'), },
'stock_value' => { 'text' => $locale->text('Stock value'), },
);
'qty' => { 'text' => $locale->text('Qty'), },
'stock_value' => { 'text' => $locale->text('Stock value'), },
);
'title' => $form->{title},
'attachment_basename' => strftime($locale->text('warehouse_report_list') . '_%Y%m%d', localtime time));
$report->set_options_from_form();
'title' => $form->{title},
'attachment_basename' => strftime($locale->text('warehouse_report_list') . '_%Y%m%d', localtime time));
$report->set_options_from_form();
my $all_units = AM->retrieve_units(\%myconfig, $form);
my @contents = WH->get_warehouse_report(%filter);
my $all_units = AM->retrieve_units(\%myconfig, $form);
my @contents = WH->get_warehouse_report(%filter);