Revision aa8106e2
Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt
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); |
Auch abrufbar als: Unified diff
Lieferantenartikelnummern um Langtext erweitern: in Maske