Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/
Share on other sites

[!--quoteo(post=358608:date=Mar 27 2006, 03:10 AM:name=shortj75)--][div class=\'quotetop\']QUOTE(shortj75 @ Mar 27 2006, 03:10 AM) [snapback]358608[/snapback][/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) [snapback]358610[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is this for an online store, or for an intranet app?
[/quote]

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

invoice

[code]invoice_number(PK) | invoice_date | cust_id(FK) |[/code]

invoice_item

[code]invoice_number(FK) | item_id(PK) | prod_id(FK) |  qty |  price |[/code]

Produce the invoice by joining these table and also joining with customer and product tables
[!--quoteo(post=358628:date=Mar 27 2006, 04:03 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Mar 27 2006, 04:03 AM) [snapback]358628[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Invoicing systems I have used have had two tables viz. invoice and invoice_item

invoice

[code]invoice_number(PK) | invoice_date | cust_id(FK) |[/code]

invoice_item

[code]invoice_number(FK) | item_id(PK) | prod_id(FK) |  qty |  price |[/code]

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

How do I construct an Invoice Entry ?
are you asking how to input the data into the data base if so
[code]
$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");
[/code]
have you form point to the page you put this code on and change all the variables to the correct names
[!--quoteo(post=358796:date=Mar 27 2006, 03:55 PM:name=shortj75)--][div class=\'quotetop\']QUOTE(shortj75 @ Mar 27 2006, 03:55 PM) [snapback]358796[/snapback][/div][div class=\'quotemain\'][!--quotec--]
are you asking how to input the data into the data base if so
[code]
$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");
[/code]
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.