Revision 3c005fa1
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/wh.pl | ||
---|---|---|
43 | 43 |
use SL::IC; |
44 | 44 |
use SL::WH; |
45 | 45 |
use SL::OE; |
46 |
use SL::Locale::String qw(t8); |
|
46 | 47 |
use SL::ReportGenerator; |
47 | 48 |
|
48 | 49 |
use SL::DB::Part; |
... | ... | |
108 | 109 |
my $content; |
109 | 110 |
|
110 | 111 |
if ($form->{trans_type} eq 'removal') { |
111 |
$form->{nextsub} = "removal_parts_selection";
|
|
112 |
setup_wh_transfer_warehouse_selection_action_bar("removal_parts_selection");
|
|
112 | 113 |
$form->{title} = $locale->text('Removal from Warehouse'); |
113 | 114 |
$content = $form->parse_html_template('wh/warehouse_selection'); |
114 | 115 |
|
115 | 116 |
} elsif (!$form->{trans_type} || ($form->{trans_type} eq 'transfer')) { |
116 |
$form->{nextsub} = "transfer_parts_selection";
|
|
117 |
setup_wh_transfer_warehouse_selection_action_bar("transfer_parts_selection");
|
|
117 | 118 |
$form->{title} = $locale->text('Transfer'); |
118 | 119 |
$content = $form->parse_html_template('wh/warehouse_selection'); |
119 | 120 |
|
120 | 121 |
} elsif ($form->{trans_type} eq 'assembly') { |
122 |
setup_wh_transfer_warehouse_selection_assembly_action_bar(); |
|
121 | 123 |
$form->{title} = $locale->text('Produce Assembly'); |
122 | 124 |
$content = $form->parse_html_template('wh/warehouse_selection_assembly'); |
123 | 125 |
} |
... | ... | |
139 | 141 |
|
140 | 142 |
transfer_or_removal_prepare_contents('direction' => 'transfer'); |
141 | 143 |
|
144 |
setup_wh_transfer_parts_action_bar(); |
|
145 |
|
|
142 | 146 |
$form->{title} = $locale->text('Transfer'); |
143 | 147 |
$form->header(); |
144 | 148 |
print $form->parse_html_template("wh/transfer_parts_selection"); |
... | ... | |
442 | 446 |
|
443 | 447 |
transfer_or_removal_prepare_contents('direction' => 'out'); |
444 | 448 |
|
449 |
setup_wh_removal_parts_selection_action_bar(); |
|
450 |
|
|
445 | 451 |
$form->{title} = $locale->text('Removal'); |
446 | 452 |
$form->header(); |
447 | 453 |
print $form->parse_html_template("wh/removal_parts_selection"); |
... | ... | |
557 | 563 |
|
558 | 564 |
show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} }); |
559 | 565 |
|
566 |
setup_wh_journal_action_bar(); |
|
567 |
|
|
560 | 568 |
$form->header(); |
561 | 569 |
print $form->parse_html_template("wh/journal_filter", { "UNITS" => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)) }); |
562 | 570 |
|
... | ... | |
732 | 740 |
$report->set_options('raw_bottom_info_text' => $form->parse_html_template('common/paginate', |
733 | 741 |
{ 'pages' => $pages , 'base_url' => $href.'&sort='.$form->{sort}.'&order='.$form->{order}}) ); |
734 | 742 |
} |
735 |
$report->generate_with_headers(); |
|
743 |
$report->generate_with_headers(action_bar => 1);
|
|
736 | 744 |
|
737 | 745 |
$main::lxdebug->leave_sub(); |
738 | 746 |
} |
... | ... | |
757 | 765 |
|
758 | 766 |
$form->{title} = $locale->text("Report about warehouse contents"); |
759 | 767 |
|
768 |
setup_wh_report_action_bar(); |
|
769 |
|
|
760 | 770 |
$form->header(); |
761 | 771 |
print $form->parse_html_template("wh/report_filter", |
762 |
{ "nextsub" => "generate_report", |
|
763 |
"WAREHOUSES" => $form->{WAREHOUSES}, |
|
772 |
{ "WAREHOUSES" => $form->{WAREHOUSES}, |
|
764 | 773 |
"UNITS" => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)) }); |
765 | 774 |
|
766 | 775 |
$main::lxdebug->leave_sub(); |
... | ... | |
964 | 973 |
{'pages' => $pages , 'base_url' => $href}) ); |
965 | 974 |
} |
966 | 975 |
|
967 |
$report->generate_with_headers(); |
|
976 |
$report->generate_with_headers(action_bar => 1);
|
|
968 | 977 |
|
969 | 978 |
$main::lxdebug->leave_sub(); |
970 | 979 |
} |
... | ... | |
1061 | 1070 |
call_sub($form->{stock_nextsub} || $form->{nextsub}); |
1062 | 1071 |
} |
1063 | 1072 |
|
1073 |
sub setup_wh_transfer_warehouse_selection_action_bar { |
|
1074 |
my ($action) = @_; |
|
1075 |
|
|
1076 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1077 |
$bar->add( |
|
1078 |
action => [ |
|
1079 |
t8('Update'), |
|
1080 |
submit => [ '#form', { action => $action } ], |
|
1081 |
accesskey => 'enter', |
|
1082 |
], |
|
1083 |
); |
|
1084 |
} |
|
1085 |
} |
|
1086 |
|
|
1087 |
sub setup_wh_transfer_warehouse_selection_assembly_action_bar { |
|
1088 |
my ($action) = @_; |
|
1089 |
|
|
1090 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1091 |
$bar->add( |
|
1092 |
action => [ |
|
1093 |
t8('Update'), |
|
1094 |
submit => [ '#form', { action => 'transfer_assembly_update_part' } ], |
|
1095 |
accesskey => 'enter', |
|
1096 |
], |
|
1097 |
action => [ |
|
1098 |
t8('Produce'), |
|
1099 |
submit => [ '#form', { action => 'create_assembly' } ], |
|
1100 |
disabled => $::form->{parts_id} ? undef : $::locale->text('No assembly has been selected yet.'), |
|
1101 |
], |
|
1102 |
); |
|
1103 |
} |
|
1104 |
} |
|
1105 |
|
|
1106 |
sub setup_wh_transfer_parts_action_bar { |
|
1107 |
my ($action) = @_; |
|
1108 |
|
|
1109 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1110 |
$bar->add( |
|
1111 |
action => [ |
|
1112 |
t8('Transfer'), |
|
1113 |
submit => [ '#form', { action => 'transfer_parts' } ], |
|
1114 |
accesskey => 'enter', |
|
1115 |
], |
|
1116 |
action => [ |
|
1117 |
t8('Back'), |
|
1118 |
call => [ 'kivi.history_back' ], |
|
1119 |
], |
|
1120 |
); |
|
1121 |
} |
|
1122 |
} |
|
1123 |
|
|
1124 |
sub setup_wh_removal_parts_selection_action_bar { |
|
1125 |
my ($action) = @_; |
|
1126 |
|
|
1127 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1128 |
$bar->add( |
|
1129 |
action => [ |
|
1130 |
t8('Transfer out'), |
|
1131 |
submit => [ '#form', { action => 'remove_parts' } ], |
|
1132 |
accesskey => 'enter', |
|
1133 |
], |
|
1134 |
action => [ |
|
1135 |
t8('Back'), |
|
1136 |
call => [ 'kivi.history_back' ], |
|
1137 |
], |
|
1138 |
); |
|
1139 |
} |
|
1140 |
} |
|
1141 |
|
|
1142 |
sub setup_wh_report_action_bar { |
|
1143 |
my ($action) = @_; |
|
1144 |
|
|
1145 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1146 |
$bar->add( |
|
1147 |
action => [ |
|
1148 |
t8('Show'), |
|
1149 |
submit => [ '#form', { action => 'generate_report' } ], |
|
1150 |
accesskey => 'enter', |
|
1151 |
], |
|
1152 |
); |
|
1153 |
} |
|
1154 |
} |
|
1155 |
|
|
1156 |
sub setup_wh_journal_action_bar { |
|
1157 |
my ($action) = @_; |
|
1158 |
|
|
1159 |
for my $bar ($::request->layout->get('actionbar')) { |
|
1160 |
$bar->add( |
|
1161 |
action => [ |
|
1162 |
t8('Show'), |
|
1163 |
submit => [ '#form', { action => 'generate_journal' } ], |
|
1164 |
accesskey => 'enter', |
|
1165 |
], |
|
1166 |
); |
|
1167 |
} |
|
1168 |
} |
|
1169 |
|
|
1064 | 1170 |
1; |
1065 | 1171 |
|
1066 | 1172 |
__END__ |
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei allen anderen Lager-Funktionen
Lager → …
• Erzeugnis fertigen
• Umlagern
• Entnahme
Lager → Berichte → …
• Lagerbestand
• Lagerbuchungen