Hi. I have seen that this issue was resolved (bug 343) and implemented in 2.3.4, but only in the sales module. I have copied the concept to the purchasing module, as I have had suppliers send me invoices with negative items (even though the total invoice amount is positive). Pretty much exactly what is explained above.

The patch is below, but I can send it somewhere else if needed. This is my first code submission, so please let me know if there is a better process to follow.


diff -up ./po_entry_items.php.bug343 ./po_entry_items.php
--- ./po_entry_items.php.bug343    2011-07-24 22:24:38.000000000 +0200
+++ ./po_entry_items.php    2011-07-24 22:29:03.000000000 +0200
@@ -209,6 +209,9 @@ function handle_cancel_po()

function check_data()
{
+    global $allow_negative_prices;
+    $is_inventory_item = is_inventory_item($_POST['stock_id']);
+
    if(!get_post('stock_id_text', true)) {
        display_error( _("Item description cannot be empty."));
        set_focus('stock_id_edit');
@@ -225,7 +228,7 @@ function check_data()
           return false;
     }

-    if (!check_num('price', 0))
+    if (!check_num('price', 0) && (!$allow_negative_prices || $is_inventory_item))
     {
           display_error(_("The price entered must be numeric and not less than zero."));
        set_focus('price');

2

(0 replies, posted in Items and Inventory)

Hi

Let me start by saying thanks to everyone that is involved in this excellent project. I have been using it for a few months now and it is catering perfectly for an international company with $1mil turnover per month.

I am looking for a report that can provide me with detailed history on the purchase of specific inventory items. For example, I would ideally like to provide our management with a report that shows YTD expenditure on a single item only, even though it is captured on supplier invoices (using direct method and service items) together with a multitude of other items. This makes the search and display feature of "PO Transaction Inquiry" inadequate as there are thousands.

I have been looking and can't seem to find such a report, but I am still fairly new to FA so my apologies if this already exists, or if the question has already been asked and answered.

Even if this is given in the form of an mysql query I would be more than happy to run the report manually and extract the data in csv.

Kind regards
Johan