Revision 39fa895d
Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
796 | 796 |
$position++; |
797 | 797 |
my $vendor = SL::DB::Manager::Vendor->find_by(id => $makemodel->{make}) || die "Can't find vendor from make"; |
798 | 798 |
|
799 |
my $id = $makemodels_map->{$makemodel->{id}} ? $makemodels_map->{$makemodel->{id}}->id : undef; |
|
799 | 800 |
my $mm = SL::DB::MakeModel->new( # parts_id => $self->part->id, # will be assigned by row add_makemodels |
800 |
id => $makemodel->{id},
|
|
801 |
id => $id,
|
|
801 | 802 |
make => $makemodel->{make}, |
802 | 803 |
model => $makemodel->{model} || '', |
803 | 804 |
lastcost => $::form->parse_amount(\%::myconfig, $makemodel->{lastcost_as_number}), |
... | ... | |
836 | 837 |
$position++; |
837 | 838 |
my $customer = SL::DB::Manager::Customer->find_by(id => $customerprice->{customer_id}) || die "Can't find customer from id"; |
838 | 839 |
|
840 |
my $id = $customerprices_map->{$customerprice->{id}} ? $customerprices_map->{$customerprice->{id}}->id : undef; |
|
839 | 841 |
my $cu = SL::DB::PartCustomerPrice->new( # parts_id => $self->part->id, # will be assigned by row add_customerprices |
840 |
id => $customerprice->{id},
|
|
842 |
id => $id,
|
|
841 | 843 |
customer_id => $customerprice->{customer_id}, |
842 | 844 |
customer_partnumber => $customerprice->{customer_partnumber} || '', |
843 | 845 |
price => $::form->parse_amount(\%::myconfig, $customerprice->{price_as_number}), |
Auch abrufbar als: Unified diff
Part-Controller: Als neu verwenden: neue Id für Kunden-/Lieferanten-Art-Nr.
bzw. nicht die alte Id (MakeModel / PartCustomerPrice) für die neuen Objekte
verwenden. Sonst gehen die Kunden-/Lieferanten-Art-Nr. beim Speichern im alten
Artikel verloren.