End of day reconciliation

Hi QMcKay, what you have there is along the same lines of what I would like, I have not seen @RickH version yet.
I have attached an image of what we use at night to give you a better idea. We count our cash drawer first and leave €200 for the next day which is always our float. Then we count what is left over in cash and add our credit card total to get a combined total. We then get our Samba report and write the total ticket sales in per category - drink, coffee,food , then minus expenses (taken from expenses section), then minus OR’s (Over Registers - mistakes if they haven’t been fixed). This gives our net sales, we then +/- our cash to give a +/- difference figure (basically the amount the drawer is under or over by).

It would be really nice if this could all be done within Samba V5 but I’m afraid I am not anywhere as proficient as some on this forum so its paper for now :smile:

##Widgets


##Cashout Count Report

[Cashout Report:1, 1, 1, 1, 1]
>>Tender|Count|(-Float)|Account|+/-
Cash|[=F(TN('{SETTING:USDcountTotal}'),'0.00')]|[=F(TN('{SETTING:USDcountTotal}')-TN('{SETTING:USDfloat}'),'0.00')]|[=F(TN('{ACCOUNT TOTAL:Cash}'),'0.00')]|[=F(TN('{SETTING:USDcountTotal}')-TN('{SETTING:USDfloat}')-TN('{ACCOUNT TOTAL:Cash}'),'0.00')]
CC|[=F(TN('{SETTING:CCUSDcountTotal}'),'0.00')]|-|[=F(TN('{ACCOUNT TOTAL:Credit Card}'),'0.00')]|[=F(TN('{SETTING:CCUSDcountTotal}')-TN('{ACCOUNT TOTAL:Credit Card}'),'0.00')]

>>TOTALS|Count|(-Float)|Account|+/-
Cash + CC|[=F(TN('{SETTING:CCUSDcountTotal}')+TN('{SETTING:USDcountTotal}'),'0.00')]|[=F( TN('{SETTING:USDcountTotal}')-TN('{SETTING:USDfloat}') + TN('{SETTING:CCUSDcountTotal}'),'0.00')]|[=F(TN('{ACCOUNT TOTAL:Cash}')+TN('{ACCOUNT TOTAL:Credit Card}'),'0.00')]|[=F(TN('{SETTING:USDcountTotal}')-TN('{SETTING:USDfloat}') + TN('{SETTING:CCUSDcountTotal}') - (TN('{ACCOUNT TOTAL:Cash}')+TN('{ACCOUNT TOTAL:Credit Card}'),'0.00')]

##Label Widget Text

<font Consolas><size 12>

x 100 = {CALL:str.pad('{SETTING:USDcount100}','left',5," ")}

x  50 = {CALL:str.pad('{SETTING:USDcount50}','left',5," ")}

x  20 = {CALL:str.pad('{SETTING:USDcount20}','left',5," ")}

x  10 = {CALL:str.pad('{SETTING:USDcount10}','left',5," ")}

x   5 = {CALL:str.pad('{SETTING:USDcount5}','left',5," ")}

x   1 = {CALL:str.pad('{SETTING:USDcount1}','left',5," ")}
-------------
        {CALL:str.pad('{SETTING:USDcountTotal}','left',5," ")}
      - {CALL:str.pad('{SETTING:USDfloat}','left',5," ")}
-------------
        {CALL:str.pad('{SETTING:USDbalance}','left',5," ")}</size></font>

##Automation Command Button Widget Caption

<font Consolas><block 0,0,0,0 #333333 right 30>USD:</block><block 0,0,0,0 #222222 right 80>[=F(TN('{SETTING:USDfloat}'),'0.00')]</block></font>

##JScript

Name:StringFunctions
Handler: str

function pad(s,d,l,c) {

  // s : input string
  // d : direction - left or right pad
  // l : length of output string
  // c : pad character (0," ")
  
  // ensure the input is a string, not a number
  s = ''+s+'';
  
  var outstring = "";
  var padding = "";
  
  // build string padding
  padding=Array(l+1).join(c);
  
  // pad the input right or left
  if (d=='right') {
    outstring = (s+padding).substring(0,padding.length);
  } else {
    outstring = (padding+s).slice(0-padding.length);
  }
  return outstring;
}

##Actions

###Update Program Setting

###Execute Automation Command


##Rules

###CO Set USD Count

Name: CO Set USD Count
Event: Automation Command Executed
Constraints:
Execute Rule if Matches
Automation Command Name Contains CO Set USD Count

CO Set Count Value
CountName: [='USDcount' + TN('[:AutomationCommandName]'.substr(17,3))]
Count: [=[:CommandValue] * TN('[:AutomationCommandName]'.substr(17,3))]

CO Set Count Value
CountName: USDcountTotal
Count: [=TN('{SETTING:USDcount500}')+TN('{SETTING:USDcount100}')+TN('{SETTING:USDcount50}')+TN('{SETTING:USDcount20}')+TN('{SETTING:USDcount10}')+TN('{SETTING:USDcount5}')+TN('{SETTING:USDcount1}')]

CO Set Count Value
CountName: USDbalance
Count: [=TN('{SETTING:USDcountTotal}')-TN('{SETTING:USDfloat}')]


###CO Set Float Value

Name: CO Set Float Value
Event: Automation Command Executed
Constraints:
Execute Rule if Matches
Automation Command Name Equals CO Set Float Value

CO Set Float Value
FloatName: [:CommandValue]float
Amount: [?Enter Float value for USD;;200;OCN]

CO Set Count Value
CountName: [:CommandValue]balance
Count: [=TN('{SETTING:[:CommandValue]countTotal}')-TN('{SETTING:[:CommandValue]float}')]

4 Likes

Thanks so much for this, it will take me some time to understand and implement but I will give it a bash. If I come up with any result or adaptation I will be sure to share it. If anyone else out there wants to lend a hand or give advice it would be much appreciated also. Thanks

The tedious part is all the Editor Widgets, because you need to set them 1-by-1 to call the same Automation Command using the denomination suffix. The Rule handles setting Program Settings based on the suffix (1, 5, 10, 20, 50, 100, etc)

Well, that and all the alignment and sizing, etc…

That is the basics of the setup. There is another panel for Credit Card. It uses the same methodology to parse the card type. And for me, I do that twice because of dual-currency (4 panels with ~6 editors each).

The Report is fairly simply, as is the Automation (I tried to parameterize it so I didn’t need a whole pile of Actions and Rules).

I don’t mind the tedious work as it should be worth it in the end. I am going to show it to a programmer friend, who owes me a favour or two, as I would like to make the accounting part matter. For this I would have to send the total cash and credit cards to a lodgement account, then the expenses would have to go to an expense (petty cash) account. The more I think about it though, I think the expense input and mistakes (OR’s) should all be done before cashout but still feature on the report.
I need to scratch my head on this for a while and my brain gets a bit fuzzy at this time of night! Thanks again for the advice.

2 Likes

How do i add the widgets to my SambaPOS?

Did you manage to get this working?

Presumably you mean entity screen widgets?
You need entity screen to be set to custom or layout mode in screen options then on screen right click and select edit then again and add widget. Then save afterwards.

1 Like

First you create an entity screen and set it to custom or layout mode. Then navigate to that screen and right click it and choose Design Mode. Then you can right click and add widget.

2 Likes

Thank you, let me try that. I want to try and add something like this

DB Tools import file for that system here:

You still need to know how to edit the Screen to remove or add Widgets, so do that as @Jesse has instructed.

2 Likes

Thanks a lot, let me try that now.

It worked, there is only one error showing when i try to view the CASHOUT REPORT.

It’s showing me this error

That is a Table that I added to the Database which stores historical records for the Cashout.

You can create that table using SSMS by running the following script:

create_CASHOUT.sql

USE [SambaPOS5]
GO

/****** Object:  Table [dbo].[CASHOUT]    Script Date: 2018-01-24 07:40:23 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[CASHOUT](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[WPID] [int] NULL,
	[F1] [varchar](255) NULL,
	[F2] [varchar](255) NULL,
	[Count] [money] NULL,
	[Float] [money] NULL,
	[Balance] [money] NULL,
	[Account] [money] NULL,
	[+/-] [money] NULL,
 CONSTRAINT [PK_dbo.CASHOUT] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
1 Like

hi guys any one can share the steps to do this ?

hi there i am trying to do this is there any way maybe you can assist i need this for multi currency

Unfortunately, QMcKay is no longer with us.

Have you tried the link QMckay posted earlier in this thread?

jah i did and was not really working end report was not working i need to try and learn because i have multi currency also

If you could be more specific of your problem, that would increase the likelihood of getting an answer.

Just by saying “end report was not working”, is not much information for readers to go on to answer your question.

Here is some tips:

  • Mention your goal and add as much information as possible for use to understand what you want to accomplish.
  • If you did a tutorial or imported an import file, mention that in your posting. It is also helpful to provide the link.
  • If you changed something and it is not working, mention what you changed. Show screen shots or paste your code into your post. Again provide as much information as possible.

You have to understand that we do not know your situation, it may seem obvious to you but it is not obvious to us. If a reader reads a post that says “it’s not working”, they are not likely to respond. But if they read a post with the specific problem they understand, it increases the likelihood of them responding that faced a similar situation.

Also, do not post multiple topics of the same problem. This forum does a great job of knowing what posts have been read and which one has not been read.

that setup is something i need but as i mentioned i am new so
i cannot really change the currency , i need to add some more nominees so that’s where i am stuck at the moment