0) { $items .= "$search_for[TID],"; } else { $insert = mysqli_query($con, "INSERT INTO items(Description, Price, QTY, Sum) VALUES('$item_description', '$item_price', '$item_quantity', '$item_sum')") or die(mysql_error()); $query = mysqli_query($con, "SELECT TID FROM items ORDER BY TID DESC") or die(mysql_error()); $get_last_row = mysqli_fetch_array($query2); $items .= $get_last_row['id']+','; } $i++; } $insert = mysqli_query($con, "INSERT INTO invoices(Date, Payment, Refund, Heavy, Seals, InvoiceNo, CID, Note, Items) VALUES('..', '$_POST[three]', '$_POST[four]', '$_POST[five]', '$_POST[six]', '..', '..', '..', '$items' )") or die(mysqli_error($con)); if($insert) { echo '

Inserted Successfully

'; } else { echo 'An error has occured'; } } ?>

Add Invoice

 

 

 

Invoice Type :

 

 

Name :

 

Invoice Number:

 

Date :

 

Payment : JD

 

Refund : JD

 

Heavy :

 

Seals :

 

Items

Description , QTY , Price , (QTY*PRICE for each item)
Item NameDescriptionPriceQuantityTotal Price
Add Item