Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e851ae00

Von Sven Schöling vor mehr als 15 Jahren hinzugefügt

  • ID e851ae005e79c4d8046d59be4191e241439e312a
  • Vorgänger 49c04489
  • Nachfolger b6b29bdf

Pricegroup Informationen anständig im Template Formatieren und nicht schauder im Backend beim laden.

Fix für Bug 996.

Unterschiede anzeigen:

SL/IC.pm
127 127
  while (($form->{"klass_$i"}, $form->{"pricegroup_id_$i"},
128 128
          $form->{"price_$i"}, $form->{"pricegroup_$i"})
129 129
         = $sth->fetchrow_array()) {
130
    $form->{"price_$i"} = $form->round_amount($form->{"price_$i"}, 5);
131
    $form->{"price_$i"} = $form->format_amount($myconfig, $form->{"price_$i"}, -2);
132 130
    push @pricegroups, $form->{"pricegroup_id_$i"};
133 131
    $i++;
134 132
  }
......
156 154

  
157 155
    foreach $name (@pricegroups_not_used) {
158 156
      $form->{"klass_$i"} = "$name->{id}";
159
      $form->{"price_$i"} = $form->round_amount($form->{sellprice}, 5);
160
      $form->{"price_$i"} = $form->format_amount($myconfig, $form->{"price_$i"}, -2);
161 157
      $form->{"pricegroup_id_$i"} = "$name->{id}";
162 158
      $form->{"pricegroup_$i"}    = "$name->{pricegroup}";
163 159
      $i++;
bin/mozilla/ic.pl
1699 1699
sub update {
1700 1700
  $lxdebug->enter_sub();
1701 1701

  
1702
  # parse pricegroups. and no, don't rely on check_form for this...
1703
  map { $form->{"price_$_"} = $form->parse_amount(\%myconfig, $form->{"price_$_"}) } 1 .. $form->{price_rows};
1704

  
1702 1705
  if ($form->{item} eq "assembly") {
1703 1706
    my $i = $form->{assembly_rows};
1704 1707

  
templates/webpages/ic/price_row_de.html
1 1
[%- USE HTML %]
2
[%- USE LxERP %]
2 3
[%- IF PRICES.size %]
3 4
  <tr>
4 5
    <td>
......
10 11
[%- FOREACH row = PRICES %]
11 12
        <tr>
12 13
          <td width=50%><input type=hidden name="pricegroup_[% loop.count %]" size=30  value="[% HTML.escape(row.pricegroup) %]">[% HTML.escape(row.pricegroup) %]</td>
13
          <td width=50%><input name="price_[% loop.count %]" size=11 value="[% HTML.escape(row.price) %]"></td>
14
          <input type=hidden name="pricegroup_id_[% loop.count %]" value="[% HTML.escape(row.pricegroup_id) %]">
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 16
        </tr>
16 17
[%- END %]
17 18
      </table>
templates/webpages/ic/price_row_master.html
1 1
[%- USE HTML %]
2
[%- USE LxERP %]
2 3
[%- IF PRICES.size %]
3 4
  <tr>
4 5
    <td>
......
10 11
[%- FOREACH row = PRICES %]
11 12
        <tr>
12 13
          <td width=50%><input type=hidden name="pricegroup_[% loop.count %]" size=30  value="[% HTML.escape(row.pricegroup) %]">[% HTML.escape(row.pricegroup) %]</td>
13
          <td width=50%><input name="price_[% loop.count %]" size=11 value="[% HTML.escape(row.price) %]"></td>
14
          <input type=hidden name="pricegroup_id_[% loop.count %]" value="[% HTML.escape(row.pricegroup_id) %]">
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 16
        </tr>
16 17
[%- END %]
17 18
      </table>

Auch abrufbar als: Unified diff