#28 Mantis ID:6976 - Database API View \"api.itemsite\" and itemsite_freeze column

open
nobody
None
3
2008-06-24
2008-06-24
omfgppc
No

Reporter: jstandring
Severity: Patch
Category: All
Project: CSVimp

Version: 1.0

Description:
When using the CSV import Tool the import (INSERT) itemsites the API view "api.itemsite" leaves the "itemsite_freeze" column blank. This means that when the a stock adjustment is made on the item the Xtuple Client, it Shows the stock as frozen. The solution is to add the "itemsite_freeze" column to the insert rule and have its value default to "false". see update PostgreSQL statement below.

Steps to reproduce:

Additional information:
Update the INSERT Rule as follows.

INSERT INTO itemsite (itemsite_item_id, itemsite_warehous_id, itemsite_active, itemsite_supply, itemsite_createpr, itemsite_createwo, itemsite_sold, itemsite_soldranking, itemsite_controlmethod, itemsite_perishable, itemsite_plancode_id, itemsite_costcat_id, itemsite_loccntrl, itemsite_location_id, itemsite_location, itemsite_location_comments, itemsite_disallowblankwip, itemsite_stocked, itemsite_freeze, itemsite_abcclass, itemsite_autoabcclass, itemsite_cyclecountfreq, itemsite_eventfence, itemsite_useparams, itemsite_reorderlevel, itemsite_ordertoqty, itemsite_minordqty, itemsite_maxordqty, itemsite_multordqty, itemsite_useparamsmanual, itemsite_ordergroup, itemsite_mps_timefence, itemsite_leadtime, itemsite_safetystock, itemsite_notes, itemsite_qtyonhand, itemsite_warrpurc, itemsite_autoreg)
VALUES (getitemid(new.item_number::text), getwarehousid(new.warehouse::text, 'ACTIVE'::text), COALESCE(new.active, true), COALESCE(new.supplied_at_warehouse, true), COALESCE(new.create_prs, false), COALESCE(new.create_wos, false), COALESCE(new.sold_from_warehouse, true), COALESCE(new.ranking, 1),
CASE
WHEN new.control_method = 'None'::text THEN 'N'::text
WHEN new.control_method = 'Regular'::text THEN 'R'::text
WHEN new.control_method = 'Serial #'::text THEN 'S'::text
WHEN new.control_method = 'Lot #'::text THEN 'L'::text
ELSE NULL::text
END, COALESCE(new.perishable, false), getplancodeid(new.planner_code), getcostcatid(new.cost_category), COALESCE(new.multiple_location_control, false), COALESCE(getlocationid(new.warehouse::text, new."location"), -1), COALESCE(new.user_defined_location, ''::text), COALESCE(new.location_comment, ''::text), COALESCE(new.disallow_blank_wip_locations, false), COALESCE(new.stocked, false), false, COALESCE(new.abc_class, 'A'::bpchar), COALESCE(new.allow_automatic_updates, false), COALESCE(new.cycl_cnt_freq, 0), COALESCE(new.event_fence::numeric, fetchmetricvalue('DefaultEventFence'::text)), COALESCE(new.enforce_order_parameters, false), COALESCE(new.reorder_level, 0::numeric), COALESCE(new.order_up_to, 0::numeric), COALESCE(new.minimum_order, 0::numeric), COALESCE(new.maximum_order, 0::numeric), COALESCE(new.order_multiple, 0::numeric), COALESCE(new.enforce_on_manual_orders, false), COALESCE(new.group_mps_mrp_orders, 0), COALESCE(new.mps_time_fence, 0), COALESCE(new.lead_time, 0), COALESCE(new.safety_stock, 0::numeric), COALESCE(new.notes, ''::text), 0, COALESCE(new.require_warranty, false), COALESCE(new.auto_register, false));

Read more at http://www.xtuple.org/mantis/view.php?id=6976

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks