EVOLUTION-NINJA
Edit File: purchase_order_grid.php
<script src="<?php echo base_url('assets/datatables/jquery.dataTables.min.js');?>"></script> <script src="<?php echo base_url('assets/datatables/dataTables.bootstrap.min.js');?>"></script> <link rel="stylesheet" href="<?php echo base_url('assets/datatables/dataTables.bootstrap.css');?>"> <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/sweetalert.css');?>" /> <script type="text/javascript" src="<?php echo base_url('assets/js/sweetalert.min.js');?>"></script> <script> $(document).ready(function() { $('#sample_1').DataTable(); } ); </script> <style> .checkbox-success input[type="checkbox"]:checked + label::before { background-color: #5cb85c!important; border-color: #5cb85c !important; } .checkbox-success input[type="checkbox"]:checked + label::after { color: #fff !important; } </style> <div class="content-wrapper"> <div class="page-content"> <div class="col-sm-12"> <!-- BEGIN PAGE HEADER--> <br> <h3 class="page-title">Choose Items for Purchase Order</h3><br> <div class="portlet-body" id="productgrid"> <table class="table table-striped table-bordered table-hover" id="sample_1"> <thead> <tr> <th>Select Product</th> <th> Sr.No.</th> <th> Item</th> <th> Item Code</th> <th> Item Description</th> <th> List Price</th> <th> HSN Code</th> </tr> </thead> <script> var checkbox_value = ""; function po_gen(key,id) { var product_type=$('.product_type'+key).val(); checkbox_value += id + "|"; //alert(checkbox_value); $("#ids").val(checkbox_value); $('.pd_type').each(function(key,val) { var new_val=$('.product_type'+key).val(); }); } </script> <tbody> <?php $i=1; ?> <?php if(isset($confirmed_data)) { foreach($confirmed_data as $key=>$c_data){ ?> <tr> <td><input type="checkbox" id="textbox1" class="check_box<?php echo $key;?>" value="<?php echo $c_data->id; ?>" onclick="po_gen(<?php echo $key;?>,<?php echo $c_data->id;?>)"><input type="hidden" value="<?php echo $c_data->id; ?>" ></td> <td style="text-transform: uppercase !important"><?php echo $i; ?></td> <td style="text-transform: uppercase !important"><?php echo $c_data->item; ?></td> <td style="text-transform: uppercase !important" ><input type="hidden" class="product_type<?php echo $key;?> pd_type" value="<?php echo $c_data->item; ?>"><?php echo $c_data->item_code; ?></td> <td style="text-transform: uppercase !important"><?php echo $c_data->item_description; ?></td> <td style="text-transform: uppercase !important"><?php echo $c_data->list_price; ?></td> <td style="text-transform: uppercase !important"><?php echo $c_data->hsn_code; ?></td> </tr> <?php $i++; } } ?> </tbody> </table> </div> <button id="generate" class="generate" value="Generate" style="margin-top: 2%; margin-bottom:1%;">Generate</button> <form action="<?php echo base_url('controller/generated_product_wish_list'); ?>" method="post" class="form"> <input type="hidden" id="ids" name="ids" class="ids"> </form> </div> </div> </div> <style> .content-wrapper { min-height: 700px !important; } thead{ background-color:rgb(87,142,190) !important; color:white !important; } #search_list2 { display:none !important; } .ss{ padding-right: 0 !important; padding-left: 0 !important; } .form-control { width:65% !important; height:27px !important; padding: 3px 12px !important; border-radius: 0px !important; //margin-bottom:15px; } label { font-weight: normal; text-align: left; } .hr-line{ border-top: 1px solid #465A81; } .well-sm { padding: 3px !important; border-radius: 0px !important; } input[type="file"] { padding-bottom: 28px !important; height: 25px !important; color:transparent; } .portlet.box.blue-madison { border: 1px solid #fff !important; border-top: 0; background:#fff !important; } #productgrid{ height:auto !important; //overflow-y: scroll; } .my-nav a:hover{ color:black !important; } .navbar-collapse{ padding-right:0px !important; padding-left:0px !important; } .menu-left{ padding-right:0px !important; } .my-nav{ width:100% !important; } .my-nav li{ width:100% !important; } </style> <script> $("#generate").on('click', function () { swal({ title: "Please Select Your PO Type!", type: "warning", showCancelButton: true, confirmButtonText: "Special", confirmButtonColor: "#DD6B55", cancelButtonText: "Normal", closeOnConfirm: false, closeOnCancel: false }, function(isConfirm){ if (isConfirm) { $(".sweet-alert").hide(); $(".sweet-overlay").hide(); window.location.href = "<?php echo base_url('controller/upload_special_po');?>"; } else { $(".sweet-alert").hide(); $(".sweet-overlay").hide(); var ids= $(".ids").val(); //alert(ids); $(".form").submit(); } }); }); </script> <!-----------------datepicker-------------> <script> $(document).ready(function() { //$( "#customer" ).autocomplete({ //source: '<?php echo base_url('request/auto_sea'); ?>', //}); }); function searchname() { var customer = document.getElementById('customer').value; $.ajax({ url:"<?php echo base_url('request/search_by_fetch')?>", dataType: "json", data:{'customer':customer}, type:"POST", async:true, success:function(data) { // alert('hai'); var obj=JSON.parse(data); document.getElementById('customer_id').value=obj[0].customerID; } }); } </script>