Revision f19ee430
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/DispositionManager.pm | ||
---|---|---|
163 | 163 |
sub action_show_vendor_items { |
164 | 164 |
my ($self) = @_; |
165 | 165 |
|
166 |
my $makemodels_parts = SL::DB::Manager::Part->get_all( |
|
167 |
query => [ |
|
168 |
'makemodels.make' => $::form->{v_id}, |
|
169 |
'makemodels.sortorder' => 1, |
|
170 |
], |
|
171 |
sort_by => 'onhand', |
|
172 |
with_objects => [ 'makemodels' ] |
|
173 |
); |
|
166 |
my $makemodels_parts; |
|
167 |
if ($::form->{vendor_id}) { |
|
168 |
$makemodels_parts = SL::DB::Manager::Part->get_all( |
|
169 |
query => [ |
|
170 |
'purchase_basket_item.id' => undef, |
|
171 |
'makemodels.make' => $::form->{vendor_id}, |
|
172 |
], |
|
173 |
sort_by => 'onhand', |
|
174 |
with_objects => [ 'makemodels', 'purchase_basket_item' ] |
|
175 |
); |
|
176 |
}; |
|
177 |
|
|
174 | 178 |
$self->render( |
175 | 179 |
'disposition_manager/_show_vendor_parts', |
176 | 180 |
{ layout => 0 }, |
SL/DB/Part.pm | ||
---|---|---|
88 | 88 |
column_map => { id => 'part_id' }, |
89 | 89 |
manager_args => { sort_by => 'valid_from DESC', limit => 1 }, |
90 | 90 |
}, |
91 |
purchase_basket_item => { |
|
92 |
type => 'one to one', |
|
93 |
class => 'SL::DB::PurchaseBasketItem', |
|
94 |
column_map => { id => 'part_id' }, |
|
95 |
}, |
|
91 | 96 |
); |
92 | 97 |
|
93 | 98 |
__PACKAGE__->meta->initialize; |
js/kivi.DispositionManager.js | ||
---|---|---|
15 | 15 |
} |
16 | 16 |
|
17 | 17 |
ns.display_vendor_parts = function(vendor_id) { |
18 |
var url = 'controller.pl?action=DispositionManager/show_vendor_items&v_id=' + vendor_id; |
|
18 |
var url = 'controller.pl?action=DispositionManager/show_vendor_items&vendor_id=' + vendor_id;
|
|
19 | 19 |
$('#vendor_parts').load(url); |
20 | 20 |
} |
21 | 21 |
|
Auch abrufbar als: Unified diff
DispositionManager: Zeige keine Lieferanten-Artikel die im Warenkorb sind