X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6b935d522a38e1a20802c25ed51a15e0cd292c1d..9beafdda47cd43f99baf99f8ae5abbbf05ccfd66:/SL/IC.pm diff --git a/SL/IC.pm b/SL/IC.pm index ac3d6f281..cf7c99c36 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -502,7 +502,7 @@ sub save { if (($form->{"make_$i"}) || ($form->{"model_$i"})) { #hli $value = $form->parse_amount($myconfig, $form->{"lastcost_$i"}); - if ($value == $form->{"old_lastcost_$i"}) + if ($value == $form->parse_amount($myconfig, $form->{"old_lastcost_$i"})) { if ($form->{"lastupdate_$i"} eq "") { $lastupdate = 'now()'; @@ -583,10 +583,11 @@ sub save { } } - CVar->save_custom_variables('dbh' => $dbh, - 'module' => 'IC', - 'trans_id' => $form->{id}, - 'variables' => $form); + CVar->save_custom_variables(dbh => $dbh, + module => 'IC', + trans_id => $form->{id}, + variables => $form, + save_validity => 1); # commit my $rc = $dbh->commit; @@ -1662,7 +1663,7 @@ sub prepare_parts_for_printing { } my $placeholders = join ', ', ('?') x scalar(@part_ids); - my $query = qq|SELECT mm.parts_id, mm.model, v.name AS make + my $query = qq|SELECT mm.parts_id, mm.model, mm.lastcost, v.name AS make FROM makemodel mm LEFT JOIN vendor v ON (mm.make = v.id) WHERE mm.parts_id IN ($placeholders)|;