Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 557b2cca

Von Werner Hahn vor etwa 1 Jahr hinzugefügt

  • ID 557b2cca1fefba7faed4721b966c02e70c6d4d0a
  • Vorgänger 0be40f3d
  • Nachfolger 92d44251

DispositionManager: Lieferantenauswahl berichtigt

Unterschiede anzeigen:

SL/Controller/DispositionManager.pm
195 195
    return $self->js->render();
196 196
  }
197 197

  
198
  my $vendor_id =  $::form->{vendor_ids}->[0];
199

  
200 198
  # check for same vendor
201 199
  my %basket_id_vendor_id_map =
202 200
    map {$::form->{basket_ids}->[$_] => $::form->{vendor_ids}->[$_]}
203 201
    (0..$#{$::form->{vendor_ids}});
202

  
203
  my $vendor_id = $::form->{vendor_id_selected} || $basket_id_vendor_id_map{@{$basket_item_ids}[0]} || $basket_id_vendor_id_map{@{$basket_item_ids}[0]};
204

  
204 205
  my @different_vendor_ids =
205 206
    grep { $basket_id_vendor_id_map{$_} ne $vendor_id }
206 207
    @{$basket_item_ids};
SL/Controller/Order.pm
147 147
sub action_add_from_purchase_basket {
148 148
  my ($self) = @_;
149 149

  
150
  my $basket_item_ids = $::form->{basket_item_ids};
151
  my $vendor_item_ids = $::form->{vendor_item_ids};
150
  my $basket_item_ids = $::form->{basket_item_ids} || [];
151
  my $vendor_item_ids = $::form->{vendor_item_ids} || [];
152 152
  my $vendor_id       = $::form->{vendor_id};
153 153

  
154 154

  
js/kivi.DispositionManager.js
58 58
$(function() {
59 59
 $('#vendor_id').change('set_item:CustomerVendorPicker', function(_e,_o) {
60 60
   kivi.DispositionManager.sort_vendors();
61
   $('#vendor_id_selected').val($('#vendor_id').val());
61 62
 })
62 63
});
templates/design40_webpages/disposition_manager/show_purchase_basket.html
13 13
    <caption>[% 'Vendor' | $T8 %]</caption>
14 14
    <tbody>
15 15
      <tr>
16
        <td>[% P.customer_vendor.picker('vendor_id', '', type='vendor') %]</td>
16
        <td>[% P.customer_vendor.picker('vendor_id', '', type='vendor', fat_set_item=1) %]</td>
17 17
      </tr>
18 18
    </tbody>
19 19
  </table>
......
22 22

  
23 23
<form id="purchasebasket">
24 24

  
25
[% L.hidden_tag('vendor_id_selected') %]
25 26
<div class="wrapper">
26 27
  <table id="baskettable" class="tbl-list">
27 28
  <caption>[% 'Purchase basket' | $T8 %]</caption>
......
47 48
          [% L.checkbox_tag('ids[+]', "data-checkall"=1, checked = '1',  value=basket_item.id) %]
48 49
          [% L.hidden_tag('basket_ids[+]', basket_item.id) %]
49 50
        </td>
50
        <td> [% basket_item.part.presenter.part(target = '_blank') %]
51
        <td class="numeric"> [% basket_item.part.presenter.part(target = '_blank') %]
51 52
          [% P.button_tag(
52 53
               "kivi.DispositionManager.show_detail_dialog("
53
                 _  basket_item.part.id _ "," _ basket_item.part.partnumber _
54
               ")",
54
                 _  basket_item.part.id _ ",'" _ basket_item.part.partnumber _
55
               "')",
55 56
               LxERP.t8('Details (one letter abbreviation)'),
56 57
               title=LxERP.t8('Article details'), class="button") %]
57 58
        </td>

Auch abrufbar als: Unified diff