Revision 9894f4ef
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
482 | 482 |
) { |
483 | 483 |
#$klass = $form->parse_amount($myconfig, $form->{"klass_$i"}); |
484 | 484 |
$price = $form->parse_amount($myconfig, $form->{"price_$i"}); |
485 |
$pricegroup_id = |
|
486 |
$form->parse_amount($myconfig, $form->{"pricegroup_id_$i"}); |
|
487 | 485 |
$query = qq|INSERT INTO prices (parts_id, pricegroup_id, price) | . |
488 | 486 |
qq|VALUES(?, ?, ?)|; |
489 |
@values = (conv_i($form->{id}), conv_i($pricegroup_id), $price);
|
|
487 |
@values = (conv_i($form->{id}), conv_i($form->{"pricegroup_id_$i"}), $price);
|
|
490 | 488 |
do_query($form, $dbh, $query, @values); |
491 | 489 |
} |
492 | 490 |
} |
templates/webpages/ic/price_row_de.html | ||
---|---|---|
12 | 12 |
<tr> |
13 | 13 |
<td width=50%><input type=hidden name="pricegroup_[% loop.count %]" size=30 value="[% HTML.escape(row.pricegroup) %]">[% HTML.escape(row.pricegroup) %]</td> |
14 | 14 |
<td width=50%><input name="price_[% loop.count %]" size=11 value="[% LxERP.format_amount(row.price, -2) %]"></td> |
15 |
<input type=hidden name="pricegroup_id_[% loop.count %]" value="[% LxERP.format_amount(row.pricegroup_id, -2) %]">
|
|
15 |
<input type="hidden" name="pricegroup_id_[% loop.count %]" value="[% HTML.escape(row.pricegroup_id) %]">
|
|
16 | 16 |
</tr> |
17 | 17 |
[%- END %] |
18 | 18 |
</table> |
templates/webpages/ic/price_row_master.html | ||
---|---|---|
12 | 12 |
<tr> |
13 | 13 |
<td width=50%><input type=hidden name="pricegroup_[% loop.count %]" size=30 value="[% HTML.escape(row.pricegroup) %]">[% HTML.escape(row.pricegroup) %]</td> |
14 | 14 |
<td width=50%><input name="price_[% loop.count %]" size=11 value="[% LxERP.format_amount(row.price, -2) %]"></td> |
15 |
<input type=hidden name="pricegroup_id_[% loop.count %]" value="[% LxERP.format_amount(row.pricegroup_id, -2) %]">
|
|
15 |
<input type="hidden" name="pricegroup_id_[% loop.count %]" value="[% HTML.escape(row.pricegroup_id) %]">
|
|
16 | 16 |
</tr> |
17 | 17 |
[%- END %] |
18 | 18 |
</table> |
Auch abrufbar als: Unified diff
Datenbank-IDs in Formularen nicht durch "format_amount" jagen, sondern 1:1 speichern.