34
Views
5
Comments
Solved
I want to change each of my product stock everytime i add them from purchasing screen

Hello, im new to OutSystems,
I need help ASAP with my inventory management aplication for my final test in HighSchool, I want to update Current Stock in Stock Screen (baseStock + quantity of each time i create a purchasing) but i cant figure it out what did i do wrong 
(for example : Add 20 Qty of "Human Logo" from Purchasing Screen, then when i looked at StockList Screen it did change "Human Logo" stock from 10 Qty to 30 Qty, but it also effect other product like "Zombie Logo" from 100 Qty to 120 Qty)
and also when i try to add stock for other product beside "Human Logo", it did not apply 
(for example: Add 50 Qty of "Zombie Logo", but at StockList Screen, "Zombie Logo" Stock still remains the same)

hope u understand, sorry for my bad english, 



MyBPS.oml
Help1.png
Help2.png
2020-11-10 07-09-26
Dadi
Solution

Hi Denise

Its not adding others stock outside Human Logo because we need to join the Stock and Purchase based on Stock Id.


Then group each column to count the quantity on purchasing. You can follow this update oml just for reference.

Also it is not best condition to make Image binary in the same table with the details, it will heavy whenever we want to view the details stock, you can do some improvement there.


Regard

MyBPS2.oml
UserImage.jpg
Denise Ady

Hi Dadi, Thank you for your response ^_^, the stock calculation of each product are fixed but if i add a new product without a purchase then the stock remains 0 
(Example : Add a new product "Plant Logo" with 5 BaseQuantity it will show 0 stock in StockList screen, but then if i add a Purchasing of 10 Qty of "Plant Logo", then it will become 15 Qty in StockList Screen)

Update : I solved the minor problem, Thanks ^_^

2023-10-27 15-22-44
Rahul Yadav

Hi Denise,

I think you dont need the below aggregate - 

I m attaching the oml back, can you check if that resolves your issue?

Thanks

Rahul

MyBPS.oml
UserImage.jpg
Denise Ady

Hi Rahuly, Thankyou for your response ^_^, but i find out that all of the product stock is still effected by a single Purchasing (Add 10 Qty of "Human Logo" then it effect "Zombie Logo" Qty too)

2020-11-10 07-09-26
Dadi
Solution

Hi Denise

Its not adding others stock outside Human Logo because we need to join the Stock and Purchase based on Stock Id.


Then group each column to count the quantity on purchasing. You can follow this update oml just for reference.

Also it is not best condition to make Image binary in the same table with the details, it will heavy whenever we want to view the details stock, you can do some improvement there.


Regard

MyBPS2.oml
UserImage.jpg
Denise Ady

Hi Dadi, Thank you for your response ^_^, the stock calculation of each product are fixed but if i add a new product without a purchase then the stock remains 0 
(Example : Add a new product "Plant Logo" with 5 BaseQuantity it will show 0 stock in StockList screen, but then if i add a Purchasing of 10 Qty of "Plant Logo", then it will become 15 Qty in StockList Screen)

Update : I solved the minor problem, Thanks ^_^

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.