borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Printing in different language in dos mode with VB)Next Topic (Creating small Word doc files in VB) New Topic New Poll Post Reply
AndreaVB Forum : Printing : Printing a receipt from list
Poster Message
lover_wass
Level: Guest


icon Printing a receipt from list

Hi guyz
I am new to vb programming. I am sure I am gona get help from here. This is what I wana do:
I am making a vb application to handle the billing system, something like point of sale. I am adding all the items that are being purchased to a list for the customer\'s display. In the list I want the price to be aligned next to the name of prod. and then I wana send that list to the receipt printer. Could anyone help me please?
Second I am gona hook the interac payment terminal for the payments. I don\'t quite know how it can be achieved.
I would appreciate your support.
Wass

19-04-2004 at 07:14 PM
| Quote Reply
Shady
Level: VB Guru


Registered: 08-07-2002
Posts: 305
icon Re: Printing a receipt from list

Hi

I think we need a little more information here.

When you say you are sending the products purchased to a list, what sort of list, are you using a list box or printing on a form or what?

Do your products come from a database (what sort Access/Oracle/MySQL etc), is the price of the product  in the databse too, is the receipt printer used in the same way a normal PC printer would be used (just slimmer width paper).

If for instance you had a database with  the products, price and unique products ID, you could use a list box to display what has been purchased, and then if the receipt printer works the same as a PC printer you should be able to user the Printer object to get the information from your database, and align the data.

Regards

Shady

____________________________
I don't wanna die... but I ain't keen on livin' either

26-04-2004 at 09:33 AM
View Profile Send Email to User Show All Posts | Quote Reply
lakki_lakki
Level: Guest

icon Re: Printing a receipt from list

Hello there!


Here is receipt suggestion...> take a look. I am not it works or not you have to try it and play with it..Enjoy!!!

Lakki

Private Sub PrintReceipt()
Dim I As Integer, J As Integer, S As String
'Print receipt using printer object
Printer.Scale (0, 0)-(8.5, 11#)
Printer.FontName = "Arial"
Printer.FontSize = 12
Printer.CurrentX = 1: Printer.CurrentY = 1
Printer.FontBold = True
Printer.Print "Receipt Number " + Format(OrderNumber, "0000")
Printer.FontBold = False
Printer.Print
Printer.CurrentX = 1
Printer.Print txtFirstName.Text + " " + txtLastName.Text
Printer.CurrentX = 1
Printer.Print txtAddress.Text
Printer.CurrentX = 1
Printer.Print txtCity.Text + ", " + txtState.Text + " " + txtZip.ToolTipText
Printer.CurrentX = 1
Printer.Print medPhone.Text
Printer.Print
Printer.CurrentX = 1
Printer.Print "How many items" + Str(NumberReceipt) + " Receipt(name it whatever you want(s):"

'access database make it before you use this code, according to you need....
denPizza.rscomReceipt.Open
denPizza.rscomReceipt.Find "ReceiptNumber = '" + Trim(Str(R_Number)) + "'", 0, adSearchForward
For I = 1 To Number_R
  Printer.Print
  Printer.CurrentX = 1
'Here what you want to print from the database or whatever use "a if" here if needed
  
  Printer.CurrentX = 1
  Printer.Print "Cost: $" + Format(denReceipt.rscomReceipt.Fields("cost"), "0.00")
  If I <> Number_R Then denReceipt.rscomReceipt.MoveNext
Next I
denReceipt.rscomReceipt.Close

Printer.Print
Printer.CurrentX = 1
Printer.Print "Total Cost: $" + Format(TotalCost, "0.00")
Printer.EndDoc
End Sub

12-05-2004 at 07:52 AM
| Quote Reply
AndreaVB Forum : Printing : Printing a receipt from list
Previous Topic (Printing in different language in dos mode with VB)Next Topic (Creating small Word doc files in VB) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder