RE: Storewise item cost price and selling price are not Matching in HQ
Hi Abhilash,
It is good to know your cost information is right, one less thing to worry about. In regards to price, it is bit shocking you say that they are 0. You have to check something with the help of SQL.
You may know about the table "Itemdynamic" which has all the stores item data in HQ database (like snapshot quantity,snapshotprice,Qty,Price and etc..)
Snapshotprice & snapshotquantity is coming from stores's database. Qty & Price is calculated by HQ in its own logic and it may not match the other 2 values always. Thus you see discrepancies in quantity or price (rare) from time to time.
Query 1:
Select item.itemlookupcode,itemdynamic.price,itemdynamic.snapshotprice from itemdynamic where itemdynamic.price <> itemdynamic.snapshotprice and storeid=XXX
This will give a list of items with discrepancies. If you feel snapshotpice is right then you may do another SQL to update the price to snapshotprice. I hope your snapshotprices are right. Snapshotprice is actually item.price from store database.
Query 2:
Update itemdynamic set price=snapshotprice where storeid=XXX
what if you are not sure that the current snapshotprice for the item is not right? then you have to push all the item price from store to HQ database's itemdynamic table. How? again by sql
Query 3:
BEGIN
declare @mytable table
(
itemid int,
itemprice money
)
-- insert values to temp table
insert into @mytable select distinct item.id,Price from Item
--update main table with your temptable
update Item set Price= my.itemprice from @mytable my
inner join Item on item.ID=my.itemid
END
once you run the above query send a 401 worksheet to store and wait for it to finish. Then run query 2 in hq database. You can also use sql view if you are not comfortable.
Also please make sure you take a backup of the databases. ( You may want to run this in your test environment first).
Hopefully it solves your problem for now and also it is an once off issue.
-VKR.