X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/c51f2b805bc4e7a2e105ee5e73ecab75aa8f048a..5df2b57a097f66f6cecba0aa577c7aaba3422ab6:/bin/mozilla/io.pl diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 524ccdb7e..9a1c5aa97 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -252,10 +252,15 @@ sub display_row { $column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)", -value => $locale->text('*/')) . $cgi->hidden(-name => "formel_$i", -value => $form->{"formel_$i"}) . $cgi->hidden("-name" => "alu_$i", "-value" => $form->{"alu_$i"}) if $form->{"formel_$i"}; - $column_data{ship} = !$form->{"id_$i"} ? '' : $form->format_amount_units('amount' => $form->{"ship_$i"} * 1, - 'part_unit' => $form->{"partunit_$i"}, - 'conv_units' => 'convertible_not_smaller', - 'max_places' => 2); + + $column_data{ship} = ''; + if ($form->{"id_$i"}) { + my $ship_qty = $form->{"ship_$i"} * 1; + $ship_qty *= $all_units->{$form->{"partunit_$i"}}->{factor}; + $ship_qty /= $all_units->{$form->{"unit_$i"}}->{factor}; + + $column_data{ship} = $form->format_amount(\%myconfig, $form->round_amount($ship_qty, 2) * 1) . ' ' . $form->{"unit_$i"}; + } # build in drop down list for pricesgroups if ($form->{"prices_$i"}) { @@ -1878,8 +1883,8 @@ sub _update_ship { AM->retrieve_all_units(); - my %ship = DO->get_shipped_qty('type' => ($form->{type} eq 'purchase_order') ? 'purchase' : 'sales', - 'ordnumber' => $form->{ordnumber},); + my %ship = DO->get_shipped_qty('type' => ($form->{type} eq 'purchase_order') ? 'purchase' : 'sales', + 'oe_id' => $form->{id},); foreach my $i (1..$form->{rowcount}) { next unless ($form->{"id_${i}"});