Normal Topic How to edit the form that creates printed checks (Read 1340 times)
questionmarke
Member
*
Offline



Posts: 8
Joined: Feb 2nd, 2010
How to edit the form that creates printed checks
Feb 2nd, 2010 at 7:51pm
Print Post Print Post  
I've been learning bits and pieces about Sesame off and on over the past couple of years. My family runs an antique shop and uses Sesame as their point of sale software, their customer database, to print out dealer checks, etc.

When it comes to printing monthly checks one thing we have noticed is amounts with four or more digits (i.e., above $999) do not include a comma as a thousands separator, which can make the number a little difficult to read accurately. I've figured out how to adjust certain reports in a basic way but I haven't a clue where to start looking to figure out how Sesame is creating checks and even if I knew where to look I'm not sure how to adjust this particular output (the comma separator).

Any suggestions?

Thanks,
Mark
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: How to edit the form that creates printed chec
Reply #1 - Feb 2nd, 2010 at 7:53pm
Print Post Print Post  
Who built your Sesame system in the first place? When you create your checks, what exactly do you click to do it? This will help tell us how they are being created and where you should look.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
questionmarke
Member
*
Offline



Posts: 8
Joined: Feb 2nd, 2010
Re: How to edit the form that creates printed chec
Reply #2 - Feb 2nd, 2010 at 9:15pm
Print Post Print Post  
Well, we originally used Q&A 4 and a family friend put the system together. Then we switched to Sesame a few years back and Tom Marcellus transferred our system over and redesigned certain aspects to make them more logical. Most everything is working as we would like but there are a few persistent bugs we haven't had the money to pay someone like Tom to spend a lot of time investigating and troubleshooting. Thus I thought I might start reading the programming manual and digging around under the hood to see if I, along with any advice I garner on this forum, could figure a few of the bugs out. This is a small one that, ultimately, is pretty insignificant. But if we could get it working that would be nice.

As to your second question of what we do to print checks, I just reviewed that process to find out for you. Turns out the checks are not automated from our sales database, but rather set up as a sort of manually-input form, which kind of surprised me. From our main menu we open a separate database that is only used for creating checks. This gives us a form laid out a bit like an on-screen check would be. Someone enters the payee information and amount and clicks on a checkbox or two and F10s to the next blank check form. After each check has been entered this way, there is a button on our main menu which causes the checks to actually print out.

Having reviewed this process I noticed something funny. When the amount is typed into the check in the Amount field a spelled-out amount automatically gets entered into the Written Amount field and all looks correct (commas and all). However, below the blank check form are two somewhat-automated fields tied to our monthly data called Old Balance and New Balance. The New Balance field shows the check amount as a debit amount and in this field no commas are present. Why would a comma show up in the Amount field but not in the New Balance field?

There are also larger, more significant bugs with this Old Balance field I mentioned, where it zeroes out at the end of the month instead of carrying over the actual amount to the next month. This causes trouble for our bookkeeper every month who uses the monthly printout to double check our account balances. But the balance column is never correct because the column goes to $0 at the start of each month and we can't figure out why. But I think that's digging into something a lot more difficult to figure out than this comma separator issue (I suppose they are un-related).

Does that give you sufficient background info to give me advice for figuring out this particular problem?

Thanks,
Mark
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: How to edit the form that creates printed chec
Reply #3 - Feb 3rd, 2010 at 2:12pm
Print Post Print Post  
questionmarke wrote on Feb 2nd, 2010 at 9:15pm:
Does that give you sufficient background info to give me advice for figuring out this particular problem?

Yep.  Smiley

To fix this, you'll need to change the programming behind that button. Have you ever used SDesigner to make changes to your application?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
questionmarke
Member
*
Offline



Posts: 8
Joined: Feb 2nd, 2010
Re: How to edit the form that creates printed chec
Reply #4 - Feb 3rd, 2010 at 5:28pm
Print Post Print Post  
Yes. I've created a few basic databases with it, edited some reports, changed some forms and so on. At the moment my main limitation is understanding all the programming codes: what they are, what they do, what can be done, what can't, etc.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: How to edit the form that creates printed chec
Reply #5 - Feb 3rd, 2010 at 5:59pm
Print Post Print Post  
questionmarke wrote on Feb 3rd, 2010 at 5:28pm:
Yes. I've created a few basic databases with it, edited some reports, changed some forms and so on. At the moment my main limitation is understanding all the programming codes: what they are, what they do, what can be done, what can't, etc.


OK. go into SDesigner and find the code for the On Element Entry event of the button. Paste it here.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
questionmarke
Member
*
Offline



Posts: 8
Joined: Feb 2nd, 2010
Re: How to edit the form that creates printed chec
Reply #6 - Feb 3rd, 2010 at 6:14pm
Print Post Print Post  
var vRSID as Int
var vRecs as Int
var vNextCheck as String
var n as Int

Subroutine PRINTCHECKS()

var i as Int
var vFont as String = "Courier New"
var vSize as Int = 16

For i = 1 to vRecs Step 3

XResultSetCurrentPosition(vRSID, i)

NewPage(850, 1100)

If i <= vRecs
{
PrintString(@Decimals(@XResultSetValue(vRSID, "Check#"), 0), 725, 50, 0, "B" + vFont, vSize, 0)
PrintString(@AsFormattedByLE(Today, 0,@XResultSetValue(vRSID, "CheckDate")), 630, 85, 0, vFont, vSize, 0)
PrintString("$ " + @Decimals(@XResultSetValue(vRSID, "Amount"), 2), 700, 125, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "Order Of"), 125, 140, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "F0007"), 40, 175, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "Memo"), 80, 260, 0, vFont, vSize - 3, 0)
PrintString(@XResultSetValue(vRSID, "Blank"), 80, 280, 0, vFont, vSize - 3, 0)
}

If i + 1 <= vRecs
{
XResultSetCurrentPosition(vRSID, i + 1)

PrintString(@Decimals(@XResultSetValue(vRSID, "Check#"), 0), 725, 380, 0, "B" + vFont, vSize, 0)
PrintString(@AsFormattedByLE(Today, 0,@XResultSetValue(vRSID, "CheckDate")), 630, 425, 0, vFont, vSize, 0)
PrintString("$ " + @Decimals(@XResultSetValue(vRSID, "Amount"), 2), 700, 475, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "Order Of"), 125, 490, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "F0007"), 40, 525, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "Memo"), 80, 610, 0, vFont, vSize - 3, 0)
PrintString(@XResultSetValue(vRSID, "Blank"), 80, 630, 0, vFont, vSize - 3, 0)
}

If i + 2 <= vRecs
{
XResultSetCurrentPosition(vRSID, i + 2)

PrintString(@Decimals(@XResultSetValue(vRSID, "Check#"), 0), 725, 735, 0, "B" + vFont, vSize, 0)
PrintString(@AsFormattedByLE(Today, 0,@XResultSetValue(vRSID, "CheckDate")), 630, 780, 0, vFont, vSize, 0)
PrintString("$ " + @Decimals(@XResultSetValue(vRSID, "Amount"), 2), 700, 825, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "Order Of"), 125, 840, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "F0007"), 40, 875, 0, vFont, vSize, 0)
PrintString(@XResultSetValue(vRSID, "Memo"), 80, 955, 0, vFont, vSize - 3, 0)
PrintString(@XResultSetValue(vRSID, "Blank"), 80, 975, 0, vFont, vSize - 3, 0)
}

FinishPage()

Next

End Subroutine

// Begin main program

vRSID = @XResultSetSearch(@FN, "CK-DEAL", 0, 2, "!Print Check=Y", "!Amount=/=")

XResultSetSort(vRSID, "Check#:-1")

vRecs = @XResultSetTotal(vRSID)

If vRecs > 0
{
WriteLn("The following " + vRecs + " checks are marked 'Y' for printing:")
WriteLn("------------------------------------------------------")
WriteLn("")

For n = 1 to vRecs

XResultSetCurrentPosition(vRSID, n)

vNextCheck = "Check#: " + @Decimals(@XResultSetValue(vRSID, "Check#"), 0) + @NL() +
            "Date:   " + @AsFormattedByLE(Today, 0,@XResultSetValue(vRSID, "CheckDate")) + @NL() +
            "Amount: " + "$ " + @Decimals(@XResultSetValue(vRSID, "Amount"), 2) + @NL() +
            "Payee:  " + @XResultSetValue(vRSID, "Order Of") + @NL() +
            "Memo:   " + @XResultSetValue(vRSID, "Memo") + @NL() +
            "Memo2:  " + @XResultSetValue(vRSID, "Blank") + @NL()

WriteLn(vNextCheck)
Next

If @Askuser(vRecs + " check(s) to print...","","Do you want to continue?")
{
PRINTCHECKS()

If @Askuser("Did all the checks print OK?","","(Answer 'YES' to mark them as printed)")
{
For n = 1 to vRecs
     XResultSetCurrentPosition(vRSID, n)
     XResultSetValue(vRSID, "Print Check", "N")
Next

@Msgbox("The " + vRecs + " checks have been marked as printed.","","")

}
Else
{
@Msgbox("Edit the pertinent check records as necessary,","then return here and reprint those still marked with a 'Y'","")
}


}
}
Else
{
@Msgbox("No checks marked 'Y' for printing found.","","")
}

XResultSetClose(vRSID)

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: How to edit the form that creates printed chec
Reply #7 - Feb 3rd, 2010 at 9:24pm
Print Post Print Post  
OK, good. Now, is there an element on your form that displays the Amount the way you want to have it printed? If so, tell me its Name.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
questionmarke
Member
*
Offline



Posts: 8
Joined: Feb 2nd, 2010
Re: How to edit the form that creates printed chec
Reply #8 - Feb 3rd, 2010 at 10:19pm
Print Post Print Post  
Yes, the "Amount" element always displays correctly.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: How to edit the form that creates printed chec
Reply #9 - Feb 4th, 2010 at 6:03pm
Print Post Print Post  
questionmarke wrote on Feb 3rd, 2010 at 10:19pm:
Yes, the "Amount" element always displays correctly.


Good. Now, look at the code you posted. Do you see the use of a function called @AsFormattedByLE? That function formats a value just as it would be displayed on the form. So, find the lines where Amount is being used and change them to use @AsFormattedByLE.

So this:
PrintString("$ " + @Decimals(@XResultSetValue(vRSID, "Amount"), 2), 700, 125, 0, vFont, vSize, 0)

Would become this:
PrintString(@AsFormattedByLE(Amount, 0, @XResultSetValue(vRSID, "Amount")), 700, 125, 0, vFont, vSize, 0)
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged