jamesnkk Posted March 26, 2006 Share Posted March 26, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/ Share on other sites More sharing options...
shortj75 Posted March 26, 2006 Share Posted March 26, 2006 are you goping to be useing a mysql or some other database Quote Link to comment https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/#findComment-20921 Share on other sites More sharing options...
AV1611 Posted March 26, 2006 Share Posted March 26, 2006 Is this for an online store, or for an intranet app? Quote Link to comment https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/#findComment-20923 Share on other sites More sharing options...
jamesnkk Posted March 26, 2006 Author Share Posted March 26, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/#findComment-20928 Share on other sites More sharing options...
Barand Posted March 26, 2006 Share Posted March 26, 2006 Invoicing systems I have used have had two tables viz. invoice and invoice_iteminvoice[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 Link to comment https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/#findComment-20940 Share on other sites More sharing options...
jamesnkk Posted March 26, 2006 Author Share Posted March 26, 2006 [!--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_iteminvoice[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 ? Quote Link to comment https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/#findComment-20942 Share on other sites More sharing options...
shortj75 Posted March 27, 2006 Share Posted March 27, 2006 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 Link to comment https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/#findComment-21103 Share on other sites More sharing options...
jamesnkk Posted March 27, 2006 Author Share Posted March 27, 2006 [!--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. Quote Link to comment https://forums.phpfreaks.com/topic/5867-how-to-create-an-invoice/#findComment-21265 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.