X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FOE.pm;h=63fcf1f06f4ece291516d127f08021d6f4cf3b3f;hb=8fdebd9cf2e3aa8fc9643f34cec96f172812abfb;hp=321755761b5e44747ec5e0475f0309443d5dc9f9;hpb=c6867c462780a8747912dc0aab701f43e39ef1cb;p=kivitendo-erp.git diff --git a/SL/OE.pm b/SL/OE.pm index 321755761..63fcf1f06 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -337,8 +337,9 @@ sub save { my $baseqty = $form->{"qty_$i"} * $basefactor; $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1; - $form->{"marge_total_$i"} = $form->parse_amount($myconfig, $form->{"marge_total_$i"}) * 1; - $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1; + $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1; + + $form->{"lastcost_$i"} = $form->parse_amount($myconfig, $form->{"lastcost_$i"}); # set values to 0 if nothing entered $form->{"discount_$i"} = $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100; @@ -428,7 +429,7 @@ sub save { $form->{"serialnumber_$i"}, $form->{"ship_$i"}, conv_i($pricegroup_id), $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}), $form->{"cusordnumber_$i"}, $form->{"subtotal_$i"} ? 't' : 'f', - $form->{"marge_percent_$i"}, $form->{"marge_total_$i"}, + $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"}, $form->{"lastcost_$i"}, conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"marge_price_factor_$i"})); @@ -666,7 +667,7 @@ sub retrieve { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect_noauto($myconfig); + my $dbh = $form->get_standard_dbh; my ($query, $query_add, @values, @ids, $sth); @@ -1284,39 +1285,6 @@ sub project_description { return $value; } -########################## -# Get data for the submitted order id -# from database -# -sub get_order_data_by_ordnumber { - $main::lxdebug->enter_sub(); - - my $self = shift; - my %params = @_; - - Common::check_params(\%params, qw(ordnumber)); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $dbh = $form->get_standard_dbh(); - - my @values = ($params{ordnumber}); - - # We query the database for the fields we need using the submitted "ordnumber" - my $query = <leave_sub(); - - return $result; -} - 1; __END__