Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision aa8106e2

Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt

  • ID aa8106e2adee09cddfd53f84e406ab34c89ff269
  • Vorgänger 715b80ec
  • Nachfolger 06c506bc

Lieferantenartikelnummern um Langtext erweitern: in Maske

Unterschiede anzeigen:

SL/Controller/Part.pm
503 503

  
504 504
  my $position = scalar @{$self->makemodels} + 1;
505 505

  
506
  my $mm = SL::DB::MakeModel->new(# parts_id       => $::form->{part}->{id},
507
                                  make             => $vendor->id,
508
                                  model            => '',
509
                                  part_description => '',
510
                                  lastcost         => 0,
511
                                  sortorder        => $position,
506
  my $mm = SL::DB::MakeModel->new(# parts_id           => $::form->{part}->{id},
507
                                  make                 => $vendor->id,
508
                                  model                => '',
509
                                  part_description     => '',
510
                                  part_longdescription => '',
511
                                  lastcost             => 0,
512
                                  sortorder            => $position,
512 513
                                 ) or die "Can't create MakeModel object";
513 514

  
514 515
  my $row_as_html = $self->p->render('part/_makemodel_row',
......
951 952
    my $vendor = SL::DB::Manager::Vendor->find_by(id => $makemodel->{make}) || die "Can't find vendor from make";
952 953

  
953 954
    my $id = $makemodels_map->{$makemodel->{id}} ? $makemodels_map->{$makemodel->{id}}->id : undef;
954
    my $mm = SL::DB::MakeModel->new( # parts_id       => $self->part->id, # will be assigned by row add_makemodels
955
                                     id               => $id,
956
                                     make             => $makemodel->{make},
957
                                     model            => $makemodel->{model} || '',
958
                                     part_description => $makemodel->{part_description},
959
                                     lastcost         => $::form->parse_amount(\%::myconfig, $makemodel->{lastcost_as_number}),
960
                                     sortorder        => $position,
955
    my $mm = SL::DB::MakeModel->new( # parts_id           => $self->part->id, # will be assigned by row add_makemodels
956
                                     id                   => $id,
957
                                     make                 => $makemodel->{make},
958
                                     model                => $makemodel->{model} || '',
959
                                     part_description     => $makemodel->{part_description},
960
                                     part_longdescription => $makemodel->{part_longdescription},
961
                                     lastcost             => $::form->parse_amount(\%::myconfig, $makemodel->{lastcost_as_number}),
962
                                     sortorder            => $position,
961 963
                                   );
962 964
    if ($makemodels_map->{$mm->id} && !$makemodels_map->{$mm->id}->lastupdate && $makemodels_map->{$mm->id}->lastcost == 0 && $mm->lastcost == 0) {
963 965
      # lastupdate isn't set, original lastcost is 0 and new lastcost is 0
......
1111 1113
    next unless $makemodel->{make};
1112 1114
    $position++;
1113 1115
    my $mm = SL::DB::MakeModel->new( # parts_id   => $self->part->id, # will be assigned by row add_makemodels
1114
                                    id               => $makemodel->{id},
1115
                                    make             => $makemodel->{make},
1116
                                    model            => $makemodel->{model} || '',
1117
                                    part_description => $makemodel->{part_description} || '',
1118
                                    lastcost         => $::form->parse_amount(\%::myconfig, $makemodel->{lastcost_as_number} || 0),
1119
                                    sortorder        => $position,
1116
                                    id                   => $makemodel->{id},
1117
                                    make                 => $makemodel->{make},
1118
                                    model                => $makemodel->{model} || '',
1119
                                    part_description     => $makemodel->{part_description} || '',
1120
                                    part_longdescription => $makemodel->{part_longdescription} || '',
1121
                                    lastcost             => $::form->parse_amount(\%::myconfig, $makemodel->{lastcost_as_number} || 0),
1122
                                    sortorder            => $position,
1120 1123
                                  ) or die "Can't create mm";
1121 1124
    # $mm->id($makemodel->{id}) if $makemodel->{id};
1122 1125
    push(@makemodel_array, $mm);
templates/design40_webpages/part/_makemodel.html
15 15
      <th>[% 'Vendor'           | $T8 %]</th>
16 16
      <th>[% 'Model'            | $T8 %]</th>
17 17
      <th>[% 'Part Description' | $T8 %]</th>
18
      <th>[% 'Long Description' | $T8 %]</th>
18 19
      <th>[% 'Last Cost'        | $T8 %]</th>
19 20
      <th>[% 'Updated'          | $T8 %]</th>
20 21
    </tr>
......
38 39
        [% P.customer_vendor.picker('add_makemodel', '', type='vendor', class='add_makemodel_input wi-small tooltipstered tooltipster-html', title=titleaddmodel, action={commit_one='kivi.Part.add_makemodel_row'}, size=10) %]
39 40
      </td>
40 41
     <td>[% L.button_tag('kivi.Part.add_makemodel_row()', LxERP.t8('Add')) %]</td>
41
     <td colspan="3"></td>
42
     <td colspan="4"></td>
42 43
    </tr>
43 44
  </tfoot>
44 45
</table>
templates/design40_webpages/part/_makemodel_row.html
15 15
  <td>[% makemodel.vendor.name         | html %]</td>
16 16
  <td>[% L.input_tag('makemodels[].model', makemodel.model, class='wi-mediumsmall', size=10) %] </td>
17 17
  <td>[% L.input_tag('makemodels[].part_description', makemodel.part_description, class='wi-mediumsmall', size=10) %]</td>
18
  <td>[% L.areainput_tag('makemodels[].part_longdescription', makemodel.part_longdescription, class='wi-mediumsmall', size=10) %]</td>
18 19
  <td>[% L.input_tag('makemodels[].lastcost_as_number', makemodel.lastcost_as_number, class='reformat_number numeric wi-small', size=10) %] </td>
19 20
  <td>
20 21
    [% L.hidden_tag('makemodels[].lastupdate', makemodel.lastupdate.to_kivitendo) %]
templates/webpages/part/_makemodel.html
17 17
          <th class="listheading">[% 'Vendor'           | $T8 %]</th>
18 18
          <th class="listheading">[% 'Model'            | $T8 %]</th>
19 19
          <th class="listheading">[% 'Part Description' | $T8 %]</th>
20
          <th class="listheading">[% 'Long Description' | $T8 %]</th>
20 21
          <th class="listheading">[% 'Last Cost'        | $T8 %]</th>
21 22
          <th class="listheading">[% 'Updated'          | $T8 %]</th>
22 23
         </tr>
templates/webpages/part/_makemodel_row.html
17 17
         </td>
18 18
         <td>[% makemodel.vendor.vendornumber | html %]</td>
19 19
         <td>[% makemodel.vendor.name         | html %] </td>
20
         <td>[% L.input_tag('makemodels[].model'              , makemodel.model                   , size=30 ) %]</td>
21
         <td>[% L.input_tag('makemodels[].part_description'   , makemodel.part_description        , size=30 ) %]</td>
22
         <td>[% L.input_tag('makemodels[].lastcost_as_number' , makemodel.lastcost_as_number      , size=15 , class="reformat_number numeric") %]</td>
23
         <td>[% L.hidden_tag('makemodels[].lastupdate'        , makemodel.lastupdate.to_kivitendo) %][% makemodel.lastupdate.to_kivitendo | html %]</td>
20
         <td>[% L.input_tag('makemodels[].model'                   , makemodel.model               , size=30 ) %]</td>
21
         <td>[% L.input_tag('makemodels[].part_description'        , makemodel.part_description    , size=30 ) %]</td>
22
         <td>[% L.areainput_tag('makemodels[].part_longdescription', makemodel.part_longdescription, size=30 ) %]</td>
23
         <td>[% L.input_tag('makemodels[].lastcost_as_number'      , makemodel.lastcost_as_number  , size=15 , class="reformat_number numeric") %]</td>
24
         <td>[% L.hidden_tag('makemodels[].lastupdate'             , makemodel.lastupdate.to_kivitendo) %][% makemodel.lastupdate.to_kivitendo | html %]</td>
24 25
        </tr>

Auch abrufbar als: Unified diff