Şuanki Dizin: /home/wwwdreamtechnolo/public_html/kitchenfoodrecipes.com/disha/disha-foundation/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/kitchenfoodrecipes.com/disha/disha-foundation/invoice-report.php |
<?php require_once("lib/function.php"); $db = new login_function(); $flag = 0; $amount_error=""; $name_error=""; $select_error=""; $success_msg =0; $succ_msg=0; $customer_name = ""; $invoice_msg = 0; $invoice_id = ""; 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_btn'])) { $customer_name = $_POST['customer_name']; $_SESSION['customer_name'] = $customer_name; $service = $_POST['service']; $actual_amount = $_POST['actual_amount']; $discount_amount = $_POST['discount_amount']; if(!is_numeric($actual_amount)) { $amount_error = "Please enter numeric Value"; $flag = 1; } if(!is_numeric($discount_amount)) { $amount_error = "Please enter numeric Value"; $flag = 1; } if($customer_name=="select") { $name_error = "Please Select Customer Name"; $flag = 1; } if($service=="select") { $select_error = "Please Select Service"; $flag = 1; } if($flag == 0) { if($db->add_to_the_invoice($customer_name,$service,$actual_amount,$discount_amount)) { $success_msg = 1; } } } if(isset($_GET['delete_id'])) { $delete_id = $_GET['delete_id']; $db->delete_invoice_cart_data($delete_id); $db->delete_main_invoice_cart($delete_id); $succ_msg = 1; } $fetch_name = $db->fetch_customer_name_by_id($customer_name); if(isset($_POST['submit_btn'])) { $details = $db->get_temp_invoice_info_for_display(); if(!empty($details)) { $count=0; $id = $details[$count][0]; $c_id = $details[$count][1]; $service_id = $details[$count][2]; $actual_total_amount= $details[$count][3]; $discount_total_amount= $details[$count][4]; } if($insert_id = $db->insert_invoice_details($c_id,$actual_total_amount,$discount_total_amount)) { $report_details = $db->get_temp_invoice_info(); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $c_id = $report_details[$counter][1]; $service = $report_details[$counter][2]; $actual_amount = $report_details[$counter][3]; $discount_amount = $report_details[$counter][4]; if($db->add_to_the_invoice_cart($insert_id,$c_id,$service,$actual_amount,$discount_amount)) { if($db->delete_invoice($id)) { $invoice_msg = 1; } } $counter ++; } } } } ?> <!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>Invoice List</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"> <!-- PLUGINS STYLES--> <!-- THEME STYLES--> <link href="css/main.min.css" rel="stylesheet" /> <link href="datatable/datatables.min.css" rel="stylesheet" /> <!-- PAGE LEVEL STYLES--> <style> .col-md-12 { width:100%; margin:auto; margin-top:20px; } table,th { text-align:center; text-transform:uppercase; } table,td { text-align:left; text-transform:uppercase; } @media only screen and (max-width: 600px) { .col-md-12 { width:100%; } .alert { width:100%; } .side-row { width:49%; display:inline-table; } } .content-wrapper { position: relative; background-color: #f2f3fa; margin-left: 230px; padding: 0 15px 60px 15px; -webkit-transition: margin .2s ease-in-out; -o-transition: margin .2s ease-in-out; transition: margin .2s ease-in-out; min-height: 1400px; } .txt { text-align:left; color:#232B99; font-size:12px; margin-right:10px; font-weight:bold; height:40px; } </style> <link href="css/animate.css" rel="stylesheet" type="text/css" media="all"> <script src="js/wow.min.js"></script> </head> <body class="fixed-navbar"> <div class="page-wrapper"> <?php include('header.php'); ?> <?php include('side-bar.php'); ?> <div class="content-wrapper"> <div class="page-content fade-in-up"> <?php if($success_msg == 1) {?> <div class="alert alert-danger"> <span style="color:white;">Deleted Successfully.</span> </div> <?php } ?> <div class="ibox" style="border-radius:5px; padding:7px;"> <div class="ibox-body" style="padding:7px; padding-top:0px;"> <div class="ibox-body" style="padding:7px; padding-top:0px;"> <?php $customer_name =""; $bill_type =""; $cust_error =""; $from_date = date("Y-m-d"); $to_date =date("Y-m-d"); if(isset($_POST['add_btn1'])) { $customer_name = $_POST['customer_name']; $bill_type = $_POST['bill_type']; $from_date = $_POST['from_date']; $to_date = $_POST['to_date']; if($customer_name=="select") { $customer_name =""; } if($bill_type=="select") { $bill_type =""; } $_SESSION['customer_name'] = $customer_name; $_SESSION['bill_type'] = $bill_type; $_SESSION['from_date'] = $from_date; $_SESSION['to_date'] = $to_date; } else if(isset($_SESSION['customer_name'])){ $customer_name = $_SESSION['customer_name']; $bill_type = $_SESSION['bill_type']; $from_date = $_SESSION['from_date']; $to_date = $_SESSION['to_date']; } ?> <form class="form-pink" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" autocomplete="off" enctype="multipart/form-data"> <div class="ibox-body"> <div class="row"> <div class="col-sm-4 col-md-4 col-lg-4 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Select 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> <select name="customer_name" class="form-control" > <option value="select">Select Customer</option> <?php $report_details = $db->only_customers(); if(!empty($report_details)) { $counter = 0; foreach($report_details as $record) { $c_id = $report_details[$counter][0]; $name = $report_details[$counter][1]; ?> <option value ="<?php echo $c_id; ?>" <?php if($customer_name==$c_id) {?> Selected <?php } ?>><?php echo $name;?></option> <?php $counter++; } } ?> </select> <span style="color:red"><?php echo $cust_error; ?></span> </div> </div> <div class="col-sm-4 col-md-4 col-lg-4 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>Select 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> <select name="bill_type" class="form-control" > <option value="select">Select Bill Type</option> <option value="gst" <?php if($bill_type=="gst") { ?> Selected <?php } ?>>GST</option> <option value="without_gst" <?php if($bill_type=="without_gst") { ?> Selected <?php } ?>>No GST</option> </select> <span style="color:red"><?php echo $cust_error; ?></span> </div> </div> <div class="col-sm-4 col-md-4 col-lg-4 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>From Date</b></label> <div class="input-group-icon input-group-icon-left set-row"> <input type="date" name="from_date" class="form-control" value="<?php echo $from_date; ?>" /> </div> </div> <div class="col-sm-4 col-md-4 col-lg-4 form-group mb-6"> <label class="form-group mb-4 set-row label_marg"><b>To Date</b></label> <div class="input-group-icon input-group-icon-left set-row"> <input type="date" name="to_date" class="form-control" value="<?php echo $to_date; ?>" /> </div> </div> <div class="col-sm-12 form-group mb-12" style="text-align:center; padding-left:0px; padding-right:0px; 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_btn1" style="width:100%;">SEARCH</button> </div> </div> </div> </div> </form> </div> <div class="ibox-head"> <div class="ibox-title"><i class="fas fa-list" style="margin-right:10px;"></i>Invoice Report</div> </div> <br /> <div class="flexbox mb-4"> <div class="input-group-icon input-group-icon-left mr-3"> <span class="input-icon input-icon-right font-16"><i class="fas fa-search"></i></span> <input class="form-control form-control-rounded form-control-solid" id="key-search" type="text" placeholder="Search ..."> </div> </div> <div class="table-responsive row"> <table class="table table-bordered table-hover" id="example" style="overflow-x:auto;overflow-y:auto;" cellpadding=0 cellspacing=0> <thead class="thead-default thead-lg"> <tr> <th>Sr.No</th> <th>Customer Name</th> <th>Services Name</th> <th>Actual Amount</th> <th>Discount Amount</th> <th>Bill Type</th> <th>Invoice No</th> <th>View</th> <th>View</th> <th>Invoice/Note</th> <th>View NOTE</th> <th>Make Payment</th> <th>Paid Payments</th> <th>Total Paid Amount</th> <th>Balance</th> <th>Action</th> <th>Action</th> </tr> </thead> <tbody> <?php $total=0;$total1=0; $report_details = $db->fetch_invoice_report($customer_name,$bill_type,$from_date,$to_date); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $c_id = $report_details[$counter][1]; $actual_amount = $report_details[$counter][2]; $discount_amount = $report_details[$counter][3]; $comments = $report_details[$counter][4]; $bill_type = $report_details[$counter][5]; $invoice_no = $report_details[$counter][6]; $cust_name = $db->fetch_customer_name_by_id($c_id); ?> <tr> <td><?php echo $counter+1; ?></td> <td><?php echo $cust_name; ?></td> <td> <?php $fetch_service_id = $db->fetch_services_id_by_cust_id($id); if(!empty($fetch_service_id)) { $count = 0; foreach($fetch_service_id as $record) { $service = $fetch_service_id[$count][0]; if($count>0) { echo ",".$service_name = $db->fetch_service_name($service); } else { echo $service_name = $db->fetch_service_name($service); } $count++; } } ?> </td> <td style="text-align:center;"><?php echo $actual_amount; ?></td> <td style="text-align:center;"><?php echo $discount_amount; ?></td> <td><?php echo $bill_type; ?></td> <td><?php echo $invoice_no; ?></td> <td><a href="show-invoice.php?c_id=<?php echo $id; ?>" target="_blank" style="color:green;">View</a> <br /> <a href="show-invoice.php?c_id=<?php echo $id; ?>&large" target="_blank" style="color:green;">Large View</a> </td> <td><a href="show-invoice.php?c_id=<?php echo $id; ?>&hdr" target="_blank" style="color:green;">PRINT WITH HEADER</a> <br /> <a href="show-invoice.php?c_id=<?php echo $id; ?>&hdr&large" target="_blank" style="color:green;">Large PRINT WITH HEADER</a> </td> <td><a href="invoice-note.php?note_id=<?php echo $id;?>" target="_blank">Note</a></td> <td><a href="viw-note.php?note_id=<?php echo $id;?>" target="_blank">View Note</a></td> <td><a href="make-payment.php?payment_id=<?php echo $id;?>">Make Payment</a> </td> <td><a href="payment-report.php?invoice_id=<?php echo $id;?>">Paid Payments History</a></td> <td> <?php echo $sum_paid = $db->get_total_paid_amount_from_make_payment($id); ?> </td> <td> <?php echo $actual_amount - $sum_paid; ?> </td> <td><a href="edit-invoice-report.php?update_id=<?php echo $id;?>" ><i class="fas fa-edit" style="color:blue;margin-left:20px;"></i></a></td> <td><a href="invoice-report.php?delete_id=<?php echo $id;?>" onclick="return confirm('Are you sure?');"><i class="fas fa-trash-alt" style="color:red;margin-left:20px;"></i></a></td> </tr> <span><?php $total=$total+ $actual_amount; ?></span> <span><?php $total1=$total1+ $discount_amount; ?></span> <?php $counter ++; }?> <tr> <td><?php echo $counter+1; ?></td> <td></td> <td><b>Totals -</b></td> <td style="text-align:center;"><b><?php echo $total; ?></b></td> <td style="text-align:center;"><b><?php echo $total1; ?></b></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <?php }else { ?> <td></td> <td></td> <td>No Data Found...</td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!-- END SEARCH PANEL--> <!-- BEGIN THEME CONFIG PANEL--> <!-- END THEME CONFIG PANEL--> <!-- BEGIN PAGA BACKDROPS--> <div class="sidenav-backdrop backdrop"></div> <div class="preloader-backdrop"> <div class="page-preloader">Loading</div> </div> <!-- END PAGA BACKDROPS--> <!-- New question dialog--> <!-- End New question dialog--> <!-- QUICK SIDEBAR--> <script src="js/jquery.min.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { $( "#from_date" ) .datepicker({ dateFormat: 'dd-mm-yy' }) ; $( "#to_date" ) .datepicker({ dateFormat: 'dd-mm-yy' }) ; } ) ; </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> <!-- PAGE LEVEL PLUGINS--> <!-- CORE SCRIPTS--> <script src="datatable/datatables.min.js"></script> <script src="js/app.min.js"></script> <script> $(function() { $('#example').DataTable({ pageLength: 10, 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