Revision 67f3e4cd
Von Tamino Steinert vor 10 Monaten hinzugefügt
scripts/import_variant_csv.pl | ||
---|---|---|
38 | 38 |
use SL::DB::VariantPropertyValue; |
39 | 39 |
use SL::DB::Warehouse; |
40 | 40 |
use SL::DB::Inventory; |
41 |
use SL::DB::Buchungsgruppe; |
|
41 | 42 |
|
42 | 43 |
use feature "say"; |
43 | 44 |
|
... | ... | |
259 | 260 |
my $transfer_type = SL::DB::Manager::TransferType->find_by( |
260 | 261 |
direction => 'in', |
261 | 262 |
description => 'stock', |
262 |
) or die "Could no find transfer_type"; |
|
263 |
) or die "Could not find transfer_type"; |
|
264 |
|
|
265 |
my $buchungsgruppe = SL::DB::Manager::Buchungsgruppe->find_by( |
|
266 |
description => 'Standard 19%', |
|
267 |
) or die "Could not find buchungsgruppe"; |
|
263 | 268 |
|
264 | 269 |
SL::DB->client->with_transaction(sub { |
265 | 270 |
my @errors; |
... | ... | |
434 | 439 |
%parent_variant_fix_att |
435 | 440 |
); |
436 | 441 |
$parent_variant->update_attributes( |
437 |
description => $description, |
|
438 |
sellprice => $best_sellprice, |
|
439 |
partsgroup => $partsgroup, |
|
440 |
warehouse => $warehouse, |
|
441 |
bin => $warehouse->bins->[0], |
|
442 |
unit => 'Stck', |
|
442 |
description => $description, |
|
443 |
sellprice => $best_sellprice, |
|
444 |
partsgroup => $partsgroup, |
|
445 |
warehouse => $warehouse, |
|
446 |
bin => $warehouse->bins->[0], |
|
447 |
unit => 'Stck', |
|
448 |
buchungsgruppen_id => $buchungsgruppe->id, |
|
443 | 449 |
); |
444 | 450 |
|
445 | 451 |
unless (scalar @{$parent_variant->makemodels}) { |
Auch abrufbar als: Unified diff
kuw: CSV-Import-Script: Buchungsgruppe hinzufügen