xTuple.com xTupleU Blog & News Customer Support

How can I edit an Item's number or Inventory UOM?

I’ve been trying to populate my database, but I’ve made a couple of mistakes when filling in Items. I accidentally entered the wrong Item Number on a few and the wrong Inventory UOM on a few others. Unfortunately, these fields are grayed-out when I edit the item. How can I change them???

You cannot delete items if any transactions have been posted against them.  You can delete items if there are no transactions (Products-Items-List, right click, delete).

You cannot delete Units of Measure if transactions have been posted against the item.  You can change UOM if no transactions have been posted.  This includes createing item sites.  If Item site exists on a new item the UOM cannon be changed.  If you have not yet created the item site or if you delete the item site, UOM can be edited.

 

In my case I want to delete an item that has NO transactions, just an association to a site, thus it cannot be deleted:

This Item cannot be deleted as there are Item Site records associated with it.
(deleteItem, -2)

And I have not found a method to disassociate it from the Item Site, looking in Inventory under every option and not finding anything that works.

In Addition, I cannot edit the Item Number, and of course when de-activate the item it disappears from view, BUT I cannot create a new item with the same number since it is cemented in the database.

 

I do not see any references to cleaning up mistaken Item entries, name changes and SIMPLE deletion, if such are available then pointers will be appreciated.

If there are no transactions for the item you can simply delete the item site, and then delete the item. Inventory > Item Site > List, find the item site you want to delete and right click on it and delete. Once it is gone you can delete the item. 

 

davidbeauchamp,

Your response is quite old and while I am sure worked in 2014, in version 4.1 (2017) it does not. I get an error regarding lot/serial entries. PostBooks, so far as I can tell, does not support lot/serial control.  However, I did find a form that shows 'NA' for the field in lot serial control.  This is what is preventing me from deleting an item that has no other records, but is tied to a location, which in turn is tied to a lot/serial entry.

 

So... how can I delete the lot/serial entry - which does not belong to begin with since there have been no receipts at all.

Direction/ideas from anyone would be greatly appreciated!  Also, I saw in other posts dating back several years, request for each deletion of an item that is in error.  Along the same lines, is there a method to change the item, along with all of its associations?  This would be very helpful as well, in addition to the copy and delete.

 

Thank you,

Tim

You have a list of things to remove an item properly, itemsite, item sources, UOM cnv. etc. If those items have no transactions, you should be able to remove it, dependencies should be the error.

I’m in the same situation as Tim from Feb 8th. I have created a new item, assigned and assigned a worksite. I am using the most basic version of postbooks/Xtuple.

I noticed immediately that the item number was incorrect and I’d like a clean database (this is a prelauch data load)

After reading this thread, I went to Inventory > Item Sites > List and located my item. I’ve attempted to delet the entry and get an ERROR message stating:

ERROR: Relation “isdetail” does not exist

The extended error messages states that this is related to LotSerialControl

We don’t have the manufacturing module that allows for serial numbers or lots, not have I assigned any.

Any guidance is appreciated. The rest of the removal steps make sense

Jeremy,

The error comes because a configuration option is set incorrectly in your database. I don’t know why this would be the case. To fix it, though:

BEGIN;
DELETE FROM metric WHERE metric_name = 'LotSerialControl';
ROLLBACK;-- if more than one line was deleted
COMMIT; -- if exactly one line was deleted

Gil

Gil,

Thank you for the code!

Does this need to be run as a script in my database? Or am I using the updater? or an area within the Xtuple GUI?

Gil,

I’ve run your script in PGAdmin 4 and received a COMMIT message showing -1 record was removed.

However, in Xtuple, when attempting to delete the item site, I get the same error. The complete error details are as follows:

ERROR: relation “lsdetail” does not exist
LINE 2: EXISTS(SELECT 1 FROM lsdetail
^
QUERY: SELECT fetchMetricBool(‘LotSerialControl’) AND
EXISTS(SELECT 1 FROM lsdetail
WHERE lsdetail_itemsite_id = pItemsiteid)
CONTEXT: PL/pgSQL function deleteitemsite(integer) line 21 at IF
(42P01) QPSQL: Unable to create query

The Query:
SELECT deleteItemSite(:itemsite_id) AS result;

Bound Values:
:itemsite_id: 3321

Then you’ve hit bug 28416 and may need to upgrade to a newer version to get the fix.

Gil

We run GUI 4.10.2 and database version 4.10.1 on a PostgreSQL version 9.6.2

Can you confirm if this still needs to be updated. Thanks!