Warehouse Stock Tracking Levels with Item Tag

Continuing the discussion from Product Based Warehouse Tracking:

Hello All - I would like something explained to me regarding the use of {ITEM TAG:Warehouse} when Adding an Order to a Ticket as shown in @emre linked Tutorial.

Here is my custom rule - same as the one in the Tutorial for reference:

So what does this do?

I thought it may be necessary to adjust stock levels but I have just constrained the Rule to see how Stock was affected - no change. These also was no change in Inventory Management - Costs / Predictions etc?

My concern was did I need to add “Warehouse” references to Void Rules, Cancel Rules and Refund Item Rules?

Current Work Period Report (Ticket Summaries & Values), Inventory Levels, and Item Sales Reports all seem to correlate, without this rule?

Can some please elaborate on what using this above Rule actually does, thanks.

[EDIT:] Now I am even more puzzled as using SQL Management Studio the Order has the correct WarehouseID attached AND checking the debugger this rule does not fire!

From what I can see it seems to show that IF the ITEM TAG:Warehouse value is Not null, then ITEM TAG:Warehouse is to be added to a ticket.

But after going through that tutorial it explains, the action is created so that::

Therefore that rule that you posted indicates
When a new order is added, and IF a warehouse is assigned to product, that action will update the specific order’s warehouse in entity screen so it shows(Example) [quote=“emre, post:1, topic:8121”]
and 150 GR meat consumed from Pakistani Kitchen.
It’s just used if you have more than one type of kitchen. If this is your setup also, the rule is made so it updates the warehouse item consumption appropriately according to item which is assigned to a specific kitchen.

E.g If chinese food kitchen is selected and an item is ordered, then under warehouse, Chinese Kitchen entity will show for that particular order this amount of meat or product was used.

I don’t know if this is the answer you’re looking for, but from what I gathered from that rule and tutorial, the rule just ensures that based on what kitchen is selected, it would update that kitchen consumption accordingly using that rule.

I am thinking that this RED ARROW below has made the Rule above obsolete @QMcKay?
(summonsing the Stock Guru Genius :fearful:)

Just doing my thing (checking every bit to document the journal…:sweat_smile:)

That’s a good answer from your observations Shivan but it seems Warehouse is Updated (Consumption) regardless of this rule. I am guessing the rule has become obsolete in the later versions of SambaPOS…

From what you have posted it may seem so. Sorry I couldn’t be any more helpful

Here you can find an explanation for Warehouse setting.


Ugh you made me have to open up two browsers and read the tutorial and your question at same time to get an understanding of what your asking… I was hoping it would be a single browser day :frowning: LOL All joking aside if your posting a rule with an action and asking about what it does its very helpful if you include the action’s settings as well in your post.

I just read the tutorial and it seems pretty self explanatory what its doing. I mean Emre explained it well in the tutorial. It is simply updating the Warehouse based on Product Tag. If the product has no tag it will not fire the rule at all.

So if your inventory is not reflecting this but its updating warehouse correctly then your issue is not the tutorial its some other configuration in your inventory setup. Or it could be even more simple like ticket was not paid yet.

Here is a quote “Can’t see the wood from the Trees…” LOL

Let me explain kendash and other avid readers…
At exactly 7minutes, 40 seconds into my gym work today, I thought “why would @emre do a tutorial about 1 meat split between to warehouse uses”?

Emre was showing the flexibility of SambaPOS by allowing an Update Order Action to OVERRIDE the default Warehouse Setup (or Blank Setup). The Tutorial used a Blank Setup and of course I was using a warehouse default.

So yes it seems very simple when you look at it with Blank Default Warehouses. The Tutorial just implied the Tag usage can be used to override or save a warehouse ID to a Order. I know I am stating the bleeding obvious as it seems that when I type that last line.

BUT - this is what the whole analysis was about:
What if a user has deployed stock to various warehouses using a default (not mentioning names here :unamused:) OR has used {ITEM TAG:Warehouse} when Adding Orders to Tickets AND decides to:
Cancel Order? [Default Rule]
Refund Order? [Custom Rule]
Void Order? [Default Rule]

My guess and the point is these all require to have {ITEM TAG:Warehouse} modifications if the Order has been Closed, Held, (Submitted) - correct? If these modifications are not done then I assume CONSUMPTIONS calculations by Warehouse would be inaccurate?

Not having a default Blank Warehouse just clouded the issue.

No joke! I have my first instance browser with 10 Tabs open on various warehouse/stock discussions. My second (new window) has 3 current threads and Samba Main :flushed:

That was a question :slightly_smiling:

Hey Emre!
If I am using {ITEM TAG:Warehouse} Product Tag to pass the warehouse and override the Default warehouse that may be different - do I need to worry about other rules and also passing warehouse to the Update Order Action (Cancel/Void)?

I don’t think Cancel or Void will affect consumption costs? I performed such a test:
Default Warehouse = House A;
Used Product Tag and passed {ITEM TAG:Warehouse} = House B.

The correct “House B” was saved to the dbo.Orders. I could not see any Warehouse Consumption or Period Consumption data that looked out?

Umm then there is Q’s Refund Item and place it back into Stock?

So can you explain why your setting a default warehouse if your using this tutorial? I ask because you are giving some pieces of your flow but its easier if I can understand the full flow. Or is this all one of the theoretical situations?

Which one? He has discussed this many many times.

Yes it just was Theory.
I was testing my Inventory Control and was trying to work out why we would pass a Tag when there was a default warehouse. I realise now it really when stock is shared. I have found an issue but - if you are “silly enough” to override a default warehouse then your Warehouse Screens go out.

Ok so if you use default warehouse setting you will have to do Inventory Transactions to transfer inventory. for it to work as its meant too. The tutorial Emre showed is product based and it makes it so you do one purchase into main warehouse and during the day you may move items from warehouse A to a place in kitchen and you want it tracked from kitchen but its not really a warehouse kinda like production.

Your not really storing stuff there when you purchase from supplier…

Default warehouse is if you purchase item into main warehouse then you transfer from main warehouse into a different holding place… and it stays there…an actual holding warehouse.

Does that make more sense?

Ok I think I know what I am trying to work towards and see your post above.
I guess I was DECIDING on do I use Product Tags for Warehouse Descriptor or do I use the Default Warehouse on Inventory Screen.

Yes it does make more sense.
The issue is if I use Product Tags and override a default then I think you need to also modify your Refund Item - Place Stock back into Inventory and any other rules effecting Inventory.

I will post a sample Rule & Action.

From “one of” Q’s Refund Item with Inventory Threads:


I have modified these to ADD {ITEM TAG:Warehouse} as they did not have them included…

Ok all checks out OK as all other Actions involve updating an existing Order whereas “Order Added to Ticket” is used only at Order Creation. Functions must work off save dbo.Orders Record - great.

I have removed Default Warehouse @emre and the REPORT CONSUMPTION Tag produces a record for every Warehouse? Is that by design…


[Inventory Consumptions:1,1,1,1]
{REPORT CONSUMPTION DETAILS:C.Name,C.Warehouse,C.Inventory.asc,C.InStock:C.GetPhysicalInventory() < 2}


Produces lines for all Warehouses so will need to filter out empty Default Warehouse?
It should look like this below.

Correct: (Re-entered a Default Warehouse:Pro Shop)

1 Like