Hello, I am trying to make an inventory mana...

(Lucas Cuypers) #1

Hello,

I am trying to make an inventory management app. i have a section where i can make orders and put item on my order. when i put a new item on it i can select it out of my parts list after it loads in the quantity that is in stock. if i need more than is in stock it will add it automatically to the to be ordered section.

how can i create an action or… that will increase the value in my stock by the used amount in this order ?

so basically you have the following tables.

stock

item

:

Discription quantity :

amount that is in stock

order_items

Item:

discription Quantity :

amount to be send for client.

if Quantity order > quantity stock => order difference and put quantity in stock to

zero

if Quantity order < quantity stock => no need to order anything, decrease stock

with required quantity.

how can i manage this ?

thanks

(Yossi Oulu) #2

You have two type of orders. Order from your clients (which you reduce from your stock) and orders that you need to make if your stock is short.

  1. Create a workflow that triggers when a new client order is created. Reduce the amount in your stock accordinly (even if the amount in stocks goes bellow zero… e.g -2) 2. Create a workflow that triggers on any stock change with negative value. Create a supplier order with the absolute value. You can create that order row using the webhook api.
(Lucas Cuypers) #3

thanks for your reaction.

creating a workflow is not difficult but then i amuse that i need to connect this to an action.

it is with the action that i have the problem…

as this order is created in the table orders and takes his amount with a ref out of the stock table…

how do i give the correct row/ table to the action so it knows what it has to adapt …

i assume we need to use set the value of a column…

but i don’t see how to create the formula…

any tips , thanks