What causes Inventory to disappear in EOD?


#81

Well… @pauln, @QMcKay I have to thank you for helping me to understand the issue. I’ll test it.


#82

@pauln, I am probably way off-base here because I don’t know exactly what it does behind the scenes, but have you tried “Rebuild End Of Day Records” maintenance task to see what effect that has?

@emre, please chime in if this should NOT be done!


#83

That will erase previous eod corrections. So it will probably change cost values but might be a good idea if a fresh start is needed.


#84

If that could be made possible that would surely solve the whole issue, then a stock take can be easily done after any work period anytime with a full inventory check where any errors can all be adjusted from the same screen at the same time :grinning:


#85

:slight_smile: This is what eod records intended to do from day one. However I added a mechanism to remove unnecessary items. So you won’t to see zero inventory cheese in your bar warehouse. However I need to first run all transactions to ensure there is no intentional cheese transaction on bar inventory, on second pass I’m removing zero transaction items if not mapped to warehouse. That means even you don’t map cheese to bar warehouse you can still transfer cheese to bar and see the inventory quantity there.

For a reason my code removes gin from bar inventory even it already mapped there. This is unexpected and I’ll try to find why it removes.


#86

PS: I just add you if see above SQL Management Studio image there was inventory remaining 0.84
then went to 0.0 with no consumptions.


#87

@pauln can I get the log file for the terminal that used to start/end workperiods?


#88

@emre has asked our support team to grab copies for you - hopefully not too fa away.


#89

Emre we have just been told the site has no access as there NBN is down :frowning: They have no phones, email or internet! Had to call the manager on his mobile so cannot grab the logs for now, sorry…


#90

OK. I reviewed you database and found an end of day record didn’t created for 6/8/18. This is the main reason of the issue and all inventory zeroed after that day.

To ensure creation of end of day records SambaPOS creates a database transaction and rolls it back if any kind of exception occurs while ending work period. So it should be impossible to end a work period without generating the end of day record. Also I never saw something like that reported before. If you have an idea related with that I’ll be glad to hear. That’s why I requested logs.

So we need to re-generate all end of day records to be able to fix that. Normally we have a maintenance task for that but it clears physical inventory updates. I added a new maintenance task to regenerate end of day records while preserving physical inventory updates. For next update that will appear as Fix End of Day Records on Maintenance page.


#91

So what versions will that work on? If that is an SQL script is it possible to post here as the customer now is reporting his costs are too high so we are wondering how we can fix this…

I will still try to find logs if possible.
Thanks Emre.


#92

Hi Emre and @VehbiEmiroglu

So are we supposed to use “Rebuild End of Day Records” or “Fix End of Day Records” as there will be 2 buttons?


#93

Fix end of day records


#94

What the difference, sorry can I ask?


#95

I think I explained it here


#96

Got it thanks -had to read it more closely!
After the process the numbers now look close to physical counts just taken :grinning: thank you.

I now need to work out why some cost are too high? And how to change these manually or through process…


#97

I didn’t tried it before but you can try zeroing inventory from physical inventory, create new purchase invoice and add that inventory back with desired cost amount.