Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 40b7b7b6

Von Rolf Fluehmann vor etwa 6 Jahren hinzugefügt

  • ID 40b7b7b610dbd384c3c2d54fb23a88f4524462ff
  • Vorgänger 6b349b9d
  • Nachfolger a462dc9c

handling number formats

Unterschiede anzeigen:

SL/DB/Piece.pm
28 28
}
29 29

  
30 30
sub validate {
31
  my( $self, $locale ) = ( shift, $::locale );
31
  my( $self, $form, $locale ) = ( shift, $::form, $::locale );
32 32
  my @errors = ();
33
  $self->weight && $self->weight( $form->parse_amount( \%::myconfig, $self->weight ) );
33 34
  $self->producer_id  || push @errors, $locale->text( 'The producer is missing.' );
34 35
  $self->part_id      || push @errors, $locale->text( 'The part is missing.' );
35 36
  $self->serialnumber || push @errors, $locale->text( 'The serial number is missing.' );
templates/webpages/piece/_basic_data.html
21 21
        </tr>
22 22
        <tr>
23 23
          <th align="left">* [% 'Serial Number' | $T8 %]</th>
24
          <td>[% L.input_tag("piece.serialnumber", SELF.piece.serialnumber, style='width: 300px') %]</td>
24
          <td>[% L.input_tag('piece.serialnumber', SELF.piece.serialnumber, style='width: 300px') %]</td>
25 25
        </tr>
26 26
        <tr>
27 27
          <th align="left">[% 'Weight' | $T8 %]</th>
28
          <td>[% L.input_tag("piece.weight", SELF.piece.weight, style='width: 300px') %]</td>
28
          [% IF SELF.piece.weight %]<td>[% L.input_tag('piece.weight', LxERP.format_amount(SELF.piece.weight, 3), style='width: 300px') %]kg</td>
29
          [% ELSE %]<td>[% L.input_tag('piece.weight', SELF.piece.weight, style='width: 300px') %]kg</td>
30
          [% END %]
29 31
        </tr>
30 32
        <tr>
31 33
          <th align="left">[% 'Incoming Delivery Order' | $T8 %]</th>
templates/webpages/piece/list.html
68 68
          [% IF SELF.filter_columns.part %]<td align="left">[% piece.part.displayable_name %]</td>[% END %]
69 69
          [% IF SELF.filter_columns.batch %]<td align="left">[% piece.batch.batchnumber %]</td>[% END %]
70 70
          [% IF SELF.filter_columns.serialnumber %]<td align="left">[% piece.serialnumber %]</td>[% END %]
71
          [% IF SELF.filter_columns.weight %]<td align="left">[% piece.weight %]</td>[% END %]
71
          [% IF SELF.filter_columns.weight %]
72
            [% IF piece.weight %]<td align="left">[% LxERP.format_amount(piece.weight, 3) %] kg</td>[% END %]
73
          [% END %]
72 74
          [% IF SELF.filter_columns.delivery_in %]<td align="left">[% piece.delivery.donumber %]</td>[% END %]
73 75
          [% IF SELF.filter_columns.bin %]<td align="left">[% piece.bin.full_description %]</td>[% END %]
74 76
          [% IF SELF.filter_columns.delivery_out %]<td align="left">[% piece.delivery.donumber %]</td>[% END %]

Auch abrufbar als: Unified diff