0){ $ck_fetch = mysqli_fetch_array($ck_query); $bal_id = $ck_fetch['Number']; $Balance_no = $ck_fetch['Balance_no']; $total_price = $quantity * $unit_selling_price; $remain_balance = $Balance_no - $quantity; if($Balance_no >= $quantity ){ echo $update_bal = "UPDATE itembal_tbl SET Balance_no='$remain_balance' WHERE Number='$bal_id' "; $updatebal_query = mysqli_query($conn,$update_bal); echo $add_SIV = "INSERT INTO siv (`siv_no`, `item_id`, `issued_qty`, `unit_purchase_price`, `unit_selling_price`, `total_price`, `date`, `user_id`, `remark`) VALUES ('$siv', '$item_id', '$quantity', '".$ck_fetch['Unit_price']."', '$unit_selling_price', '$total_price', '$date', '".$_SESSION['User_ID']."', '$remark')"; $SIV_query = mysqli_query ($conn, $add_SIV); } else { ?>
Check!
Current Balance
= $check ){ $update_bal = "UPDATE itembal_tbl SET Balance_no='$cur_bal' WHERE Number ='$data_row' "; $updatebal_query = mysqli_query($conn,$update_bal); $update_siv = "UPDATE siv SET siv_no='$siv', issued_qty='$quantity', unit_selling_price='$unit_selling_price', total_price='$total_price', date='$date_pic', remark='$remark' WHERE id='$id'"; $query_update_siv = mysqli_query($conn, $update_siv); } else { ?>
Check!
Current Balance
Print
Close
                    
          
          
No
Sales no
Item List Name
Issued_Qty
Unit Price
Total Price
Date :
= 1) { ?>
Sales Form
     
Order No
Category
Please Select Category
Item List
1st Select Category
Balance
Select Item List
     
Quantity Issued
Selling Price
Remark
sorry!
there is no Sales inserted with this Sales no
No
Sales no
Item List Name
Qty
Purchase Price
Selling Price
Total Saling Price
Date
Edit
Delete
Edit
Update Sales Item List
×
Sales No
Purchase Price
Selling Price
Quantity
Total Price
Date :
Remark
   
N.B :- to change the Unit_Price you have to delete the row and insert it again
Delete
Remove Sales Item List
×
Are You Sure to remove  
DONE
Done Edit