98 |
98 |
|
99 |
99 |
$form->header;
|
100 |
100 |
|
101 |
|
print $form->parse_html_template('ic/search', { is_assembly => $is_assembly, is_service => $is_service, dateformat => $myconfig{dateformat} });
|
|
101 |
print $form->parse_html_template('ic/search', { is_assembly => $is_assembly,
|
|
102 |
is_service => $is_service,
|
|
103 |
dateformat => $myconfig{dateformat}, });
|
102 |
104 |
|
103 |
105 |
$lxdebug->leave_sub();
|
104 |
106 |
} #end search()
|
... | ... | |
106 |
108 |
sub search_update_prices {
|
107 |
109 |
$lxdebug->enter_sub();
|
108 |
110 |
|
109 |
|
my ($onhand, $makemodel, $serialnumber, $l_serialnumber, $toplevel, $bought);
|
110 |
|
|
111 |
|
$form->{title} = $locale->text('Update prices');
|
112 |
|
IC->get_pricegroups(\%myconfig, \%$form);
|
113 |
|
|
114 |
|
# use JavaScript Calendar or not
|
115 |
|
# $form->{jsscript} = 1;
|
116 |
|
# $jsscript = "";
|
117 |
|
# if ($form->{jsscript}) {
|
118 |
|
#
|
119 |
|
# # with JavaScript Calendar
|
120 |
|
# $button1 = qq|
|
121 |
|
# <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>
|
122 |
|
# <td><input type=button name=transdatefrom id="trigger1" value=|
|
123 |
|
# . $locale->text('button') . qq|></td>
|
124 |
|
# |;
|
125 |
|
# $button2 = qq|
|
126 |
|
# <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>
|
127 |
|
# <td><input type=button name=transdateto name=transdateto id="trigger2" value=|
|
128 |
|
# . $locale->text('button') . qq|></td>
|
129 |
|
# |;
|
130 |
|
#
|
131 |
|
# #write Trigger
|
132 |
|
# $jsscript =
|
133 |
|
# Form->write_trigger(\%myconfig, "2", "transdatefrom", "BL", "trigger1",
|
134 |
|
# "transdateto", "BL", "trigger2");
|
135 |
|
# } else {
|
136 |
|
#
|
137 |
|
# # without JavaScript Calendar
|
138 |
|
# $button1 = qq|
|
139 |
|
# <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
|
140 |
|
# $button2 = qq|
|
141 |
|
# <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>|;
|
142 |
|
# }
|
143 |
|
|
144 |
|
$onhand = qq|
|
145 |
|
<input name=itemstatus class=radio type=radio value=onhand> | . $locale->text('On Hand') . qq|
|
146 |
|
<input name=itemstatus class=radio type=radio value=short> | . $locale->text('Short') . qq|
|
147 |
|
|;
|
148 |
|
|
149 |
|
$makemodel = qq|
|
150 |
|
<tr>
|
151 |
|
<th align=right nowrap>| . $locale->text('Make') . qq|</th>
|
152 |
|
<td><input name=make size=20></td>
|
153 |
|
<th align=right nowrap>| . $locale->text('Model') . qq|</th>
|
154 |
|
<td><input name=model size=20></td>
|
155 |
|
</tr>
|
156 |
|
|;
|
157 |
|
|
158 |
|
$serialnumber = qq|
|
159 |
|
<th align=right nowrap>| . $locale->text('Serial Number') . qq|</th>
|
160 |
|
<td><input name=serialnumber size=20></td>
|
161 |
|
|;
|
162 |
|
|
163 |
|
$l_serialnumber = qq|
|
164 |
|
<td><input name=l_serialnumber class=checkbox type=checkbox value=Y> | . $locale->text('Serial Number') . qq|</td>
|
165 |
|
|;
|
166 |
|
|
167 |
|
|
|
111 |
my $pricegroups = IC->get_pricegroups(\%myconfig, \%$form);
|
168 |
112 |
|
169 |
113 |
$form->header;
|
170 |
114 |
|
171 |
|
print qq|
|
172 |
|
<body>
|
173 |
|
|
174 |
|
<form method=post action=$form->{script}>
|
175 |
|
|
176 |
|
<input type=hidden name=title value="$form->{title}">
|
|
115 |
print $form->parse_html_template('ic/search_update_prices', { PRICE_ROWS => $pricegroups });
|
177 |
116 |
|
178 |
|
<table width="100%">
|
179 |
|
<tr><th class=listtop>$form->{title}</th></tr>
|
180 |
|
<tr height="5"></tr>
|
181 |
|
<tr valign=top>
|
182 |
|
<td>
|
183 |
|
<table>
|
184 |
|
<tr>
|
185 |
|
<th align=right nowrap>| . $locale->text('Part Number') . qq|</th>
|
186 |
|
<td><input name=partnumber size=20></td>
|
187 |
|
</tr>
|
188 |
|
<tr>
|
189 |
|
<th align=right nowrap>| . $locale->text('Part Description') . qq|</th>
|
190 |
|
<td colspan=3><input name=description size=40></td>
|
191 |
|
</tr>
|
192 |
|
<tr>
|
193 |
|
<th align=right nowrap>| . $locale->text('Group') . qq|</th>
|
194 |
|
<td><input name=partsgroup size=20></td>
|
195 |
|
$serialnumber
|
196 |
|
</tr>
|
197 |
|
$makemodel
|
198 |
|
<tr>
|
199 |
|
<th align=right nowrap>| . $locale->text('Drawing') . qq|</th>
|
200 |
|
<td><input name=drawing size=20></td>
|
201 |
|
<th align=right nowrap>| . $locale->text('Microfiche') . qq|</th>
|
202 |
|
<td><input name=microfiche size=20></td>
|
203 |
|
</tr>
|
204 |
|
$toplevel
|
205 |
|
<tr>
|
206 |
|
<td></td>
|
207 |
|
<td colspan=3>
|
208 |
|
<input name=itemstatus class=radio type=radio value=active checked> | . $locale->text('Active') . qq|
|
209 |
|
$onhand
|
210 |
|
<input name=itemstatus class=radio type=radio value=obsolete> | . $locale->text('Obsolete') . qq|
|
211 |
|
<input name=itemstatus class=radio type=radio value=orphaned> | . $locale->text('Orphaned') . qq|
|
212 |
|
</td>
|
213 |
|
</tr>
|
214 |
|
$bought
|
215 |
|
<tr>
|
216 |
|
<td></td>
|
217 |
|
<td colspan=3>
|
218 |
|
<hr size=1 noshade>
|
219 |
|
</td>
|
220 |
|
</tr>|;
|
221 |
|
print qq|
|
222 |
|
<tr>
|
223 |
|
<td colspan=4>
|
224 |
|
<table width=100%>
|
225 |
|
<tr>
|
226 |
|
<th class="listheading">| . $locale->text('Preisklasse') . qq|</th>
|
227 |
|
<th class="listheading">| . $locale->text('Preis') . qq|</th>
|
228 |
|
<th class="listheading">| . $locale->text('Prozentual/Absolut') . qq|</th>
|
229 |
|
</tr>
|
230 |
|
<tr>
|
231 |
|
<td>| . $locale->text('Sell Price') . qq|</td>
|
232 |
|
<td><input name="sellprice" size=11 value="$form->{"sellprice"}"></td>
|
233 |
|
<td><input name="sellprice_type" class=radio type=radio value=percent checked>/<input name="sellprice_type" class=radio type=radio value=absolut></td>
|
234 |
|
</tr>
|
235 |
|
<tr>
|
236 |
|
<td>| . $locale->text('List Price') . qq|</td>
|
237 |
|
<td><input name="listprice" size=11 value="$form->{"listprice"}"></td>
|
238 |
|
<td><input name="listprice_type" class=radio type=radio value=percent checked>/<input name="listprice_type" class=radio type=radio value=absolut></td>
|
239 |
|
</tr>
|
240 |
|
|;
|
241 |
|
for my $i (1 .. $form->{price_rows}) {
|
242 |
|
print qq|
|
243 |
|
<tr>
|
244 |
|
<td width=50%><input type=hidden name="pricegroup_$i" size=30 value="$form->{"pricegroup_$i"}">$form->{"pricegroup_$i"}</td>
|
245 |
|
<td width=50%><input name="price_$i" size=11></td>
|
246 |
|
<input type=hidden name="pricegroup_id_$i" value="$form->{"pricegroup_id_$i"}">
|
247 |
|
<td><input name="pricegroup_type_$i" class=radio type=radio value=percent checked>/<input name="pricegroup_type_$i" class=radio type=radio value=absolut></td>
|
248 |
|
</tr>
|
249 |
|
|;
|
250 |
|
}
|
251 |
|
|
252 |
|
print qq|
|
253 |
|
</table>
|
254 |
|
</td>
|
255 |
|
</tr>
|
256 |
|
|
257 |
|
<tr><td colspan=4><hr size=3 noshade></td></tr>
|
258 |
|
</table>
|
259 |
|
<input type=hidden name=nextsub value=confirm_price_update>
|
260 |
|
<input type=hidden name=price_rows value=$form->{price_rows}>
|
261 |
|
|
262 |
|
<input type=hidden name=login value=$form->{login}>
|
263 |
|
<input type=hidden name=password value=$form->{password}>
|
264 |
|
|
265 |
|
<br>
|
266 |
|
<input class=submit type=submit name=action value="|
|
267 |
|
. $locale->text('Continue') . qq|">
|
268 |
|
</form>
|
269 |
|
|
270 |
|
</body>
|
271 |
|
</html>
|
272 |
|
|;
|
273 |
117 |
$lxdebug->leave_sub();
|
274 |
118 |
} #end search()
|
275 |
119 |
|
... | ... | |
297 |
141 |
print qq|
|
298 |
142 |
<h2 class=confirm>| . $locale->text('Confirm!') . qq|</h2>
|
299 |
143 |
|
300 |
|
<h4>|
|
301 |
|
. $locale->text('Are you sure you want to update the prices')
|
302 |
|
. qq| </h4>
|
|
144 |
<h4>| . $locale->text('Are you sure you want to update the prices') . qq| </h4>
|
303 |
145 |
|
304 |
146 |
<p>
|
305 |
|
<input name=action class=submit type=submit value="|
|
306 |
|
. $locale->text('Continue') . qq|">
|
|
147 |
<input name=action class=submit type=submit value="| . $locale->text('Continue') . qq|">
|
307 |
148 |
</form>
|
308 |
149 |
|;
|
309 |
150 |
|
Presiaktualisierung Schritt 1 auf Templates umgestellt