Jump to content


Photo

How to create an Invoice


  • Please log in to reply
7 replies to this topic

#1 jamesnkk

jamesnkk
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 26 March 2006 - 06:58 PM

Hi, How can I create an Invoice entry using PHP, I know it involve with table, but I have no idea, Or is it possible to create using PHP, I know MS Access can be easily done.

The Invoice columns have a product Item, desp qty, cost and Total Amount.
It can allow me to select from the drop down menu to select the product item store in my table and then dispay the price on the 2nd column, while it compute the Total amount on the last column. It allow me to increment a new row for another new item or I can return to the previous row to edit.

I have trying searching the web, could't find any information about invoice. Is there such a script nor any expert out here, can give advise on how to construct an Invoice Entry.

Thanks for your patience reading my post.



#2 shortj75

shortj75
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationPort Huron,mi

Posted 26 March 2006 - 07:10 PM

are you goping to be useing a mysql or some other database
The Short One

hopfully this helps if it doesn't sorry
i won't write the code for you!!! you don't learn that way

#3 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 26 March 2006 - 07:13 PM

Is this for an online store, or for an intranet app?


#4 jamesnkk

jamesnkk
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 26 March 2006 - 07:22 PM

[!--quoteo(post=358608:date=Mar 27 2006, 03:10 AM:name=shortj75)--][div class=\'quotetop\']QUOTE(shortj75 @ Mar 27 2006, 03:10 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
are you goping to be useing a mysql or some other database
[/quote]

Yes, I am using MySQL

[!--quoteo(post=358610:date=Mar 27 2006, 03:13 AM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Mar 27 2006, 03:13 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Is this for an online store, or for an intranet app?
[/quote]

An intranet Application

#5 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 26 March 2006 - 08:03 PM

Invoicing systems I have used have had two tables viz. invoice and invoice_item

invoice

invoice_number(PK) | invoice_date | cust_id(FK) |

invoice_item

invoice_number(FK) | item_id(PK) | prod_id(FK) |  qty |  price |

Produce the invoice by joining these table and also joining with customer and product tables
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#6 jamesnkk

jamesnkk
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 26 March 2006 - 08:07 PM

[!--quoteo(post=358628:date=Mar 27 2006, 04:03 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Mar 27 2006, 04:03 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Invoicing systems I have used have had two tables viz. invoice and invoice_item

invoice

invoice_number(PK) | invoice_date | cust_id(FK) |

invoice_item

invoice_number(FK) | item_id(PK) | prod_id(FK) |  qty |  price |

Produce the invoice by joining these table and also joining with customer and product tables
[/quote]

How do I construct an Invoice Entry ?

#7 shortj75

shortj75
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationPort Huron,mi

Posted 27 March 2006 - 07:55 AM

are you asking how to input the data into the data base if so
$item=$_POST['item'];
$price=$_POST['price'];
$quantity=$_POST['quantity'];
mysql_query("insert into your_table(item,price,quantity)values('$item','$price'.'$quantity')) or die("couldnt insert");
have you form point to the page you put this code on and change all the variables to the correct names
The Short One

hopfully this helps if it doesn't sorry
i won't write the code for you!!! you don't learn that way

#8 jamesnkk

jamesnkk
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 27 March 2006 - 05:23 PM

[!--quoteo(post=358796:date=Mar 27 2006, 03:55 PM:name=shortj75)--][div class=\'quotetop\']QUOTE(shortj75 @ Mar 27 2006, 03:55 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
are you asking how to input the data into the data base if so
$item=$_POST['item'];
$price=$_POST['price'];
$quantity=$_POST['quantity'];
mysql_query("insert into your_table(item,price,quantity)values('$item','$price'.'$quantity')) or die("couldnt insert");
have you form point to the page you put this code on and change all the variables to the correct names
[/quote]

Thanks for your prompt reply, what I actually asking is how do I design the Invoice form entry using table, which can increment the row when adding a new item into it. Sorry I am just a newbies, hope you get me right.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users