how can I make Invoice for ordered products in eshop

bahare
 
on Jan 22, 2013 08:55 AM
2690 Views

Hi,

what's the steps for making invoices in a eshop?

need I make a saperate table for invoices?

Or can I use products and orders and orderlines tables to make invoice?

I think I can do it by shoing

orderId, username,orderstatus, total price,...

in a gridview

and shoing ordered products name,quantity, price in a child gridview in grdview above

and print above information.

Is it right way or not?

is there any better way?

and for example for 50 orders in a day how can I print 50 Invoice in seperate a4 pager?

 

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Mustafa
 
on Jan 22, 2013 09:05 AM

According to me you should create a new table for invoice so that once the invoice is printed it should be saved with us for future reference

bahare
 
on Jan 22, 2013 11:22 AM

Hi,

thanks Mustafa

can anyone give me more detailed information

and what about this part of Question?

"and for example for 50 orders in a day how can I print 50 Invoice in seperate a4 page"

I mean It's dificult for admin to pring Invoice one by one

is there any way to print all Invoices at the same time?

for example we have two order from two person

how can we print gridviews Information

in two seperate page?

1

Invoice Id:

Ali

Name:

Iran, Tehran,…..

Address:

123456

Postal code:

Name: Pencil

Quantity:12

Price:1$

 

Orders:

12$

Total:

2

Invoice Id:

sima

Name:

Iran, Shiraz,…..

Address:

5456452

Postal code:

Name: hand bag

Quantity: 3

Price: 20$

Orders:

60$

Total:

bahare
 
on Jan 22, 2013 12:33 PM
on Jan 22, 2013 12:36 PM

I found a very nice link

Print only current selected ASP.Net GridView Row using JavaScript or jQuery

It's so close to what I want

but Is it possible doing that without selecting rows?

I mean Print all rows of gridview, but each row seperately ,without selecting, only by cliking on a button outside of gridview?

Mustafa
 
on Jan 23, 2013 05:01 AM

Ya its possible.

What you will have to do is you will have to take one button and on that button click event you will have to run a loop which will run based on how many rows are populated in the gridview and in that loop you will have to write the logic to print invoice.

So if you have 50 Orders of the day it will be printed on on button click.