Revision 3c005fa1
Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt
bin/mozilla/wh.pl | ||
---|---|---|
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__
|
locale/de/all | ||
---|---|---|
'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',
|
templates/webpages/wh/journal_filter.html | ||
---|---|---|
-->
|
||
</script>
|
||
|
||
<form method="post" name="Form" action="wh.pl">
|
||
|
||
<input type="hidden" name="nextsub" value="generate_journal">
|
||
<form method="post" name="Form" action="wh.pl" id="form">
|
||
|
||
<p>
|
||
<table>
|
||
... | ... | |
</tr>
|
||
</table>
|
||
</p>
|
||
|
||
<p>
|
||
<input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
|
||
</p>
|
||
</form>
|
||
|
templates/webpages/wh/removal_parts_selection.html | ||
---|---|---|
[%- USE HTML %][%- USE JavaScript %]
|
||
<h1>[% title %]</h1>
|
||
|
||
<form method="post" action="wh.pl">
|
||
<form method="post" action="wh.pl" id="form">
|
||
|
||
<input type="hidden" name="nextsub" value="remove_parts">
|
||
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
|
||
|
||
<p>[% 'Removal from warehouse' | $T8 %]: [% warehouse_description %]</p>
|
||
... | ... | |
|
||
</table>
|
||
</p>
|
||
|
||
<p>
|
||
<input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
|
||
</p>
|
||
</form>
|
||
|
templates/webpages/wh/report_filter.html | ||
---|---|---|
-->
|
||
</script>
|
||
|
||
<form method="post" name="Form" action="wh.pl">
|
||
<form method="post" name="Form" action="wh.pl" id="form">
|
||
|
||
<input type="hidden" name="nextsub" value="generate_report">
|
||
|
||
... | ... | |
</tr>
|
||
</table>
|
||
</p>
|
||
|
||
<p>
|
||
<input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
|
||
</p>
|
||
</form>
|
||
|
templates/webpages/wh/transfer_parts_selection.html | ||
---|---|---|
-->
|
||
</script>
|
||
|
||
<form method="post" action="wh.pl">
|
||
<form method="post" action="wh.pl" id="form">
|
||
|
||
<input type="hidden" name="nextsub" value="transfer_parts">
|
||
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
|
||
|
||
<p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
|
||
... | ... | |
|
||
</table>
|
||
</p>
|
||
|
||
<hr size="3" noshade>
|
||
|
||
<p>
|
||
<input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
|
||
</p>
|
||
</form>
|
||
|
templates/webpages/wh/warehouse_selection.html | ||
---|---|---|
-->
|
||
</script>
|
||
|
||
<form name="Form" method="post" action="wh.pl">
|
||
|
||
<input type="hidden" name="nextsub" value="[% HTML.escape(nextsub) %]">
|
||
<form name="Form" method="post" action="wh.pl" id="form">
|
||
|
||
[% IF saved_message %]
|
||
<p>[% saved_message %]</p>
|
||
... | ... | |
</tr>
|
||
</table>
|
||
</p>
|
||
|
||
<p>
|
||
<input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
|
||
</p>
|
||
</form>
|
||
|
templates/webpages/wh/warehouse_selection_assembly.html | ||
---|---|---|
-->
|
||
</script>
|
||
|
||
<form name="Form" method="post" action="wh.pl">
|
||
|
||
<input type="hidden" name="nextsub" value="transfer_assembly">
|
||
<input type="hidden" name="update_nextsub" value="transfer_assembly_update_part">
|
||
<form name="Form" method="post" action="wh.pl" id="form">
|
||
|
||
[% IF saved_message %]
|
||
<p>[% saved_message %]</p>
|
||
... | ... | |
|
||
</table>
|
||
</p>
|
||
|
||
<p>
|
||
<input type="submit" class="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
|
||
[%- IF parts_id %]
|
||
<input type="submit" class="submit" name="action" value="[% 'Create Assembly' | $T8 %]">
|
||
[%- END %]
|
||
</p>
|
||
</form>
|
||
|
||
<script type='text/javascript'>
|
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei allen anderen Lager-Funktionen
Lager → …
• Erzeugnis fertigen
• Umlagern
• Entnahme
Lager → Berichte → …
• Lagerbestand
• Lagerbuchungen