use SL::IC;
use SL::WH;
use SL::OE;
+use SL::Locale::String qw(t8);
use SL::ReportGenerator;
use SL::DB::Part;
my $content;
if ($form->{trans_type} eq 'removal') {
- $form->{nextsub} = "removal_parts_selection";
+ setup_wh_transfer_warehouse_selection_action_bar("removal_parts_selection");
$form->{title} = $locale->text('Removal from Warehouse');
$content = $form->parse_html_template('wh/warehouse_selection');
} elsif (!$form->{trans_type} || ($form->{trans_type} eq 'transfer')) {
- $form->{nextsub} = "transfer_parts_selection";
+ setup_wh_transfer_warehouse_selection_action_bar("transfer_parts_selection");
$form->{title} = $locale->text('Transfer');
$content = $form->parse_html_template('wh/warehouse_selection');
} elsif ($form->{trans_type} eq 'assembly') {
+ setup_wh_transfer_warehouse_selection_assembly_action_bar();
$form->{title} = $locale->text('Produce Assembly');
$content = $form->parse_html_template('wh/warehouse_selection_assembly');
}
transfer_or_removal_prepare_contents('direction' => 'transfer');
+ setup_wh_transfer_parts_action_bar();
+
$form->{title} = $locale->text('Transfer');
$form->header();
print $form->parse_html_template("wh/transfer_parts_selection");
transfer_or_removal_prepare_contents('direction' => 'out');
+ setup_wh_removal_parts_selection_action_bar();
+
$form->{title} = $locale->text('Removal');
$form->header();
print $form->parse_html_template("wh/removal_parts_selection");
show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
+ setup_wh_journal_action_bar();
+
$form->header();
print $form->parse_html_template("wh/journal_filter", { "UNITS" => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)) });
$report->set_options('raw_bottom_info_text' => $form->parse_html_template('common/paginate',
{ 'pages' => $pages , 'base_url' => $href.'&sort='.$form->{sort}.'&order='.$form->{order}}) );
}
- $report->generate_with_headers();
+ $report->generate_with_headers(action_bar => 1);
$main::lxdebug->leave_sub();
}
$form->{title} = $locale->text("Report about warehouse contents");
+ setup_wh_report_action_bar();
+
$form->header();
print $form->parse_html_template("wh/report_filter",
- { "nextsub" => "generate_report",
- "WAREHOUSES" => $form->{WAREHOUSES},
+ { "WAREHOUSES" => $form->{WAREHOUSES},
"UNITS" => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)) });
$main::lxdebug->leave_sub();
{'pages' => $pages , 'base_url' => $href}) );
}
- $report->generate_with_headers();
+ $report->generate_with_headers(action_bar => 1);
$main::lxdebug->leave_sub();
}
call_sub($form->{stock_nextsub} || $form->{nextsub});
}
+sub setup_wh_transfer_warehouse_selection_action_bar {
+ my ($action) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Update'),
+ submit => [ '#form', { action => $action } ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
+sub setup_wh_transfer_warehouse_selection_assembly_action_bar {
+ my ($action) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Update'),
+ submit => [ '#form', { action => 'transfer_assembly_update_part' } ],
+ accesskey => 'enter',
+ ],
+ action => [
+ t8('Produce'),
+ submit => [ '#form', { action => 'create_assembly' } ],
+ disabled => $::form->{parts_id} ? undef : $::locale->text('No assembly has been selected yet.'),
+ ],
+ );
+ }
+}
+
+sub setup_wh_transfer_parts_action_bar {
+ my ($action) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Transfer'),
+ submit => [ '#form', { action => 'transfer_parts' } ],
+ accesskey => 'enter',
+ ],
+ action => [
+ t8('Back'),
+ call => [ 'kivi.history_back' ],
+ ],
+ );
+ }
+}
+
+sub setup_wh_removal_parts_selection_action_bar {
+ my ($action) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Transfer out'),
+ submit => [ '#form', { action => 'remove_parts' } ],
+ accesskey => 'enter',
+ ],
+ action => [
+ t8('Back'),
+ call => [ 'kivi.history_back' ],
+ ],
+ );
+ }
+}
+
+sub setup_wh_report_action_bar {
+ my ($action) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Show'),
+ submit => [ '#form', { action => 'generate_report' } ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
+sub setup_wh_journal_action_bar {
+ my ($action) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Show'),
+ submit => [ '#form', { action => 'generate_journal' } ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
1;
__END__
'Could not update prices!' => 'Preise konnten nicht aktualisiert werden!',
'Country' => 'Land',
'Create' => 'Anlegen',
- 'Create Assembly' => 'Erzeugnis fertigen',
'Create Chart of Accounts' => 'Zu verwendender Kontenplan',
'Create Dataset' => 'Neue Datenbank anlegen',
'Create Date' => 'Erstelldatum',
'No action defined.' => 'Keine Aktion definiert.',
'No article has been selected yet.' => 'Es wurde noch kein Artikel ausgewählt.',
'No articles have been added yet.' => 'Es wurden noch keine Artikel hinzugefügt.',
+ 'No assembly has been selected yet.' => 'Es wurde noch kein Erzeugnis ausgewahlt.',
'No background job has been created yet.' => 'Es wurden noch keine Hintergrund-Jobs angelegt.',
'No bank account chosen!' => 'Kein Bankkonto ausgewählt!',
'No bank information has been entered in this customer\'s master data entry. You cannot create bank collections unless you enter bank information.' => 'Für diesen Kunden wurden in seinen Stammdaten keine Kontodaten hinterlegt. Solange dies nicht geschehen ist, können Sie keine Überweisungen für den Lieferanten anlegen.',
'Private E-mail' => 'Private E-Mail',
'Private Phone' => 'Privates Tel.',
'Problem' => 'Problem',
+ 'Produce' => 'Fertigen',
'Produce Assembly' => 'Erzeugnis fertigen',
'Production' => 'Produktion',
'Production (typeabbreviation)' => 'P',