Here me out. We are trying to implement Suite CRM inventory module. Each of our products are available and sold on our website in 3 weight variants, for example Product 1 is the product, it will have 3 variants like product 1 - 250 grams, Product 1 - 500 grams, Product 1 - 1000 grams. Although sales is in 3 variants, our inventory is maintained in total weight of Product 1. Now the problem, as we are maintaining the stock in only total weight in grams we input the stock as total weight. Lets say I got a stock of 100 kgs, i will input the stock as 100000 grams. Now the realtime stock should show by calculating sales of other variants in realtime stock. How to do it. lets say I have sale of variant 1 - 5 quantity, variant 2 - 3 quantity and variant 3 - 1 quantity, the realtime stock should be 96250 grams. (100000 - 1250 - 1500 - 1000) = 96250 grams.
Can any god of Suitecrm throw some light on how to implement this?
Assuming you have these sales tracked in the CRM already you could use both workflows or logichooks to implement your design requirements effectively. Personally for reliability and extendability I would say logichooks if you have the skills necessary to create them.
Basically wanting to check for when a sales record is created or modified and from there subtract the required amount.
You could take a look at workflows using calculated fields however for consistency and easy debugging go for the above.
I’m not sure how that could be a specific problem, 3 workflows watching with the same conditions other than each one subtracts the value of each product or more simply using the logic hook,
If statment running on a loop checking the whole order for the product and removing the related specified weight. You may want to look at using the existing product modules to manage your products and there weights