Allow fractional entry of Purchase Order Line Price. Upot 6 decimals.
authorJoe <joe.hunt.consulting@gmail.com>
Thu, 27 Apr 2023 15:34:39 +0000 (17:34 +0200)
committerJoe <joe.hunt.consulting@gmail.com>
Thu, 27 Apr 2023 15:34:39 +0000 (17:34 +0200)
inventory/purchasing_data.php
purchasing/includes/ui/po_ui.inc

index 84b1603e8f962836f066694b5df2bf556e3b3c79..cb3ac40e2030ee8773cbc416ee40976253a3f881 100644 (file)
@@ -211,7 +211,10 @@ else
        supplier_list_row(_("Supplier:"), 'supplier_id', null, false, true);
        $_POST['price'] = $_POST['suppliers_uom'] = $_POST['conversion_factor'] = $_POST['supplier_description'] = "";
 }
-amount_row(_("Price:"), 'price', null,'', get_supplier_currency($selected_id), $dec2);
+echo "<tr>";
+unit_amount_cells(_("Price"), 'price', null, '', get_supplier_currency($selected_id));
+echo "</tr>\n";
+
 text_row(_("Suppliers Unit of Measure:"), 'suppliers_uom', null, 50, 51);
 
 if (!isset($_POST['conversion_factor']) || $_POST['conversion_factor'] == "")
index 80d6a3b5a803396c549e09f363d8cfd33a4b5e9b..a91360718b3d95c6987d0f4ba8fe167e4eb48852 100644 (file)
@@ -359,7 +359,7 @@ function po_item_controls(&$order, &$rowcounter, $line_no=-1)
        alt_table_row_color($rowcounter);
        $new = $order->order_no == 0;
 
-       $dec2 = 0;
+       $dec2 = 6;
        $id = find_submit('Edit');
        if (($id != -1) && $line_no == $id)
        {
@@ -435,7 +435,7 @@ function po_item_controls(&$order, &$rowcounter, $line_no=-1)
                hidden('price', $_POST['price']);
        }       
        else    
-               amount_cells(null, 'price', null, null, null, $dec2);
+               unit_amount_cells(null, 'price');
 
        $line_total = round(input_num('qty') * input_num('price'),  user_price_dec());
        amount_cell($line_total, false, '','line_total');