SambaPOS 4.1.73 Released

Hmm maybe I did something wrong because when I checked it… and then went back in it was unchecked.

On first run as Admin after installation, none of the new fields were visible in the application. I had to exit and restart SambaPOS before I could see them.

Ok it worked. I had to close the Inventory Tab completely for it to show as saved. I feel inventory is much better now. Great solution @emre

@emre does this look correct? Is this how this is supposed to be used? Or is the ParentUnit always supposed to be the “larger” unit?

I like the display in SambaPOS, but the columns in the DB are confusing me a bit. For example:

Why is the [ParentUnitName] for Tray stored as NULL, but displayed as Piece?
Why is the [Multiplier] for Case stored as 48, but displayed as 6?

Just trying to understand what is happening here, and if it is by design, or a glitch…

Only Multipler and Name columns are real data here. Case unit contains 48 Pieces. This is what we need to know for transactions. ParentXXX columns are there just for displaying purposes. NULL means no parent configured and displays base unit. As case contains 6 Trays (I hope so) it displays 6. Does it make a calculation error there?

Parent unit always supposed to be the smaller unit but as we store multipliers as primary unit we make a division there. We store it as 1 Case contains 48 pieces but display it as 1 Case contains 48/8 pieces (6 Trays).


Thank you very much for all discussions you made here because the source of the inspiration is just the community activity here. I know it was not exactly you’ve requested and it will force you to change your current implementation however sometimes this is really needed. Changing it once is always better than changing it everyday :slight_smile:

2 Likes

No error; the calculation is correct. 1 Case is 6 Trays with 8 Pieces per tray = 48 Pieces per Case.

I was just trying to understand the implementation regarding data Stored in the DB vs data Displayed.

Curious to know why you choose to store it as NULL instead of storing it as Piece, since the Display shows Piece.

You’re welcome. The extra Unit configuration is fantastic!

2 Likes

I guess I need to be careful what I ask for, since this feature makes my PHP implementation infinitely more complex because there is no set limit to the number of Units. :stuck_out_tongue_winking_eye:

I have been pondering the approach I should take in regard to the Queries or PHP code to support this, and I’m not sure which way to go.

On one hand, I could use SQL PIVOT to turn the row data into columns for the Item, or use STUFF with FOR XML to render a single delimited column. The issue with this approach is that some or all of these functions may not be available in CE (PIVOT for sure isn’t available in CE), but I also ask the question: do we care? Shouldn’t everyone be using SQL Express over CE anyway?

On the other hand, I could forgo SQL transformation and perform the pivot in PHP code instead, which would alleviate any issues with differing DB Engines.

Any thoughts?

I really think everyone should be using SQL Express over CE. The program itself now installs Local DB instance of SQL Express 2012 it does not use CE unless specified. So the argument that SQL Express is too difficult to understand is really non issue unless your stubborn and want to learn it which really is not a bad thing.

With how much more complex and full featured SambaPOS is becoming and with the increase in feature requests lately we really should steer people to one main install platform which should be SQL Express. Whether its Local DB 2012 or your own install of SQL Express 2012 or 2014 or any latest version.

This is all just my opinion but honestly I think it would alleviate more issues in future and it would create a more consistent platform to provide help for.

I see your point here but on the other hand it may create more work for you with your implementation but the end result will be better when finished.

Its kind of like the inventory discussion. I have had mine working just fine all this time. What @emre did really did not change how mine worked it just made it more complex for me to setup. However it is better and should be setup like that. In all honesty its working the same the actual data that means anything is still the same its still basically using multiplier of 1. But his changes clarified it and it makes more sense now expecially on reports. So in summary I see your point and I feel you but it is all for better good :stuck_out_tongue:

3 Likes

For sure the feature is great - I love it, and I’m not complaining at all. The implementation details will be more complex since it will need to be dynamic, though nothing I haven’t done before. I agree with you fully: it is all for better good, and it is nice to see that we are not restricted to 2 or 3 or 4 Units; we have freedom with X Units!

Yes, Finally I got it working the way I wanted. The last changes where a great feature and in my case Inventory started working the way I wnated.

thanks!!!

G.

2 Likes

Decided to use PHP code rather than SQL PIVOT. Pretty simple really.

  • Inventory Item Croissant has no TransactionUnit so it is skipped, but displays Base and 2 Additional Units
  • the Quantities are not properly calculated yet; I will work on that next
  • so much for having a consistent layout; need to think about that a bit more, any thoughts?

1 Like

Everybody says fine but I feel something weird here lol.

@QMcKay I don’t know if displaying all units have a specific benefit but maybe you can display single unit there and display others when clicked/howered on it.

what?

where?

who?

G.

I don’t understand what you mean. Really, really, really, the Additional Units is fantastic - I mean that! It got even better when you added Parent Unit and Parent Multiplier, because that overcomes the need for Quantity fields that I originally requested; in fact, it’s better - it’s more flexible! I knew you would come up with the best solution!

For the sake of completeness - it’s the way I am I guess. I too considered showing them as Tooltips, or dropboxes, etc. But it is nice to be able to see everything without touching, hovering, pointing.

I agree its better and most importantly you helped @gerlandog finally see it :slight_smile:

:blush:

is there any icon for PPPPPPPPRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR (open mouth, tongue out and making PPPPPPPPPPPPPPPRRRRRRRRRRRRR noise)

1 Like

Are you up to the same as yesterday already @gerlandog?

yeap!!!

Thanks!!

G.

1 Like

Maybe you should display the Unit based on Current Warehouse viewing? I am assuming you keep Trays in specific warehouse and keep base unit at restaurant? and Purchase in Case? But this may require you to do even more extensive rewrite lol.

Careful @gerlandog my daughter bites.

2 Likes