Şuanki Dizin: /home/wwwdreamtechnolo/public_html/kitchenfoodrecipes.com/disha/disha-foundation/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/kitchenfoodrecipes.com/disha/disha-foundation/update_billing.php |
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); require_once('lib/function.php'); $db = new login_function(); // Add Checkup if(isset($_SESSION['current_login_admin'])) { $current_login_admin = $_SESSION['current_login_admin']; } if(!isset($_SESSION['current_login_admin'])) { header("location:index.php"); } if(isset($_GET['update_id'])) { $up_id = $_GET['update_id']; $_SESSION['current_update_id'] = $up_id; } else if(isset($_SESSION['current_update_id'])) { $up_id = $_SESSION['current_update_id']; } $succ_msg =0; $succ_flag=0; if(!isset($_SESSION['current_login_admin'])) { header("Location:/index.php"); } if(isset($_SESSION['current_login_admin'])) { $email = $_SESSION['current_login_admin']; } if(isset($_POST['add'])) { $title = $_POST['title']; $desc = $_POST['desc']; $amount = $_POST['amount']; $db->update_billing_details($title,$desc,$amount,$up_id); $succ_flag = 1 ; } $fetching_data = $db->get_all_data_for_billing($up_id); $counter = 0; if(!empty($fetching_data)) { $title = $fetching_data[$counter][1]; $desc = $fetching_data[$counter][2]; $amount = $fetching_data[$counter][3]; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width initial-scale=1.0"> <title>Add Checkup</title> <!-- GLOBAL MAINLY STYLES--> <link href="css/bootstrap.min.css" rel="stylesheet" /> <link href="css/font-awesome.min.css" rel="stylesheet" /> <link href="css/line-awesome.min.css" rel="stylesheet" /> <link href="css/themify-icons.css" rel="stylesheet" /> <link href="css/animate.min.css" rel="stylesheet" /> <link href="css/toastr.min.css" rel="stylesheet" /> <link href="css/bootstrap-select.min.css" rel="stylesheet" /> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"> <!-- THEME STYLES--> <link href="css/main.min.css" rel="stylesheet" /> <link href="datatable/datatables.min.css" rel="stylesheet" /> <link href="css/animate.css" rel="stylesheet" type="text/css" media="all"> <script src="js/wow.min.js"></script> <script> function validateForm() { var a = document.forms["myForm"]["customer_name"].value; var b = document.forms["myForm"]["service"].value; var d = document.forms["myForm"]["actual_amount"].value; var e = document.forms["myForm"]["discount_amount"].value; if (a == "Select Customer") { alert("Please Select Customer Name"); return false; } if (b == "Select Service") { alert("Please Select Services"); return false; } if (d == "") { alert("Enter Actual Amount"); return false; } if (e == "") { alert("Enter Discount Amount"); return false; } } </script> <style> .tbl-design { border:1px dashed #6BD089 !important; background:#C8EFD4; padding:7px; color:#B21016; font-weight:bold; margin:5px; font-size:13px; font-family:arial; display:inline-table; } .tbl-design:hover{ color:#000000; border:1px dashed #6BD089 !important; background:#005174; color:#FFFFFF; } .active_table { color:#000000; border:1px dashed #6BD089 !important; background:#005174; color:#FFFFFF; } .active_table_exist { background:orangered; } </style> </head> <body class="fixed-navbar"> <div class="page-wrapper" style="min-height:500px;"> <?php include('header.php'); ?> <?php include('side-bar.php'); ?> <div class="content-wrapper"> <div class="row" style="padding:0px; margin:0px; margin-top:15px; border-radius:15px;"> <?php if($succ_flag == 1) {?> <div class="alert alert-success" style="width:100%; text-align:center;font-weight:bold; font-size:16px;"> Bill Udated Successfully. <script> // window.location.href = "add_billing_disha.php?update_id=<?php echo $up_id;?>"; // alert(" Billing Updated Successfully ") </script> </div> <?php } ?> <?php if($succ_msg == 1) { ?> <div class="alert alert-danger" style="width:100%; text-align:center;font-weight:bold; font-size:16px;"> <span style="color:red">Bill Information Deleted Successfully. </div> <?php } ?> </div> <div class="ibox" style="border-radius:5px; padding:7px;"> <!-- <form class="form-pink" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" name="myForm" onsubmit="return validateForm()" autocomplete="off" enctype="multipart/form-data"> <div class="ibox-head"> <div class="ibox-title"><i class="fas fa-plus" style="margin-right:10px;"></i>ADD BILL</div> </div> <div class="ibox-body"> <div> <?php $table_no="1"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=1" class="tbl-design <?php if($table_id=="1"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-1</a> <?php $table_no="2"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=2" class="tbl-design <?php if($table_id=="2"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-2</a> <?php $table_no="3"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=3" class="tbl-design <?php if($table_id=="3"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-3</a> <?php $table_no="4"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=4" class="tbl-design <?php if($table_id=="4"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-4</a> <?php $table_no="5"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=5" class="tbl-design <?php if($table_id=="5"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-5</a> <?php $table_no="6"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=6" class="tbl-design <?php if($table_id=="6"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-6</a> <?php $table_no="7"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=7" class="tbl-design <?php if($table_id=="7"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-7</a> <?php $table_no="8"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=8" class="tbl-design <?php if($table_id=="8"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-8</a> <?php $table_no="9"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=9" class="tbl-design <?php if($table_id=="9"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-9</a> <?php $table_no="10"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=10" class="tbl-design <?php if($table_id=="10"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-10</a> <?php $table_no="11"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=11" class="tbl-design <?php if($table_id=="11"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-11</a> <?php $table_no="12"; $exist_id=$db->get_exist_item($table_no); ?> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?table_id=12" class="tbl-design <?php if($table_id=="12"){ ?>active_table <?php } if($exist_id != ""){ ?>active_table_exist <?php } ?>">Table-12</a> </div> <?php ?> <br /> <div style="color:orangered; font-weight:bold; "> Current Table No. - <b><?php echo $table_id; ?></b> </div> <hr> <div class="row"> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Enter Customer Name</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-user"></i></span> <input type="text" class="form-control form-control-air" placeholder="Enter Name" name="customer_name" value="<?php echo $display_name; ?>"> </div> </div> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Address</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-user"></i></span> <input type="text" class="form-control form-control-air" placeholder="Enter Address" name="address" value="<?php echo $display_address; ?>"> </div> </div> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Mobile No.</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-user"></i></span> <input type="text" class="form-control form-control-air" placeholder="Enter Mobile No" name="mobile_no" value="<?php echo $display_mobile_no; ?>"> </div> </div> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Select Product</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-user"></i></span> <select name="service_name1" class="form-control form-control-air" id="service_name1"> <?php $service_name = $db->fetch_service_name_from_foodies_by_id($service); if($service!= "" ) { ?> <option value ="<?php echo $service; ?>"><?php echo $service_name; ?></option> <?php } ?> <option value="select" style="padding:10px 30px">Select Product</option> <?php $report_details = $db->only_foodies_services(); if(!empty($report_details)) { $counter = 0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $s_name = $report_details[$counter][1]; ?> <option value ="<?php echo $id; ?>"><?php echo $s_name;?></option> <?php $counter++; } } ?> </select> <span style="color:red"><?php echo $service_error; ?></span> </div> </div> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Single Product Price</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-user"></i></span> <input type="text" class="form-control form-control-air" placeholder="Single Product Price" name="single_price" id="single_price" readonly > </div> </div> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Qty.</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-user"></i></span> <input type="text" class="form-control form-control-air" placeholder="Enter Qty." id="quantity_txt" name="quantity_txt" value=""> </div> </div> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Actual Amount</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-rupee"></i></span> <input type="number" class="form-control form-control-air" id="actual_amount1" name="actual_amount1" placeholder="Amount"> <span style="color:red"><?php echo $amount_error; ?></span> </div> </div> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Discount Amount</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-rupee"></i></span> <input type="number" name="discount_amount" class="form-control form-control-air" value="0" placeholder="Enter Discount Amount" /> <span style="color:red"><?php echo $amount_error; ?></span> </div> </div> <div class="col-sm-3 col-md-3 col-lg-3 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Comment</b></label> <div class="input-group-icon input-group-icon-left set-row"> <span class="input-icon input-icon-left"><i class="fas fa-user"></i></span> <input type="text" class="form-control form-control-air" placeholder="Enter Comment" name="comment" value="<?php echo $comment; ?>"> </div> </div> <div class="col-sm-6 col-md-6 col-lg-6 form-group mb-6" style="text-align:center; padding-left:0px; padding-right:0px; margin-top:30px;"> <button class="btn btn-pink btn-air" type="submit" name="add_btn" style="width:40%; font-weight:bold;">Add to Cart</button> </div> </div> </div> </form> --> <form class="form-pink" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" name="myForm" onsubmit="return validateForm()" autocomplete="off" enctype="multipart/form-data"> <div class="ibox-head"> <div class="ibox-title"><i class="fas fa-user-tie" style="margin-right:10px;"></i>update_id PATIENT BILLING</div> </div> <div class="ibox-body"> <div class="row"> <div class="col-sm-2 col-md-2 col-lg-2 form-group mb-2"> <label class="form-group mb-4 set-row label_marg"><b>TITLE</b></label> <div class="input-group-icon input-group-icon-left set-row"> <!-- <span class="input-icon input-icon-left"><i class="fas fa-user"></i></span> --> <!-- <input type="text" name="title" class="form-control form-control-air" placeholder="Enter TITLE" value="<?php echo $title ?>" required /> --> <select name="title" class="form-control" id="project_list"> <option value="Select"> Select Item Master Name </option> <?php $data = array(); $data = $db->get_item_master_data(); $counter = 1; if(!empty($data)) { foreach($data as $record) { $res_id = $record[0]; $item_name = $record[1]; ?> <option value="<?php echo $res_id; ?>"<?php if($res_id==$title){ ?> selected <?php } ?>> <?php echo $item_name; ?></option> <?php } } ?> </select> </div> </div> <div class="col-sm-2 col-md-2 col-lg-2 form-group mb-2"> <label class="form-group mb-4 set-row label_marg"><b>DESCRIPTION</b></label> <div class="input-group-icon input-group-icon-left set-row"> <!-- <span class="input-icon input-icon-left"><i class="fas fa-building"></i></span> --> <input type="text" name="desc" class="form-control form-control-air" name="shop_name" value="<?php echo $desc ?>" placeholder="Enter DESCRIPTION" /> </div> </div> <div class="col-sm-2 col-md-2 col-lg-2 form-group mb-2"> <label class="form-group mb-4 set-row label_marg"><b>Amount</b></label> <div class="input-group-icon input-group-icon-left set-row"> <!-- <span class="input-icon input-icon-left"><i class="fas fa-building"></i></span> --> <input type="number" name="amount" class="form-control form-control-air" name="address" value="<?php echo $amount; ?>" placeholder="Enter Amount" /> </div> </div> <div class="col-sm-5 form-group mb-5" style="text-align:center; padding-top:20px;"> <div class="col-sm-4 form-group mb-4" style="margin:auto;"> <button class="btn btn-pink btn-air" type="submit" name="add" style="width:100%;">SAVE DETAILS</button> </div> </div> </div> <!-- <center><a href="checkup_report.php?admission_id=<?php echo $up_id; ?>" style="color:red;font-weight:bold;">Back To List</a></center> --> </div> </form> </div> <!-- <label style="font-size:18px; font-weight:bold; margin-right:100px;"><input type="checkbox" name="bill_type" value="gst" class="gst_check" style="width:20px; height:20px; margin-right:10px;">GST BILL </label> </div> <div class="col-sm-12 col-md-12 col-lg-12 form-group mb-12"> <center> <button type="submit" class="btn btn-success" name="submit_btn">Create Bill</button> </center> --> </div> </form> </div> </div> </div> </div> <?php include('footer.php'); ?> <?php //include('search.php'); ?> <div class="sidenav-backdrop backdrop"></div> <div class="preloader-backdrop"> <div class="page-preloader">Loading</div> </div> <script src="js/jquery.min.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/metisMenu.min.js"></script> <script src="js/jquery.slimscroll.min.js"></script> <script src="js/idle-timer.min.js"></script> <script src="js/toastr.min.js"></script> <script src="js/jquery.validate.min.js"></script> <script src="js/bootstrap-select.min.js"></script> <script src="datatable/datatables.min.js"></script> <script src="js/app.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#service_name1').on('change', function() { //alert(service_name1); var product_name_val = this.value; //alert(product_name_val); $.ajax({ url: "api/food-product-price.php", type: "POST", data: { product_id_val: product_name_val }, cache: false, success: function(result){ $("#single_price").val(result); } }); }); }); </script> <script type="text/javascript"> $(document).ready(function(){ $("#quantity_txt").keyup(function(){ var single_price = $("#single_price").val(); var current_quantity = $("#quantity_txt").val(); $("#actual_amount1").val(parseFloat(single_price) * parseFloat(current_quantity)); }); }); </script> <script> $(function() { $('#example').DataTable({ pageLength: 5, fixedHeader: true, responsive: true, "sDom": 'rtip', columnDefs: [{ targets: 'no-sort', orderable: false }] }); var table = $('#example').DataTable(); $('#key-search').on('keyup', function() { table.search(this.value).draw(); }); }); </script> <!-- PAGE LEVEL SCRIPTS--> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4