EVOLUTION-NINJA
Edit File: transaction_mstr_details_working.php
<?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <div id="myModal" class="reveal-performainvoice"> <div align="center"><h4><b><u>PERFORMA INVOICE</u></b></h4></div> <div style="background:#485b7f;width:17%;height:15%;float:right;"> <img src="<?php echo base_url(); ?>assets/img/logo-big.png" alt="logo" width="230" style="margin-top:5px;"> </div> <div id="alldatadisplay" style="width: 101%;height: 74%;overflow: scroll;"> <div style="float:left;"> <p><b>Phone : (080) 41888298</b></p> <p><b>Fax : (080) 25598299</b></p> <p><b>E-Mail : sales@swansilk.com</b></p> <p><b>Website : www.swansilk.com</b></p> </div> <br><br><br> <div id="performcontent"> </div> <div style="float:left;">SILK JACQUARD FRENCH SLYNGE 20-2044 CJ 1040 FABRIC</div> <div style="float:right;"><b><u>USD FOB BY AIR FREIGHT</u></b></div><br> <div style="float:left;">140 CMS ARTICLE NO: 1984</div><br> <table style="width:50%;" align="center"> <tr><td>APS PEACOCK BLUE</td><td>120.00 MTRS</td><td>32.00</td><td>2333.00</td></tr> </table></br> <div style="float:left;">SILK JACQUARD DAUPHIN SLYNGE 20-5406 CJ 1038 FABRIC</div> <div style="float:right;"><b><u>USD FOB BY AIR FREIGHT</u></b></div></br> <div style="float:left;" class-"pull-left">140 CMS ARTICLE NO: 1977</div></br> <table style="width:50%;" align="center"> <tr><td>ASP GREEN</td><td>120.00 MTRS</td><td>42.00</td><td>5040.00</td></tr> </table> <br><br><br><br> <table style="width:100%;border: 1px solid black;" > <tr><td rowspan="2">Total Qty : 300.00 MTRS</td><td>2333.00</td> <td>9480.00 USD</td></tr> <tr><td colspan="2">nine thousand four hundred eighty and xx/100</td></tr> </table></br> <div class="textbot"> <h4 style="text-align: center; text-transform: uppercase;">quantity plus or minus 100% allowed</h4> <h4 style="text-align: center; text-transform: uppercase;">all bank charges outside india are to the account of buyer</h4> </div> <table style="width:100%;border: 1px solid black;"> <tr><td style="text-transform: uppercase;" >e& o.e: cst:0055976-3 tin:29920016481</td></tr> </table> <div class="textbot" style="padding-top:20px;"> <P><strong>Deco-Textil</strong> "swan house" post box 25210.,40 4th cross,residency road banglore-560025,india phone:(080)41888298,fax:(080)25598299</P></br> <P><strong>BANKERS:</strong> STATE BANK OF INDIA, OVERSEAS BRANCH, SBI LHO CAMPUS, #65, St.MARK'S ROAD, BANGALORE-560001,INDIA.</P></br></br> <table style="width:75%;" align="center"> <tr><td><strong>Prepared by</strong></td><td><strong>Checked By</strong></td><td><strong>Director</td></strong></tr> </table> </div> </div> <a class="close-reveal-modal">×</a> </div> <div id="myModal1" class="reveal-performainvoice"> <div align="center"><h4><b><u>ORDER CONFIRMATION</u></b></h4></div> <div style="background:#485b7f;width:17%;height:15%;float:right;"> <img src="<?php echo base_url(); ?>assets/img/logo-big.png" alt="logo" width="230" style="margin-top:5px;"> </div> <div style="float:left;"> <b>DESIGNER FABRICS<br> 1360-QUEEN STREET, WEST TORONTO,ONT,M6K 1L7,<br> CANADA</b> </div> <br><br><br> <div id="alldatadisplay" style="width: 101%;height: 74%;overflow: scroll;"> <table style="width:100%" border="1"> <tr style="font-weight: bold;"> <td>TERMS OF PAYMENT:<br>Advance Payment</td> <td>DESTINATION:<br>OSLO,NORWAY</td> <td colspan="2">BUYER'S REFERENCE:<br>160617 / 20-06-2016</td> <td>ORDER DATE:<br><span id="dynamicorderdate"></span></td> <td>ORDER NO:<br><span id="dynamicoslnor"></span></td> </tr> </table> <br> <table border="1" style="width:100%"> <tr> <th>WIDTH / SIZE</th><th>QUALITY</th><th>COLOR</th><th>SKU No</th><th>QUANTITY</th><th>RATE/UNIT</th><th>PRICE</th> </tr> <tbody id="orderconfirm_dynamic"> <!--<tr> <td align="center">280 CMS</td> <td align="center" colspan="3">POLY JACQUARD FABRIC DES : PJ 3317<br>ARTICLE NO: D728<br>17J-258<br>14J-368<br>ROSEWOOD</td> <td align="center" colspan="3"><u>USD FOB BY AIR FREIGHT</u><br><br>120.00 YARDS 12.00 USD 1,440.00 USD<br>120.00 YARDS 12.00 USD 1,440.00 USD<br>120.00 YARDS 12.00 USD 1,440.00 USD</td> </tr> <tr> <td align="center">280 CMS</td> <td align="center" colspan="3">POLY JACQUARD FABRIC DES : PJ 3317<br>ARTICLE NO: D728<br>17J-258<br>14J-368<br>ROSEWOOD</td> <td align="center" colspan="3"><u>USD FOB BY AIR FREIGHT</u><br><br>120.00 YARDS 12.00 USD 1,440.00 USD<br>120.00 YARDS 12.00 USD 1,440.00 USD<br>120.00 YARDS 12.00 USD 1,440.00 USD</td> </tr> <tr> <td align="center">140 CMS</td> <td align="center" colspan="3">POLY METALLIC JACQUARD FABRIC DES : PJ 3954<br>ARTICLE NO: D875<br>GOLD</td> <td align="center" colspan="3"><u>USD FOB BY AIR FREIGHT</u><br><br>120.00 YARDS 12.00 USD 1,440.00 USD</td> </tr>--> </tbody> </table><br> <div> <div style="font-size:15px;font-weight:bold;float:left;">Total Quantity<br>960.00 YARDS</div> <div style="font-size:15px;font-weight:bold;float:right;margin-right:10%;">TOTAL VALUE 11,640.00 USD <br> eleven thousand six hundred forty and xx / 100</div> </div><br><br><br> <div style="font-size:15px;font-weight:bold" align="center"> QUANTITY PLUS OR MINUS 10% ALLOWED<br>ALL BANK CHARGES OUTSIDE INDIA ARE TO THE ACCOUNT OF BUYER </div><br> <table border="1" style="width:100%;height:15%;"> <tr> <th>DELIVERY DATE:- 16/01/2017</th> <th>BUYER'S SIGNATURE:</th> <th>SELLERS'S SIGNATURE:</th> </tr> </table> <table style="width:100%;border: 1px solid black;" > <tr><td rowspan="2">Total Qty : 300.00 MTRS</td><td>2333.00</td> <td>9480.00 USD</td></tr> <tr><td colspan="2">nine thousand four hundred eighty and xx/100</td></tr> </table></br> <div class="textbot" style="padding-top:20px;"> <P><strong>Deco-Textil</strong> "swan house" post box 25210.,40 4th cross,residency road banglore-560025,india phone:(080)41888298,fax:(080)25598299</P></br> <P><strong>BANKERS:</strong> STATE BANK OF INDIA, OVERSEAS BRANCH, SBI LHO CAMPUS, #65, St.MARK'S ROAD, BANGALORE-560001,INDIA.</P></br> </div> </div> <a class="close-reveal-modal">×</a> </div> <div id="myModal2" class="reveal-performainvoice"> <div align="center"><h4><b><u>ORDER INPUT DETAILS</u></b></h4></div> <div style="background:#485b7f;width:17%;height:10%;float:right;"> <img src="<?php echo base_url(); ?>assets/img/logo-big.png" alt="logo" width="230" style="margin-top:5px;"> </div> <div style="float:left;font-size:85%;margin-right:2%;"> <b>Deco-Textil</b><br> <b>"SWAN HOUSE" NO:40, 4th Cross, Residency Road,</b><br> <b>Bangalore - 560025</b> </div> <div style="float:left;font-size:85%;margin-right:25%;"> <b>Order Date :- PURCHASE O</b><br> <b>Order Rec Date :- 05/10/2016</b><br> <b>Ref / Source :- 05/10/2016</b> </div> <div style="float:left;font-size:85%;"> <b>Contract Type :- FOB</b><br> <b>Currency :- USD</b> </div> <br><br><br> <div id="alldatadisplay" style="width: 101%;height: 74%;overflow: scroll;"> <div id="subnumbersdynamic"></div> </div> <a class="close-reveal-modal">×</a> </div> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Transaction Input details </h3> <?php $this->load->view('templates/nav_menu'); ?> <form action="<?php echo base_url(); ?>marketing/transactions_order_input_demo" method="post" class="form-horizontal"> <b>To insert data click here:</b> <input type="submit" name="Insert" value="Insert" /><br><br> </form> <!-- END PAGE HEADER--> <!-- BEGIN DASHBOARD STATS --> <!--<div class="caption"> <i class="fa fa-globe" style="border:1px solid"></i>Transaction Input details </div>--> <!--<a href="javascript:;" class="reload"> </a>--> <div id = "jaytab" class="jaytab"> <table id="list2"></table> <div id="pager2"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <!-- BEGIN FOOTER --> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <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_id1').value=obj.customerID; } }); } </script> <script> function adddetails() { var customer=$("#customer").val(); var date=$("#date").val(); var product_type=$("#product_type").val(); var description=$("#description").val(); var size=$("#size").val(); var min_quality=$("#min_quality").val(); var customer_id=$("#customer_id").val(); var currency= $("#currency").val(); var article=$("#article").val(); var design=$("#design").val(); var price=$("#price").val(); var image=$("#image").val(); var reference= $("#reference").val(); var terms=$("#terms").val(); var quality= $("#quality").val(); var color=$("#color").val(); var composition=$("#composition").val(); var note=$("#note").val(); $.ajax({ url:"<?php echo base_url('request/customer_insert')?>", type:"POST", data:{'customer':customer,'date':date,'product_type':product_type,'description':description,'size':size,'min_quality':min_quality,'customer_id':customer_id,'currency':currency,'article':article,'design':design,'price':price,'image':image,'reference':reference,'terms':terms,'quality':quality,'color':color,'composition':composition,'note':note}, async:false, success:function(data){ alert('Successfully Added.'); //$("#editmodlist2").remove(); window.location.reload(); } }); } </script> <style> .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; } </style> <script> function getDesignAndQuality(articleNo) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getDesignAndQuality", data: "articleNo=" + articleNo, success: function (data) { var objData = jQuery.parseJSON(data); document.getElementById("design").value = objData.design; document.getElementById("quality").value = objData.quality; } }); } </script> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/jquery.jqGrid.min.js'); ?>"></script> <!-- This is the localization file of the grid controlling messages, labels, etc. <!-- We support more than 40 localizations --> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/i18n/grid.locale-en.min.js'); ?>"></script> <!-- A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom --> <!-- The link to the CSS that the grid needs --> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap-ui.min.css'); ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/bootstrap-datepicker.min.css"/> <script src="<?php echo base_url();?>assets/js/bootstrap-datepicker.min.js"></script> <script> $('.datepicker').datepicker({ format: 'yyyy/mm/dd', }); </script> <style type="text/css"> .ss{ padding-right: 0 !important; padding-left: 0 !important; } 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; } input[type=file] { display: none; } .ui-jqgrid .ui-jqgrid-caption { text-align: left; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar { padding: .1em .1em; min-height: 35px; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: -9px; } #sData { height: 27px; } #cData { height: 27px; } #dData { height: 27px; } #eData { height: 27px; } </style> <style> </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script> var swan_id=''; $(document).ready(function (){ //var swan_id=''; jQuery("#list2").jqGrid({ url:'<?php echo base_url('marketing/getorder_details')?>', mtype : "post", datatype: "json", colNames:['Id','OSL No','File No', 'Mode Of Order', 'Party Order No','Performa Invoice','Order Confirmation','Order Input Details'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'oslNo',index:'oslNo', width:50,editable:true,width:100}, {name:'fileNo',index:'fileNo',editable:true, width:100}, {name:'orderMode',index:'orderMode',editable:true,editrules:{required: true},editoptions: {size:10, maxlength: 10}, width:100}, {name:'orderNo',index:'orderNo',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name:'preview1',index:'preview1',editable:true, width:100,formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('marketing/preview')?>'}}, {name:'preview2',index:'preview2',editable:true, width:100,formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('marketing/orederconfirmation')?>'}}, {name:'preview3',index:'preview3',editable:true, width:100,formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('marketing/orderinput')?>'}}, ], rowNum:50, rowTotal: 20000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager2", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", //multiple: true, loadonce:true, caption:"Transactions Order Details", subGrid: true, subGridRowExpanded: function(subgrid_id, row_id) { // we pass two parameters // subgrid_id is a id of the div tag created within a table // the row_id is the id of the row // If we want to pass additional parameters to the url we can use // the method getRowData(row_id) - which returns associative array in type name-value // here we can easy construct the following var subgrid_table_id; // alert(row_id); swan_id=row_id; //alert(swan_id); subgrid_table_id = subgrid_id+"_t"; jQuery("#"+subgrid_id).html("<table id='"+subgrid_table_id+"' class='scroll'></table>"); jQuery("#"+subgrid_table_id).jqGrid({ url:"<?php echo base_url('marketing/subgrid');?>/s"+row_id+"/", //data:{'sub_id':123}, mtype : "get", datatype: "json", colNames: ['Id','Article No','Unit','Width','Sub Order Type','Description','Total Quantity','Total Value','Enable'], colModel: [ {name:'id',index:'id',hidden:true, width:50,editable:true,width:20}, {name:'articleNo',index:'articleNo', width:80,height:12}, {name:'unit',index:'unit', width:80,height:12}, {name:'width',index:'width', width:80,height:12}, {name:'subOrderType',index:'subOrderType', width:150,height:12}, {name:'description',index:'description', width:250,height:12}, {name:'totalQuantity',index:'totalQuantity', width:100,height:12}, {name:'totalValue',index:'totalValue', width:100,height:12}, { name: 'enbl', index: 'enbl', width: 100, align: 'center', formatter: 'checkbox', editoptions: { value: '1:0' }, formatoptions: { disabled: false }, cellattr: function (rowId, tv, rawObject, cm, rdata) { // if (...) { //var row_id = $(this).closest('tr').attr('id'); return ' onclick="fun($(this))" '; // } else { // return 'style="color:black"'; // } } } ], height: '100%', rowNum:20000000000000000, sortname: 'num', sortorder: "asc", }); } }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list2").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); var ch = jQuery(this).find('#'+id+' input[type=checkbox]').prop('checked'); alert(ch); $("#list2").jqGrid('navGrid','#pager2', {edit:false,add:false,del:false,search:true,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); $("#list2").navButtonAdd('#pager2', { caption:"Edit", buttonicon:"ui-icon-pencil", onClickButton: editRow, position: "last", title:"", cursor: "pointer", id:"client_edit" } ); $("#list2").navButtonAdd('#pager2', { caption:"Delete", buttonicon:"ui-icon-trash", onClickButton: deleteRow, position: "last", title:"", cursor: "pointer", id:"client_delete" } ); }); function fun(rowId) { // var rowid = 123; var id = rowId.closest('tr').attr('id'); //alert(id); var confirmMsg= confirm("Do You Want To Confirm!"); if (confirmMsg==true) { $.ajax({ url:"<?php echo base_url('marketing/add_confirmation')?>", type:"POST", data:{'id':id}, success:function(data){ if(data==""){ alert('Successfully Updated.'); $("#editmodlist2").remove(); $("#list2").trigger("reloadGrid"); window.location.reload(); } else{ window.location.reload(); } } }); } else if (confirmMsg==false) { $.ajax({ url:"<?php echo base_url('marketing/add')?>", type:"POST", data:{'id':id}, success:function(data){ if(data==""){ alert('Successfully Updated.'); $("#editmodlist2").remove(); $("#list2").trigger("reloadGrid"); window.location.reload(); } else{ window.location.reload(); } } }); } } function editRow() { // Get the currently selected row var row = $("#list2").jqGrid('getGridParam','selrow'); //alert('hai'); if( row != null ) $("#list2").jqGrid('editGridRow',row, { modal:true,jqModal:true, recreateForm: true, beforeSubmit: function(postdata,formid){ var id=$("#id").val(); //alert(id); var oslNo=$("#oslNo").val(); var fileNo=$("#fileNo").val(); var orderMode=$("#orderMode").val(); var orderNo=$("#orderNo").val(); //alert(id); $.ajax({ url:"<?php echo base_url('marketing/customer_update')?>", type:"POST", data:{'id':id,'oslNo':oslNo,'fileNo':fileNo,'orderMode':orderMode,'orderNo':orderNo}, async:false, success:function(data){ if(data==""){ alert('Successfully Updated.'); $("#editmodlist2").remove(); $("#list2").trigger("reloadGrid"); window.location.reload(); } else{ window.location.reload(); } } }); }, closeAfterEdit: true, reloadAfterSubmit:false, afterSubmit : false }); else $( "#dialogSelectRow" ).dialog(); } function deleteRow() { // Get the currently selected row var row = $("#list2").jqGrid('getGridParam','selrow'); $("#id").val(row); // A pop-up dialog will appear to confirm the selected action if( row != null ) $("#list2").jqGrid( 'delGridRow', row, { modal:true,jqModal:true, recreateForm: true, beforeSubmit: function(postdata,formid){ $.ajax({ url:"<?php echo base_url('marketing/customer_delete')?>", type:"POST", data:{'id':row}, async:false, success:function(data){ if(data==""){ //alert('Successfully Updated.'); $("#delmodlist2").remove(); window.location.reload(); //$("#list2").trigger("reloadGrid"); } else{ // alert('Successful'); $("#delmodlist2").remove(); window.location.reload(); $("#list2").trigger("reloadGrid"); } } }); }, reloadAfterSubmit:false, closeAfterDelete: true, afterSubmit : function(response, postdata) { } }); else $( "#dialogSelectRow" ).dialog(); } </script> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <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> <style> #list2_122_t { height:0px !important; } list2_136_t { height:12px !important; } .scroll { height:12px !important; } .ui-jqgrid-btable { } .ui-common-table { height:12px !important; } </style>