in RMS, automated e-mail at the closing with closing amounts
Nov 24, 2006 1 Replies
T
taze
RMS should send an e-mail to me at the closing everyday. So I know the amount we closed with. Monthly, weekly totals would be great too
---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane.
formatting link
Didn't find your answer? Ask the community — no account required.
J
Jason
You can come up with a creative solution using some third party software, the DOS command line (batch file) and the Windows Task Scheduler.
First, create a .bat file somewhere on your computer (I recommend C:\) with the following line in it (replace "servername", "databasename" and the "username" and "password" as required):
osql -S servername -d databasename -U username -P password -Q "SELECT year(ClosingTime) AS 'Year', month(ClosingTime) AS 'Month', day(ClosingTime) AS 'Day', Sales FROM Batch WHERE (year(ClosingTime)=year(getdate())) AND (month(ClosingTime)=month(getdate())) AND (day(ClosingTime)Úy(getdate())-1) ORDER BY day(ClosingTime)" -o "C:\sales.txt"
Then, use the Windows Task Scheduler to run the .bat file shortly after closing each day. It will create a file called C:\sales.txt with the sales from the day's closed batches.
Now you have to find a way to email it to yourself. There are a host of automated email programs out there. My favorite is to use the command line emailer called Blat. It lets you send an email using the contents of a file as the message body. You should install the program in C:\ and add the following lines to your .bat file (changing the variables as required):
Of course, this can be adapted to get any SQL retrievable information from the database. If you have multiple registers, I am sure you will need to add a SUM function the the SQL query, otherwise you will get a seperate batch sales total from each register. Maybe some SQL experts out there can give us the statements for daily, monthly, and yearly store totals in a simple and easy format...
Good luck!
formatting link
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.