Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 51503748

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

  • ID 5150374828be534d9c26849a91225c78fb34291f
  • Vorgänger b9cf3f07
  • Nachfolger d3512ce7

Kundenspez. Preise um Beschreibung u. Langtext erweitern: in Maske

Unterschiede anzeigen:

SL/Controller/Part.pm
538 538
  my $position = scalar @{ $self->customerprices } + 1;
539 539

  
540 540
  my $cu = SL::DB::PartCustomerPrice->new(
541
                      customer_id         => $customer->id,
542
                      customer_partnumber => '',
543
                      price               => 0,
544
                      sortorder           => $position,
541
                      customer_id          => $customer->id,
542
                      customer_partnumber  => '',
543
                      part_description     => '',
544
                      part_longdescription => '',
545
                      price                => 0,
546
                      sortorder            => $position,
545 547
  ) or die "Can't create Customerprice object";
546 548

  
547 549
  my $row_as_html = $self->p->render(
......
994 996
                                     id                   => $id,
995 997
                                     customer_id          => $customerprice->{customer_id},
996 998
                                     customer_partnumber  => $customerprice->{customer_partnumber} || '',
999
                                     part_description     => $customerprice->{part_description},
1000
                                     part_longdescription => $customerprice->{part_longdescription},
997 1001
                                     price                => $::form->parse_amount(\%::myconfig, $customerprice->{price_as_number}),
998 1002
                                     sortorder            => $position,
999 1003
                                   );
......
1129 1133
    next unless $customerprice->{customer_id};
1130 1134
    $position++;
1131 1135
    my $cu = SL::DB::PartCustomerPrice->new( # parts_id   => $self->part->id, # will be assigned by row add_customerprices
1132
                                    id                  => $customerprice->{id},
1133
                                    customer_partnumber => $customerprice->{customer_partnumber},
1134
                                    customer_id         => $customerprice->{customer_id} || '',
1135
                                    price               => $::form->parse_amount(\%::myconfig, $customerprice->{price_as_number} || 0),
1136
                                    sortorder           => $position,
1136
                                    id                   => $customerprice->{id},
1137
                                    customer_partnumber  => $customerprice->{customer_partnumber},
1138
                                    customer_id          => $customerprice->{customer_id} || '',
1139
                                    part_description     => $customerprice->{part_description},
1140
                                    part_longdescription => $customerprice->{part_longdescription},
1141
                                    price                => $::form->parse_amount(\%::myconfig, $customerprice->{price_as_number} || 0),
1142
                                    sortorder            => $position,
1137 1143
                                  ) or die "Can't create cu";
1138 1144
    # $cu->id($customerprice->{id}) if $customerprice->{id};
1139 1145
    push(@customerprice_array, $cu);
templates/design40_webpages/part/_customerprice_row.html
13 13
  <td><img src="image/updown.png" alt="[% LxERP.t8('reorder item') %]" class="dragdrop"></td>
14 14
  <td>[% customerprice.customer.customernumber | html %]</td>
15 15
  <td>[% customerprice.customer.name         | html %]</td>
16
  <td>[% L.input_tag('customerprices[].customer_partnumber', customerprice.customer_partnumber, class='wi-mediumsmall', size=10) %]</td>
17
  <td>[% L.input_tag('customerprices[].price_as_number'    , customerprice.price_as_number    , class="wi-small reformat_number numeric", size=10) %]</td>
18
  <td>[% L.hidden_tag('customerprices[].lastupdate'        , customerprice.lastupdate.to_kivitendo) %][% customerprice.lastupdate.to_kivitendo | html %]</td>
16
  <td>[% L.input_tag('customerprices[].customer_partnumber'     , customerprice.customer_partnumber , class='wi-mediumsmall', size=10) %]</td>
17
  <td>[% L.input_tag('customerprices[].part_description'        , customerprice.part_description    , class='wi-mediumsmall', size=10) %]</td>
18
  <td>[% L.areainput_tag('customerprices[].part_longdescription', customerprice.part_longdescription, class='wi-mediumsmall', size=10) %]</td>
19
  <td>[% L.input_tag('customerprices[].price_as_number'         , customerprice.price_as_number     , class="wi-small reformat_number numeric", size=10) %]</td>
20
  <td>[% L.hidden_tag('customerprices[].lastupdate'             , customerprice.lastupdate.to_kivitendo) %][% customerprice.lastupdate.to_kivitendo | html %]</td>
19 21
</tr>
templates/design40_webpages/part/_customerprices.html
13 13
      <th>[% 'Customer Number'      | $T8 %]</th>
14 14
      <th>[% 'Customer'             | $T8 %]</th>
15 15
      <th>[% 'Customer Part Number' | $T8 %]</th>
16
      <th>[% 'Part Description'     | $T8 %]</th>
17
      <th>[% 'Long Description'     | $T8 %]</th>
16 18
      <th>[% 'Customer Price'       | $T8 %]</th>
17 19
      <th>[% 'Updated'              | $T8 %]</th>
18 20
    </tr>
......
32 34
   <th>[% 'Search & Add Customer' | $T8 %]</th>
33 35
   <td>[% P.customer_vendor.customer_picker('add_customerprice', '', class="add_customerprice_input wi-small tooltipstered tooltipster-html", action={commit_one='kivi.Part.add_customerprice_row'}, title=LxERP.t8("Search customer by name and add by selecting")) %]</td>
34 36
   <td>[% L.button_tag('kivi.Part.add_customerprice_row()', LxERP.t8('Add')) %]</td>
35
   <td colspan="2"></td>
37
   <td colspan="4"></td>
36 38
  </tr>
37 39
 </tfoot>
38 40
</table>
templates/webpages/part/_customerprice_row.html
17 17
         </td>
18 18
         <td>[% customerprice.customer.customernumber | html %]</td>
19 19
         <td>[% customerprice.customer.name         | html %] </td>
20
         <td>[% L.input_tag('customerprices[].customer_partnumber', customerprice.customer_partnumber, size=30 ) %]</td>
21
         <td>[% L.input_tag('customerprices[].price_as_number'    , customerprice.price_as_number    , size=15 , class="reformat_number numeric") %]</td>
22
         <td>[% L.hidden_tag('customerprices[].lastupdate'        , customerprice.lastupdate.to_kivitendo) %][% customerprice.lastupdate.to_kivitendo | html %]</td>
20
         <td>[% L.input_tag('customerprices[].customer_partnumber'     , customerprice.customer_partnumber , size=30 ) %]</td>
21
         <td>[% L.input_tag('customerprices[].part_description'        , customerprice.part_description    , size=30 ) %]</td>
22
         <td>[% L.areainput_tag('customerprices[].part_longdescription', customerprice.part_longdescription, size=30 ) %]</td>
23
         <td>[% L.input_tag('customerprices[].price_as_number'         , customerprice.price_as_number     , size=15 , class="reformat_number numeric") %]</td>
24
         <td>[% L.hidden_tag('customerprices[].lastupdate'             , customerprice.lastupdate.to_kivitendo) %][% customerprice.lastupdate.to_kivitendo | html %]</td>
23 25
        </tr>
templates/webpages/part/_customerprices.html
15 15
          <th class="listheading" style='width:12em'>[% 'Customer Number'      | $T8 %]</th>
16 16
          <th class="listheading">[% 'Customer'             | $T8 %]</th>
17 17
          <th class="listheading">[% 'Customer Part Number' | $T8 %]</th>
18
          <th class="listheading">[% 'Part Description'     | $T8 %]</th>
19
          <th class="listheading">[% 'Long Description'     | $T8 %]</th>
18 20
          <th class="listheading">[% 'Customer Price'       | $T8 %]</th>
19 21
          <th class="listheading">[% 'Updated'              | $T8 %]</th>
20 22
         </tr>

Auch abrufbar als: Unified diff