Application crashes Inventory

Hi Emre today I have tried to insert some items in Inventory …Receipts …try some transactions example…and after a few test I have received the following crash messages when a entry in the Warehouse screen.

I have followed the example in your tutorial about include the Harburger …and follow the recepit …inventory. This tutorial works fine but then I start to include my test items and the result after a few test was the Crash…

All now works fine but there are problems with the Inventory part …


[General Info]

Application: SambaPOS
Version: 4.1.11 BETA
Region: en
DB: SQ
Machine: OSPITE-HP
User: Furbetta74
Date: 1/19/2014
Time: 4:23 PM

User Explanation:

Furbetta74 said “”

[Exception Info 1]

Top-level Exception
Type: System.Exception
Message: Inventory calculation generated an error. Check your recipes.
Source:


[Exception Info 2]

Top-level Exception
Type: System.InvalidOperationException
Message: Sequence contains more than one element
Source: System.Core
Stack Trace: at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable1 source) at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__2[TResult](IEnumerable1 sequence)
at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable1 query, Expression queryRoot) at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression) at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable1 source, Expression1 predicate) at Samba.Infrastructure.Data.SQL.ReadOnlyEFWorkspace.Single[T](Expression1 predictate, Expression1[] includes) at Samba.Persistance.Data.Dao.Single[T](Expression1 predictate, Expression`1[] includes)
at Samba.Persistance.Implementations.InventoryDao.GetPeriodicConsumptionByWorkPeriodId(Int32 workPeriodId)
at Samba.Presentation.Services.Implementations.InventoryModule.ConsumptionBuilder…ctor(ICacheService cacheService, IInventoryDao inventoryDao, IApplicationState applicationState)
at Samba.Presentation.Services.Implementations.InventoryModule.InventoryService.GetCurrentWarehouseConsumptionFor(Int32 warehouseId)
at Samba.Modules.InventoryModule.WarehouseInventoryViewModel.UpdateSelectedWarehouse(Int32 warehouseId)
at Samba.Modules.InventoryModule.WarehouseInventoryViewModel.Refresh(Int32 warehouseId)
at Samba.Modules.InventoryModule.InventoryModule.OnNavigate(String obj)


[Assembly Info]

Samba.Services, Version=1.0.0.0
mscorlib, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
System, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
FluentValidation, Version=3.4.0.0
Samba.Domain, Version=1.0.0.0
DevExpress.Xpf.Grid.v13.2, Version=13.2.5.0
Stateless, Version=1.0.0.0
System.Core, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
System.Windows.Forms, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Localization, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0
DevExpress.Xpf.Grid.v13.2.Core, Version=13.2.5.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
DevExpress.Xpf.Core.v13.2, Version=13.2.5.0
PropertyTools, Version=2012.4.14.1


[System Info]

Operating System
-Microsoft Windows 7 Professional
–CodeSet = 1252
–CSDVersion = Service Pack 1
–CurrentTimeZone = 60
–FreePhysicalMemory = 1278836
–OSArchitecture = 32 bit
–OSLanguage = 1040
–ServicePackMajorVersion = 1
–ServicePackMinorVersion = 0
–Version = 6.1.7601

Machine
-OSPITE-HP
–Manufacturer = Hewlett-Packard
–Model = HP ProBook 6560b
–TotalPhysicalMemory = 3160784896
–UserName = OSPITE-HP\Furbetta74


Latest release of SambaPos installed…

Thank’s

Bye

Maurizio

can you send a backup of your database to emre@sambapos.com ?

Hi Eme i have sended to you the bak file

Thank’s

maurizio

Thank you for the backup but I couldn’t find the error since database does not contains any recipes or inventory items.

I know Emre

I have tested just now the END DAY OF RECORD and it works fine now… I don’t know what’s happen…

In your opinion and experience it it possible to use Samba POS 4 to track inventory or for now is early with this revision? The best in our restaurant will be to track the inventory immediately after food selling.

I will test and I will inform you …

Thank’s a lot

Bye

Maurizio

You have nothing to do with end of day records. That autogenerates on each work period end. Before starting work period you can edit latest one to update physical inventory numbers.

Hi Emre ok so I understand that I can’t check Inventory —> End Day of report.

  1. The work period is from 7 AM to 12 PM. How can I check the state of Inventory at 7 PM ? This will be a great thing…

  2. I follow your tutorial that was for Samba POS 2.95: Tracking Inventory and Cost. Does it work with 4.1.11?

For example I want to track the sell of Wines…for example Barbera wine that are in bottle of 750 ml.
The operation to do:
2.1 Insert in Products —>Product List : Barbera 750 ml
2.2 Include in Inventory Items: Barbera 750 ml and use Base Unit:Bottle Transaction Unit:Botte Trasaction Unit Multiplier: 1
2.3 Add in the Recipe: Recipe Name:Barbera 750 ml --Product: Barbera 750 ml (insert at Point 2.1) …> Add Inventory -->Barbera 750 ml with quantity=1
2.4 Add a transaction Document in which I insert in the inventory for example 10 Barbera’s Bottle at a specific cost.
2.5 From now I can check the inventory…

The connection from Inventory and Product is in the Recipe Form… is it ok?

Does this process work fine?

Thank’s for now…

Maurizio

You can check inventory anytime by clicking Warehouses Navigation button.

Hi Emre is it possible to have a brief tutorial about using Inventory…Products …in v.4.1.11 . I have a lot of problems and sometimes the system crashes.

I work in this way. I have done a new Product —> Wines
I have addes Wines to Beverages (auto select)

Then I have added in Order Tags --> White Wine
In White Wine —>Order Tag List —> W.W.Sauvignon Sendero 750 ml with the price.
Mappings-----> * * * Procuct Group --> Beverages Product —>Wines

At this point I test doing a new Order and all works OK except that when I print the Bill let’s appeas:

1 Wines 0.00
*W.W.Sauvignon Sendero 750 ml 50.00

Is it possible to delete 0.00? I have tried in all the way but I can’t do it. I have tried to Add Tag Price to Order Price in White Wine ’ Order Tag but in this case in the Order works in the right way but when I try to print the bill it appeasr the following:
1 Wines 0.00
*W.W.Sauvignon Sendero 750 ml

So this is the first problem.

The second problem is using the Inventory.
I want to track the sell of W.W.Sauvignon Sendero 750.

So I Add in the Product —> Product List —>W.W.Sauvignon Sendero 750
Group Code --> Beverages
Add Portion–> Normal 1 0

Then Inventory —> Inventory Items —> Add Inventory Items --> W.W.Sauvignon Sendero 750
Warehouse --> Local Warehouse
Base Unit: Bottle
Transaction Unit: Bottle
Transaction Unit Multiplier:1

Then Recipe --> Add Recipe: W.W, Sauvignon Sendero 750 ml
Product --> I choose that in Product List (W.W.Sauvignon Sendero 750)
Portion : Normal
Add Inventory: I choose that in Inventory List (W.W.Sauvignon Sendero 750)
Quantity:1 Unit: Bottle

Now I put a Transaction Document
Transaction Document -->Add Transaction Document
Transaction–>Purchase Transaction Type
Target: Local Warehouse
Inventory Item Name:I choose that in Inventory List (W.W.Sauvignon Sendero 750)
Quantity:10
Price:15
and the total will update to 150.
SAVE and Appears my Transaction Document.

Now Main Menu: Warehouse and I see my product in the inventory

Now I sell 3 bottle of (W.W.Sauvignon Sendero 750). I close the End of Period. The system generates an End of Day Record:
I find in my Inventory Purchase 10 Inventory Predicyion 10

So I have sell three bottles and the Inventory doesn’t decrease.

I use Order Tags in the Beverages because I have a lot of Beverages and I’d like to build the screen with Beverage —>Wine-Coctail …and so on and the with the Order Tag open new choice.

Thank’s a lot for now.

Maurizio

hello @panda1269. At the end you’ll see It is simpler than it appears :slight_smile:

Your inventory does not decrease because order tag products needs a parent recipe. I think you don’t have a recipe for base product, so inventory doesn’t change.

Your real problem is misusing order tags. Order tags feature is useful for product modifiers but W.W.Sauvignon Sendero 750 ml is not a modifier of Wine product. I think you are trying to simulate sub menus but we already have this feature. This is a really old article but still works. Check Sub Menus paragraph. http://v2.sambapos.org/en/content/sambapos-252-test-release

Hi Emre
now I’m using the Sub Menus and all works fine.

Now I start to track one product and the Inventory.
Audigier 750 ml

Inventory --> Inventory Items -->Add
Inventory Item Name:Audigier 750 ml
Warehouse : Brydens
Base Unit:Bottle
Transaction Unit: Bottle
Transaction Unit Multiplier:1

Then:
Inventory Receipe–>Add Recipes
Recipe Name: Audigier 750 ml
Product: Audigier 750 ml
Portion: Normal
Add Inventory:Inventory Item Name: Audigier 750 ml Quantity :1 Bottle

Then I add the first Transaction Document and I have bought 10 bottle from Brydens at a specific price.

The i simulate a sell of Audigier 750 ml.

I close the work period --> I find in Brydens Warehouse 10 Bottle. I found in Local Warehouse that tha I’ve selled.

Then I try to make another Transaction -->to buy 10 Audigier 750 Bottle but the database seems to be blocked. I can’t save the document. I have tried to close Samba POS and re open it but now the database doesn’t 'work fine.

What can I do?

Thank’s

Bye

Maurizio

If you didn’t do so start work period.

I have started the work period and the inventory is working now …I will go on with all then test and I will inform you.

Thank’s a lot

Bye

Maurizio

App crashed when barcode added. Any idea guys?
Cant search for items in the pos screen after adding a barcode.

User said “”

[Exception Info 1]

Top-level Exception
Type: System.IndexOutOfRangeException
Message: Index was outside the bounds of the array.
Source: Samba.Modules.PosModule
Stack Trace: at Samba.Modules.PosModule.MenuItemSelectorViewModel.FilterMenuItems(String numeratorValue)
at Samba.Modules.PosModule.MenuItemSelectorViewModel.set_NumeratorValue(String value)
at Samba.Modules.PosModule.MenuItemSelectorViewModel.OnTypeValueExecute(String obj)
at Samba.Modules.PosModule.PosViewModel.HandleTextInput(String text)
at Samba.Modules.PosModule.PosView.UserControl_PreviewTextInput(Object sender, TextCompositionEventArgs e)
at System.Windows.Input.TextCompositionEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)