- $_POST['qty'] = number_format2(1, $dec);
- $_POST['price'] = price_format(get_purchase_price ($order->supplier_id, $_POST['stock_id']));
+ $_POST['qty'] = number_format2(get_purchase_conversion_factor ($order->supplier_id, $_POST['stock_id']), $dec);
+ //$_POST['price'] = price_format(get_purchase_price ($order->supplier_id, $_POST['stock_id']));
+ $_POST['price'] = price_decimal_format(get_purchase_price ($order->supplier_id, $_POST['stock_id']), $dec2);