Author Topic: Current Logged in User Name on receipts  (Read 19594 times)

lemmings

  • Full Member
  • ***
  • Posts: 165
Current Logged in User Name on receipts
« on: June 16, 2013, 06:31:35 pm »
Is there anyway that the currently logged in user name can be displayed on the receipt and bills.

We are having some issues with staff (the cash drawer being incorrect at the end of the day and of course they all deny any wrong doing) and would like to be able to print the currently logged in staff number at the bottom of the bill and the receipt.

This will tell us exactly what user was in the payment screen when taking the monies from the customer.

I have found the print template tag {USER NAME} but this displays the user that was logged in at the time of creating the ticket so not exactly what I need.

I don't mind adding some code but having started searching through the code I cannot find a reference for the currently logged in user and not sure (yet) how to add this to a printer template.

Before I start coding (for days) just want to make sure there is not a standard setting for this.  Thanks

lemmings

  • Full Member
  • ***
  • Posts: 165
Re: Current Logged in User Name on receipts
« Reply #1 on: June 18, 2013, 03:55:28 pm »
Having reviewed the code, the printer template tag {USER NAME} only finds the name of the user who created the ticket in question.

I managed to edit the code, so now I have three printer template tags including {USER PAID} - user who logged on when taking current payment, and {USER LOGGEDON} - user who is currently logged on when printing any template.

So now I can track who printed the bill, who took the money and the dates and times by printing this information at the bottom of the printouts

kylemclean

  • Newbie
  • *
  • Posts: 12
Re: Current Logged in User Name on receipts
« Reply #2 on: August 26, 2013, 07:23:34 am »
Hi lemmings

How did you manage to overcome this problem?

Thanks,
Kyle

lemmings

  • Full Member
  • ***
  • Posts: 165
Re: Current Logged in User Name on receipts
« Reply #3 on: August 27, 2013, 01:04:18 am »
I had to edit the code for V2 of Sambapos.  I raised it is an enhancement for V3.

The user who takes payment is stored in the SQL table so I just created 2 new printer template variables, one for the user who took payment and one for the currently logged on user.

If your comfortable using Visual Studio I can list the edits or alternatively i can provide the revised build which you can replace with your existing.

I dont think Emre is making edits to V2 to make it an official change as he is concentrating on V3.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Current Logged in User Name on receipts
« Reply #4 on: August 27, 2013, 03:02:12 am »
lemmings sorry I couldn't find the issue but it is possible on V3 by using {SETTING:CURRENTUSER} printing tag.

kylemclean

  • Newbie
  • *
  • Posts: 12
Re: Current Logged in User Name on receipts
« Reply #5 on: August 27, 2013, 04:10:21 am »
Hi emre

How can this be set up in V3? I've added the printing tag. Must an action be set up for "Update Program Setting"?

Thanks,
Kyle

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Current Logged in User Name on receipts
« Reply #6 on: August 27, 2013, 11:13:23 am »
Let me know if not works. it should be set automatically.

kylemclean

  • Newbie
  • *
  • Posts: 12
Re: Current Logged in User Name on receipts
« Reply #7 on: August 27, 2013, 04:08:12 pm »
Thanks emre. Works perfectly.

Buscad0r

  • Newbie
  • *
  • Posts: 12
Re: Current Logged in User Name on receipts
« Reply #8 on: August 27, 2013, 11:11:03 pm »
Hello lemmings,
I read the changes you made to the code and get the tags to print the current logged and user name.
Can you please send me your revised build which i can replace the mine.

Thanks

lemmings

  • Full Member
  • ***
  • Posts: 165
Re: Current Logged in User Name on receipts
« Reply #9 on: August 28, 2013, 04:43:35 pm »
Hi

I can send the revised DLL modules to replace the current ones but I only changed the UK-English wording and did not translate it to any other languages.

Do you need another language ?

Buscad0r

  • Newbie
  • *
  • Posts: 12
Re: Current Logged in User Name on receipts
« Reply #10 on: August 30, 2013, 12:47:26 pm »
Hi
thanks for your prompt response,
I live at Monterrey, Mexico.
I use sambaPOS with the spanish translation.

nasbtv

  • Newbie
  • *
  • Posts: 4
Re: Current Logged in User Name on receipts
« Reply #11 on: September 12, 2013, 05:43:20 am »
Hi

I want to know, Is it leagal to make changes in code and using that build? As i understand as per GPL we must make our code available. Am i wrong?


lemmings

  • Full Member
  • ***
  • Posts: 165
Re: Current Logged in User Name on receipts
« Reply #12 on: September 12, 2013, 06:41:37 am »
Hi nasbtv

A GPL licence allows anyone to edit and distribute code, it just cannot be distributed sold or rebranded by yourself.

You could think about using V3 it is quite stable now and I have not had any issues recently.  I currently run both V2 and V3 on same PC.  V3 has been amended to work with user names on receipts.