D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
add_payment_old.php
back
Copy
<?php ob_start(); session_start(); include 'config.php'; $login = $_SESSION['login_email']; if($login == ''){ echo '<script>location.replace("index.php")</script>'; } $id = $_GET['id']; if(isset($_SESSION["source_id"])){ $source_id = $_SESSION['source_id']; } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Invoice Management | Invoice</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" /> <meta content="Coderthemes" name="author" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Font Awsome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- App favicon --> <link rel="shortcut icon" href="assets/images/favicon.png"> <!-- Pie Chart Css --> <link href="assets/pie charts/style.css" rel="stylesheet" type="text/css" /> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.css" rel="stylesheet" type="text/css" /> <link href="assets/css/metismenu.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/style.css" rel="stylesheet" type="text/css" /> <script src="assets/js/modernizr.min.js"></script> <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> <link href="plugins/sweet-alert2/sweetalert2.min.css" rel="stylesheet" type="text/css"> <link href="plugins/jquery-toastr/jquery.toast.min.css" rel="stylesheet" /> </head> <body> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <?php include 'top-header.php'; ?> <!-- Top Bar End --> <!-- ========== Left Sidebar Start ========== --> <?php include 'left-sidebar.php'; ?> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="page-title-box"> <h4 class="page-title float-left">Add Payment</h4> <ol class="breadcrumb float-right"> <li class="breadcrumb-item ">Contact Manager</li> <li class="breadcrumb-item ">All Contact</li> <li class="breadcrumb-item active">Add Payment</li> </ol> <div class="clearfix"></div> </div> </div> </div> <!-- end row --> <div class="row "> <div class="col-lg-12"> <div class="card-box"> <form method="post" role="form" id="paymentForm"> <input type="hidden" name="companyId" value="<?php echo $id; ?>"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="payment_mode">Payment Mode</label> <select class="form-control" name="payment_mode" id="payment_mode"> <option value="">-- Select Payment Mode --</option> <option value="Cash">Cash</option> <option value="Cheque">Cheque</option> <option value="Bank Transfer">Bank Transfer</option> <option value="Payment Gateway">Payment Gateway</option> </select> </div> </div> <div class="col-md-6"> <label>Date</label> <input type="text" class="form-control" name="paymentDate" id="paymentDate" value="<?php echo date('Y-m-d') ?>"> </div> </div> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label for="amount">Amount</label> <input type="text" class="form-control" name="amount" id="amount" placeholder="Enter amount"> </div> </div> <div class="col-md-4"> <label for="reference">Invoice No. <span style="color:red">(Please Input correct Invoice id)</span></label> <input type="text" class="form-control" name="reference" id="reference" placeholder="Enter Invoice no."> </div> <div class="col-md-4"> <label for="reference">Transaction Reference No.</label> <input type="text" class="form-control" name="transaction_reference_no" id="transaction_reference_no" placeholder="Enter Transaction Reference No."> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label for="exampleInputEmail1">Remark</label> <input type="text" class="form-control" name="remark" id="remark" placeholder="Remark"> </div> </div> </div> <div class="form-group"> <button type="button" id="submitForm" class="btn btn-purple waves-effect waves-light">Submit</button> </div> </form> </div> </div> <!-- end col --> </div> </div> <!-- container --> </div> <!-- content --> <?php include 'copyrignt.php' ?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> </div> <!-- END wrapper --> <!-- Chart Js --> <!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.min.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.js'></script> --> <!-- jQuery --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/popper.min.js"></script><!-- Popper for Bootstrap --> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/metisMenu.min.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/jquery.slimscroll.js"></script> <!-- Dashboard init --> <!-- <script src="assets/pages/jquery.dashboard.js"></script> --> <!-- App js --> <script src="assets/js/jquery.core.js"></script> <script src="assets/js/jquery.app.js"></script> <!-- Chart Js --> <!-- <script src="assets/pie charts/script.js"></script> --> <!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script> --> <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <script src="plugins/sweet-alert2/sweetalert2.min.js"></script> <script src="plugins/jquery-toastr/jquery.toast.min.js" type="text/javascript"></script> </body> <script> $(document).ready(function() { $("#paymentDate").datepicker({ dateFormat: 'yy-mm-dd' }); }); $("#submitForm").click(function(){ if(validate()){ $.ajax({ url : "PHP/response.php", data : $("#paymentForm").serialize()+"&action=AddPayment&created_by=<?php echo $login; ?>&sourceId=<?php echo $source_id; ?>", method : "POST", async : false, success : function(response){ if(response == 1){ localStorage.setItem("PaymentAdded", "true"); location.replace("contact.php"); } else if(response == 0){ errorMessage("Payment could not be added."); } else{ errorMessage(response); } }, error : function(error){ errorMessage("Payment could not be added1."); } }) } }) function validate(){ if($("#payment_mode").val() == ""){ errorToast("Please Select payment mode"); $("#payment_mode").focus(); return false; } if($("#paymentDate").val() == ""){ errorToast("Please enter payment date"); $("#paymentDate").focus(); return false; } if($("#amount").val() == ""){ errorToast("Please enter amount"); $("#amount").focus(); return false; } if($("#remark").val() == ""){ errorToast("Please enter remark"); $("#remark").focus(); return false; } return true; } function errorToast(msg){ $.toast({ heading: 'Error!', text: msg, position: 'top-right', loaderBg: '#bf441d', icon: 'error', hideAfter: 3000, stack: 1 }); } function successMessage(msg){ swal({ title: 'Success!', text: msg, type: 'success', confirmButtonColor: '#4fa7f3' }); } function errorMessage(msg){ swal({ title: 'Error!', text: msg, type: 'error', confirmButtonColor: '#4fa7f3' }); } </script> </html>