EVOLUTION-NINJA
Edit File: add_transaction_demo.php
<?php // echo '<pre>'; print_r($orderDetails);exit; if(isset($_POST['orderID']) && $_POST['orderID']!= ""){ $orderID = $_POST['orderID']; } ?> <?php echo $this->session->flashdata('msg112');?> <script> var rowCount = 1; function convertDate(dateVar) { var date = new Date(dateVar); return((date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear()); } function addMoreRows(frm) { rowCount++; var deliveryDate = $('#deliveryDate').val(); var unitPrice = $('#unitPrice_1').val(); if (!unitPrice) { unitPrice = ""; } $('#subShadeCount').val(rowCount); var newRow = '<tr id="rowCount' + rowCount + '" class="rowCount"><td><input type="hidden" name="shadeID[' + rowCount + ']" value="" /><input type="text" name="ourShade[' + rowCount + ']" id="" class="form-control" style="height: 30px;width:120px;" /></td> <td><input type="text" name="buyerShade[' + rowCount + ']" id="" class="form-control" style="height: 30px;width:120px;" /></td> <td><input type="text" name="quantity[' + rowCount + ']" id="" class="form-control quantity" style="height: 30px;width:120px;" /></td> <td><input type="text" name="unitPrice[' + rowCount + ']" value="' + unitPrice + '" id="unitPrice_' + rowCount + '" class="form-control unitPrice" style="height: 30px;width:120px;" readonly="readonly" /></td> <td><input type="text" name="foreignValue[' + rowCount + ']" id="foreignValue_' + rowCount + '" class="form-control foreignValue" style="height: 30px;width:120px;" /></td> <td><input type="text" name="deliveryDate[' + rowCount + ']" value="' + deliveryDate + '" id="" class="form-control delivery_date" style="height: 30px;width:120px;" readonly="readonly" /></td> <td><input type="text" name="skuNo[' + rowCount + ']" id="" class="form-control" style="height: 30px;width:120px;" /></td><td><a onclick="removeRow(' + rowCount + ');" class="btn red addButton" id="removeButton"> <i class="fa fa-minus"></i></a></td></tr>'; // jQuery('#dynamicTbody').append(recRow); $('#tbl_suborders tr:last').after(newRow); $('#unitPrice_1').attr('readonly', false); } function removeRow(removeNum) { jQuery('#rowCount' + removeNum).remove(); rowCount--; $('#subShadeCount').val(rowCount); } function getCustomerData(str) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getCustomerData", data: "fileNo=" + str, success: function (data) { var objData = jQuery.parseJSON(data); document.getElementById("partyName").value = objData.customerName; document.getElementById("bankerName").value = objData.bankerName; document.getElementById("agentName").value = objData.agentName; document.getElementById("commision").value = objData.agentCommission; var dateField = objData.agencyFromDate; var dateAr = dateField.split('-'); var validityDate = dateAr[2] + '/' + dateAr[1] + '/' + dateAr[0]; if(validityDate == '00/00/0000'){ validityDate=""; } document.getElementById("validityDate").value = validityDate; } }); } 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; } }); } function getSubOrderDetails(subOrderID, generate) { //alert(subOrderID); var subCodeText = parseInt($("#subCode option:selected").text()); $('#selectedSubCode').val(subCodeText); // alert($('#selectedSubCode').val()); var generate = generate; if (subOrderID == "") { subOrderID = $('#subCode').val(); } if (generate == 1) { var newSubID = parseInt($('#lastSubID').val()); var newSubCode = parseInt($('#lastSubCode').val()); var check = newSubID + 1; $('#generateSubCode').val('yes'); if (!$('#subCode option[value="' + check + '"]').length > 0) { //$('#subCode').append($('<option>', {value: newSubID + 1, text: newSubCode + 1})); } // $("#subCode option").filter(function () { // // return this.text == newSubID; // }).attr('selected', true); } else { $('#generateSubCode').val('no'); } $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getSubOrderDetails", data: "subOrderID=" + subOrderID, success: function (data) { var objData = jQuery.parseJSON(data); //START : POPULATE THE VALUES // //alert(objData.subOrderID); if (objData.id > 0) { if(objData.orderConfirm == 'Yes'){ $("#generate_sub_order").show(); } } else { $("#generate_sub_order").hide(); rowCount = 0; } $("#subOrderID").val(objData.id); $("#subOrderType").val(objData.subOrderType); $("#unit").val(objData.unit); parmissionunits1(objData.subOrderType); if (generate == 1) { $("#articleNo").val(""); $("#design").val(""); $("#quality").val(""); var optionVal = objData.articleNo; $("#articleNo option[value*='" + optionVal + "']").prop('disabled', true); //$('this''').find("option[value*='Sold Out']").prop("readonly", true); } else { $("#articleNo").val(objData.articleNo); $("#design").val(objData.design); $("#quality").val(objData.quality); } $("#width").val(objData.width); $("#description").val(objData.description); $("#marketingInst").val(objData.marketingInst); //$("#paymentTerms").val(objData.paymentTerms); $("#contractType").val(objData.contractType); $("#totalQuantity").val(objData.totalQuantity); $("#totalValue").val(objData.totalValue); $("#discount").val(objData.discount); $("#netValue").val(objData.netValue); $("#indianValue").val(objData.indianValue); $("#freightForwarder").val(objData.freightForwarder); $("#freightType").val(objData.freightType); $("#deliveryMode").val(objData.deliveryMode); $("#deliveryPoint").val(objData.deliveryPoint); $("#packingType").val(objData.packingType); $("#labelTerms").val(objData.labelTerms); $("#packingInstructions").val(objData.packingInstructions); var inspectionDate = convertDate(objData.inspectionDate); $("#inspectionDate").val(inspectionDate); $("#agencyAddress").val(objData.agencyAddress); var orderConfirmDate = objData.orderConfirmDate; if(orderConfirmDate){ var dateAr = orderConfirmDate.split('-'); var newDate = dateAr[2] + '/' + dateAr[1] + '/' + dateAr[0]; //alert(newDate); $("#orderConfirmDate").val(newDate); } else{ $("#orderConfirmDate").val(); } if (objData.orderConfirm == 'No') { //$("#orderConfirmCheck").hide(); // $("#orderConfirmCheck").removeClass('check'); } else if (objData.orderConfirm == 'Yes') { //$('#div_suborder.form-control').attr('readonly','true'); $("#div_suborder :input").attr("readonly", true); //$("#orderConfirmCheck").show(); $('#submitOrder').hide(); } //END : POPULATE THE VALUES // //var arr = $.makeArray(objData.shades); //START : ASSIGN THE SHADES INNER ARRAYS // var count = 0; var shades = new Array(); $(objData.shades).each(function (i, val) { shades[count] = new Array(); $.each(val, function (k, v) { shades[count][k] = v; }); count++; }); //START : ASSIGN THE SHADES INNER ARRAYS // //START : THIS PART DISPLAYS THE ADDED SUBSHADES IN THE GRID// var divContent = "" var j = 1; var deliveryDate; var strReadOnly; var secondRowRead; $('.rowCount').hide(); jQuery.each(shades, function (index, shade) { deliveryDate = shade['deliveryDate']; var dateAr = deliveryDate.split('-'); deliveryDate = dateAr[2] + '/' + dateAr[1] + '/' + dateAr[0]; $('#hiddenUnitPrice').val(shade['unitPrice']); if(j == 1){ strReadOnly = ''; secondRowRead = ''; } else{ strReadOnly = 'readonly="readonly"'; secondRowRead = 'readOnlyData'; } divContent = divContent + '<tr id="rowCount' + j + '" class="rowCount"> <td><input type="hidden" name="shadeID['+j+']" value="' + shade['shadeID'] + '" /><input type="text" name="ourShade['+j+']" id="" value="' + shade['ourShade'] + '" class="form-control" style="height: 30px;width:120px;" /></td> <td><input type="text" name="buyerShade['+j+']" value="' + shade['buyerShade'] + '" id="" class="form-control" style="height: 30px;width:120px;" /></td> <td><input type="text" name="quantity['+j+']" id="" value="' + shade['quantity'] + '" class="form-control quantity" style="height: 30px;width:120px;" /></td> <td><input type="text" '+ strReadOnly +' name="unitPrice['+j+']" value="' + shade['unitPrice'] + '" id="unitPrice_' + j + '" class="form-control unitPrice '+ secondRowRead +' " style="height: 30px;width:120px;" /></td> <td><input type="text" name="foreignValue['+j+']" value="' + shade['foreignValue'] + '" id="foreignValue_' + j + '" class="form-control foreignValue" style="height: 30px;width:120px;" /></td> <td><input type="text" name="deliveryDate['+j+']" value="' + deliveryDate + '" id="" class="form-control delivery_date" style="height: 30px;width:120px;" readonly="readonly" /></td> <td><input type="text" name="skuNo['+j+']" value="' + shade['skuNo'] + '" id="" class="form-control" style="height: 30px;width:120px;" /></td> <td><a onclick="removeRow(' + j + ');" class="btn red addButton" id="removeButton"> <i class="fa fa-minus"></i></a></td></tr>'; j++; }); if (j <= 1) { $('#subShadeCount').val(1); var deliveryDate = $('#deliveryDate').val(); rowCount=1; divContent = divContent + '<tr id="rowCount' + 1 + '" class="rowCount"> <td><input type="hidden" name="shadeID['+1+']" value="" /><input type="text" name="ourShade['+1+']" id="" value="" class="form-control" style="height: 30px;width:120px;" /></td> <td><input type="text" name="buyerShade['+j+']" value="" id="" class="form-control" style="height: 30px;width:120px;" /></td> <td><input type="text" name="quantity['+1+']" id="" value="" class="form-control quantity" style="height: 30px;width:120px;" /></td> <td><input type="text" name="unitPrice['+1+']" value="" id="unitPrice_' + 1 + '" class="form-control unitPrice " style="height: 30px;width:120px;" /></td> <td><input type="text" name="foreignValue['+1+']" value="" id="foreignValue_' + 1 + '" class="form-control foreignValue" style="height: 30px;width:120px;" /></td> <td><input type="text" name="deliveryDate['+1+']" value="'+deliveryDate+'" id="" readonly="readonly" class="form-control delivery_date" style="height: 30px;width:120px;" /></td> <td><input type="text" name="skuNo['+1+']" value="" id="" class="form-control" style="height: 30px;width:120px;" /></td> <td><a onclick="removeRow(' + 1 + ');" class="btn red addButton" id="removeButton"> <i class="fa fa-minus"></i></a></td></tr>'; } $('#subShadeCount').val(j - 1); $('#dynamicTbody').html(divContent); //END : THIS PART DISPLAYS THE ADDED SUBSHADES IN THE GRID// if (objData.orderConfirm == 'Yes') { $("#div_suborder :input").attr("readonly", true); $('#cancel').attr('readonly', false); //$("#orderConfirmCheck").show(); //$("#orderConfirmCheck").addClass("check"); $('#orderConfirmation').attr("checked", true); } else { $('#orderConfirmation').attr("checked", false); $("#div_suborder :input").attr("readonly", false); $(".sub_form_controll").attr("readonly", true); $('#cancel').attr('readonly', false); $('#submitOrder').show(); $('#submitOrder').text('Update Order'); } $('#design').attr("readonly", true); $('#quality').attr("readonly", true); $('.delivery_date').attr("readOnly", true); $('.readOnlyData').attr("readOnly", true); } }); if (generate == 1) { var newSubID = parseInt($('#lastSubID').val()); var newSubCode = parseInt($('#lastSubCode').val()); $("#subCode option").filter(function () { return this.text == newSubCode; }).attr('selected', true); //var dis = $("#articleNo").attr("readonly"); alert("Please Select the Article Number"); $("#articleNo").attr("readonly", false); $('#submitOrder').show(); $('#submitOrder').text('Update Order'); } } function showLCTerms(pterm) { //alert(pterm); if (pterm == 'LC') { //$('#tab_lcterms').attr('aria-expanded', 'true'); //$('#nav-tabs').tabs(); //$('.tab-content').nav-tabs('select', 'tab_1_4'); $('#tab_lcterms').find('[href]').attr('href', '#tab_1_4'); $('#tab_1_1').removeClass('active'); $('#tab_productDescription').removeClass('active'); $('#tab_lcterms').addClass('active'); $('#tab_1_4').addClass('active'); $('#tab_1_4').addClass('in'); $('#tab_lcterms').show(); } else { //$('#tab_lcterms').attr("disabled", true); //$('#tab_lcterms').find('[href]').attr('href', ''); $('#tab_lcterms').hide(); //alert(hrf); } } </script> <script> $(function () { <?php if(isset($_POST['orderConfirmation'])&& ($_POST['orderConfirmation'] == 'on')){ ?> $('#orderConfirmation').attr("checked", true); <?php } else{ ?> $('#orderConfirmation').attr("checked", false); <?php }?> $('.delivery_date').attr("readonly", true); $("#generate_sub_order").hide(); $('.quantity').live('change', (function () { var totalQuantity = 0; var quantityVal; $('.quantity').each(function () { quantityVal = parseFloat($(this).val()); if (!isNaN(quantityVal)) { totalQuantity += quantityVal; } }) $('#totalQuantity').val(totalQuantity); updateTotalValue(); }) ); $('#discount').live('change', (function () { var discount = $(this).val(); var totalValue = parseFloat($('#totalValue').val()); var discount; var netValue = totalValue; var exRate = parseFloat($('#exRate').val()); if (!(isNaN(discount)) && (discount > 0)) { discount = totalValue * (discount / 100); netValue = totalValue - discount; } var indianValue = netValue * exRate; $('#netValue').val(netValue); $('#indianValue').val(indianValue); }) ); $('#exRate').live('change', (function () { var exRate = parseFloat($(this).val()); var netValue = parseFloat($('#netValue').val()); var indianValue = exRate * netValue; $('#indianValue').val(indianValue); }) ); $('#deliveryDate').live('change', (function () { $('.delivery_date').val($(this).val()); }) ); function updateTotalValue() { var totalValue = 0; var subTotal = 0; var quantity; var unitPrice; var discount = parseFloat($('#discount').val()); var discount = 0; var netValue; $('.rowCount').each(function () { quantity = parseFloat($(this).find('.quantity').val()); unitPrice = parseFloat($(this).find('.unitPrice').val()); if (!(isNaN(quantity) && isNaN(unitPrice))) { subTotal = quantity * unitPrice; } if (!isNaN(subTotal)) { totalValue += subTotal; $(this).find('.foreignValue').val(subTotal); } }); netValue = totalValue; if (!(isNaN(discount)) && (discount > 0)) { discount = totalValue * (discount / 100); netValue = totalValue - discount; } var exRate = $('#exRate').val() $('#totalValue').val(totalValue); $('#netValue').val(netValue); var indianValue = exRate * netValue; $('#indianValue').val(indianValue); } $('.unitPrice').live('change', (function () { var newUnitPrice = $(this).val(); $('.unitPrice').val(newUnitPrice); updateTotalValue(); }) ); $('#frmOrder').submit(function () { //return false; }); $('#generate_sub_order1').live('click', function () { var subCodeID = $('#subCode').val(); var nextSubCode = $('#nextSubCode').val(); var orderID = $('#orderID').val(); //var lastSubID = $('#lastSubID').val(); //var lastSubCode = $('#lastSubCode').val(); //alert(lastSubID +'--'+lastSubCode) $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/generateSubOsl", data: {'subCodeID': subCodeID, 'nextSubCode': nextSubCode, 'orderID': orderID}, success: function (data) { alert('New entry with SubCode' + nextSubCode + ' has been generated'); location.reload(); //getSubOrderDetails(lastSubID); //$('subCode').append($('<option>', {value:lastSubID + 1, text:lastSubCode +1})); //getSubOrderDetails(nextSubCode); } }); //alert(subCode); }); //<?php // foreach ($getalltd as $results) { // $result[] = $results->orderMode; // } // $existed_specif = array_unique($result); // ?> // var availableTags = //<?php //echo '["' . implode('", "', $existed_specif) . '"]' ?>; // $("#modeOfOrder").autocomplete({ // source: availableTags // }); $('#btnGenSubOsl').click(function(){ alert('generate function'); }); }); </script> <script> function osltypes(str) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/get_osl_subcode_first", data: "orderType=" + str, success: function (data) { var objData = jQuery.parseJSON(data); document.getElementById("oslNo").value = objData.osl; document.getElementById("subCode").value = 1; } }); } function displayfilterfileno(str) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/disp_alpha_filenos", data: "alphachar=" + str, success: function (data) { document.getElementById("fileNo").innerHTML = data; } }); } function displayOslDetails(orderID) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getOslDetails", data: "orderID=" + orderID, success: function (data) { //$('#osl_details_popup').html('1212'); //$('#dynamicdatamster').html(data); document.getElementById("dynamicdatamster").innerHTML = data; //popup_details //alert(data); //document.getElementById("fileNo").innerHTML = data; } }); } </script> <script> $(function () { $("#orderDate").datepicker({ dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true }); }); $(function () { $("#orderRecDate").datepicker({ dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true }); }); $(function () { $("#deliveryDate").datepicker({ dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true }); }); $(function () { var hours = new Date().getHours(); var minutes = new Date().getMinutes(); var getSeconds = new Date().getSeconds(); $("#orderConfirmDate").datepicker({ dateFormat: "dd/mm/yy "+hours+":"+minutes+":"+getSeconds+"", changeMonth: true, changeYear: true }); }); $(function () { $(".datePicker").datepicker({ dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true }); }); $(".datePicker").live("focusin", function () { $(this).datepicker({ dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true, inline: true }); }); </script> <!--test start--> <script> function storethistxtdata() { document.getElementById("marketingInst").value=document.getElementById("midivtext").value; } </script> <script> function parmissionunits(str){ $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getProductType", data: "fabricType=" + str, success: function (data) {//alert(data); //document.getElementById("sslShade").innerHTML = data; document.getElementById("unit").innerHTML=""; document.getElementById("unit").innerHTML="<option value=''>Select</option>"; if(data=="FABRIC") { var origdata = "YARDS,MTRs"; document.getElementById("changewss").innerHTML="Width:"; } else if(data=="MADEUPS") { var origdata = "No(s),PAIRS,PCS,SETS"; document.getElementById("changewss").innerHTML="Size:"; } var spdatas = origdata.split(","); for(var i=0;i<spdatas.length;i++) { document.getElementById("unit").innerHTML+="<option value="+spdatas[i]+">"+spdatas[i]+"</option>"; } } }); } function parmissionunits1(str){ $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getProductType", data: "fabricType=" + str, success: function (data) {//alert(data); //document.getElementById("sslShade").innerHTML = data; if(data=="FABRIC") { document.getElementById("changewss").innerHTML="Width:"; } else if(data=="MADEUPS") { document.getElementById("changewss").innerHTML="Size:"; } } }); } </script> <div id="textboxpopup_marketInstruct" class="reveal-modal_mi"> <textarea style="width: 100%; height: 95%" id="midivtext" name="midivtext"></textarea> <a onclick="storethistxtdata()" class="close-reveal-modal btn" style="margin-top: 27%; margin-right: 8%; color: #FFFFFF; background: #485b7f;">OK</a> </div> <!--test end--> <?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <style> .control-label { font-size: 11.5px; } </style> <?php $this->load->view('marketing/osl_details_data'); ?> <div class="page-content-wrapper"> <div class="page-content"> <?php echo $this->session->flashdata('msg112');?> <!-- BEGIN PAGE HEADER--> <h3 class="page-title">Transaction Order Input</h3> <div class="page-bar"> <ul class="page-breadcrumb"> <li><i class="fa fa-home"></i> <a href="dashboard.php">Home</a> <i class="fa fa-angle-right"></i> Transaction Order Input</li> </ul> </div> <!-- END PAGE HEADER--> <!-- BEGIN DASHBOARD STATS --> <div class="portlet-body form"> <!-- BEGIN FORM--> <form id="frmOrder" method="post" action="<?php echo base_url(); ?>marketing/transactions_order_input_demo" class="form-horizontal"> <div class="form-body"> <div class="row"> <div class="col-md-12"> <div class="portlet light bg-inverse"> <div class="portlet-title"> <div class="caption"> <span class="caption-subject font-red-sunglo bold uppercase">Add Transaction</span> <span class="caption-helper"></span> </div> </div> <div class="row"> <div class="col-md-12"> <div class="row"> <div class="col-md-2"></div> <div class="col-md-10"> <div class="form-group form-md-radios"> <div class="md-radio-inline"> <div class="md-radio"> <input type="hidden" name="orderTypeOld" value="<?= isset($orderDetails->orderType) ? $orderDetails->orderType : "" ?>"> <input type="radio" id="radio6" name="orderType" value="OSL" <?php if ((isset($orderDetails->orderType) && $orderDetails->orderType == "OSL")||(isset($_POST['orderType'])&&($_POST['orderType'] == "OSL"))) { echo "checked='checked'"; } if (isset($orderID) && $orderID>0) { echo " disabled "; } ?> onclick="osltypes(this.value)" class="md-radiobtn"> <label for="radio6"> <span class="inc"></span> <span class="check"></span> <span class="box"></span> OSL </label> </div> <div class="md-radio"> <input type="radio" id="radio7" name="orderType" value="SAM" <?php if ((isset($orderDetails->orderType) && $orderDetails->orderType == "SAM")||(isset($_POST['orderType'])&&($_POST['orderType'] == "SAM"))) { echo "checked='checked'"; } if (isset($orderID) && $orderID>0) { echo " disabled "; } ?> onclick="osltypes(this.value)" class="md-radiobtn"> <label for="radio7"> <span class="inc"></span> <span class="check"></span> <span class="box"></span> SD </label> </div> <div class="md-radio"> <input type="radio" id="radio8" name="orderType" value="STK" <?php if ((isset($orderDetails->orderType) && $orderDetails->orderType == "STK")||(isset($_POST['orderType'])&&($_POST['orderType'] == "STK"))) { echo "checked='checked'"; } if (isset($orderID) && $orderID>0) { echo " disabled "; } ?> onclick="osltypes(this.value)" class="md-radiobtn"> <label for="radio8"> <span></span> <span class="check"></span> <span class="box"></span> Stock </label> </div> <!-- <div class="md-radio"> <input type="radio" id="radio9" name="orderType" value="PSL" <?php if ((isset($orderDetails->orderType) && $orderDetails->orderType == "PSL")||(isset($_POST['orderType'])&&($_POST['orderType'] == "PSL"))) { echo "checked='checked'"; } if (isset($orderID) && $orderID>0) { echo " disabled "; } ?> onclick="osltypes(this.value)" class="md-radiobtn"> <label for="radio9"> <span></span> <span class="check"></span> <span class="box"></span> Proposal </label> </div> --> </div> <?php validationfn(form_error('orderType')); ?> </div> </div> </div> <!--/row--> </div> </div> </div> <div class="portlet light bg-inverse"> <div class="portlet-title"> <div class="caption"> <span class="caption-subject font-red-sunglo bold uppercase">OSL</span> <span class="caption-helper"></span> </div> <?php if(empty($edit_data2->oslNo)){ ?> <input type="hidden" id="subid" name="subid" value=""> <?php } else {?> <input type="hidden" id="subid" name="subid" value="<?php echo $edit_data1->id; ?>"><?php } ?> </div> <div class="row"> <div class="col-md-12"> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label class="control-label col-md-5">OSL No:</label> <div class="col-md-7"> <input type="hidden" id="generateSubCode" name="generateSubCode" value=""> <input type="hidden" id="hiddenUnitPrice" name="hiddenUnitPrice" value=""> <input type="hidden" name="orderID" id="orderID" value="<?= (isset($orderID) && ($orderID != "")) ? $orderID : ""; ?>"> <?php if(empty($edit_data2->oslNo)){ ?> <input type="text" id="oslNo" name="oslNo" class="form-control" value="<?= isset($orderDetails->oslNo) ? $orderDetails->oslNo : set_value('oslNo') ?>" readonly="readonly"> <?php } else {?> <input type="text" id="oslNo" name="oslNo" class="form-control" value="<?php echo $edit_data2->oslNo; ?>" readonly="readonly"> <?php } ?> <?php validationfn(form_error('oslNo')); ?> </div> </div> <div class="form-group"> <label class="control-label col-md-5">File No:</label> <div class="col-md-7"> <div class="input-group"> <div class="input-group-btn"> <?php if(empty($edit_data2->oslNo)){ ?> <select name="qbweights" class="form-control" style="width: 40px;" name="atozalpha" id="atozalpha" onchange="displayfilterfileno(this.value)" <?php if(isset($orderID)) echo 'readonly="readonly"';?>> <?php $letters = range('a', 'z'); foreach ($letters as $alphaele) { ?> <option <?php if ((isset($orderDetails->fileNo) && (strtoupper($orderDetails->fileNo[0]) == strtoupper($alphaele)))||((isset($_POST['qbweights']))&&($_POST['qbweights'] == strtoupper($alphaele)))) echo ' selected '; ?> value="<?php echo strtoupper($alphaele); ?>" <?php echo set_select('atozalpha', strtoupper($alphaele)); ?>><?php echo strtoupper($alphaele); ?></option> <?php } ?> </select> <?php } else {?> <select name="qbweights" class="form-control" style="width: 40px;" name="atozalpha" id="atozalpha" onchange="displayfilterfileno(this.value)" <?php if(isset($orderID)) echo 'readonly="readonly"';?>> <?php $letters = range('a', 'z'); foreach ($letters as $alphaele) { ?> <option <?php if ((isset($orderDetails->fileNo) && (strtoupper($orderDetails->fileNo[0]) == strtoupper($alphaele)))||((isset($_POST['qbweights']))&&($_POST['qbweights'] == strtoupper($alphaele)))) echo ' selected '; ?> value="" <?php echo set_select('atozalpha', strtoupper($alphaele)); ?>><?php echo strtoupper($alphaele); ?></option> <?php } ?> </select> <?php } ?> </div> <?php if(empty($edit_data2->fileNo)){ ?> <select onchange="getCustomerData(this.value)" id="fileNo" style="width: 133px;" name="fileNo" class="form-control" <?php if(isset($orderID)) echo 'readonly="readonly"';?>> <option value="">Select</option> <?php if (isset($orderDetails->fileNo)) { echo '<option selected value=' . $orderDetails->fileNo . '>' . $orderDetails->fileNo . '</option>'; } else if ((isset($_POST['fileNo']))) { echo '<option selected value=' . $_POST['fileNo'] . '>' . $_POST['fileNo'] . '</option>'; }else if ($this->input->post('atozalpha')) { $this->db->like('customerID', "" . $this->input->post('atozalpha') . "", 'after'); $query = $this->db->get('customer_master'); foreach ($query->result() as $rrr) { ?> <option value="<?php echo $rrr->customerID; ?>" <?php echo set_select('fileNo', $rrr->customerID); ?>><?php echo $rrr->customerID; ?></option> <?php } } ?> </select> <?php } else {?> <select onchange="getCustomerData(this.value)" id="fileNo" style="width: 133px;" name="fileNo" class="form-control" <?php if(isset($orderID)) echo 'readonly="readonly"';?>> <option value="<?php echo $edit_data2->fileNo; ?>"><?php echo $edit_data2->fileNo; ?></option> <?php if (isset($orderDetails->fileNo)) { echo '<option selected value=' . $orderDetails->fileNo . '>' . $orderDetails->fileNo . '</option>'; } else if ((isset($_POST['fileNo']))) { echo '<option selected value=' . $_POST['fileNo'] . '>' . $_POST['fileNo'] . '</option>'; }else if ($this->input->post('atozalpha')) { $this->db->like('customerID', "" . $this->input->post('atozalpha') . "", 'after'); $query = $this->db->get('customer_master'); foreach ($query->result() as $rrr) { ?> <option value="<?php echo $rrr->customerID; ?>" <?php echo set_select('fileNo', $rrr->customerID); ?>><?php echo $rrr->customerID; ?></option> <?php } } ?> </select> <?php } ?> </div> <?php validationfn(form_error('fileNo')); ?> </div> </div> <div class="form-group"> <label class="control-label col-md-5">Party name:</label> <div class="col-md-7"> <?php if(empty($edit_data2->partyRef)){ ?> <?php if(isset($_POST['partyName'])){ $partyName = $_POST['partyName']; } else $partyName=""; ?> <input type="text" id="partyName" name="partyRef" value="<?= isset($orderDetails->customerName) ? $orderDetails->customerName : $partyName ?>" class="form-control" readonly="readonly"> <?php } else {?> <input type="text" id="partyName" name="partyRef" value="<?php echo $edit_data2->partyRef; ?>" class="form-control" readonly="readonly"> <?php } ?> </div> <?php validationfn(form_error('partyName')); ?> </div> <!-- <div class="form-group"> <label class="control-label col-md-4">Forecast No:</label> <div class="col-md-8"> <select name="forecastNo" class="form-control"> <option value="1">Select</option> <option <?= isset($orderDetails->forecastNo) && ($orderDetails->forecastNo == "01") ? "selected" : set_select('forcastNo', "01"); ?> value="O1">O1</option> <option <?= isset($orderDetails->forecastNo) && ($orderDetails->forecastNo == "02") ? "selected" : set_select('forcastNo', "02"); ?> value="O2">O2</option> </select> </div> <?php validationfn(form_error('forcastNo')); ?> </div>--> <div class="form-group"> <label class="control-label col-md-5">Mode of Order:</label> <div class="col-md-7"> <?php if(empty($edit_data2->orderMode)){ ?> <input value="<?= isset($orderDetails->orderMode) ? $orderDetails->orderMode : set_value('orderMode'); ?>" type="text" name="orderMode" id="orderMode" class="form-control"> <?php } else {?> <input value="<?php echo $edit_data2->orderMode; ?>" type="text" name="orderMode" id="orderMode" class="form-control"> <?php } ?> </div> </div> <?php validationfn(form_error('orderMode')); ?> <div class="form-group"> <label class="control-label col-md-5">Customer Order No:</label> <div class="col-md-7"> <?php if(empty($edit_data2->orderNo)){ ?> <input value="<?= isset($orderDetails->orderNo) ? $orderDetails->orderNo : set_value('orderNo'); ?>" type="text" name="orderNo" class="form-control"> <?php } else {?> <input value="<?php echo $edit_data2->orderNo; ?>" type="text" name="orderNo" class="form-control"> <?php } ?> </div> </div> <?php validationfn(form_error('orderNo')); ?> </div> <!--/row--> <div class="col-md-4"> <?php validationfn(form_error('partyRef')); ?> <div class="form-group"> <label class="control-label col-md-5">Order Date:</label> <div class="col-md-7"> <div class="input-group openDatePicker"> <?php if(empty($edit_data2->orderDate)){ ?> <input value="<?= isset($orderDetails->orderDate) ? date('d/m/Y', strtotime($orderDetails->orderDate)) : set_value('orderDate'); ?>" type="text" name="orderDate" id="orderDate" class="form-control" data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> <?php } else {?> <input value="<?php $newDate = date("d-m-Y", strtotime($edit_data2->orderDate)); echo $newDate; ?>" type="text" name="orderDate" id="orderDate" class="form-control" data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> <?php } ?> </span> </div> </div> </div> <?php validationfn(form_error('orderDate')); ?> <!-- <div class="form-group"> <label class="control-label col-md-4">Order Rec Date:</label> <div class="col-md-8"> <div class="input-group"> <input value="<?= isset($orderDetails->orderRecDate) ? date('d/m/Y', strtotime($orderDetails->orderRecDate)) : set_value('orderRecDate'); ?>" type="text" name="orderRecDate" id="orderRecDate" class="form-control" data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> </span> </div> </div> </div>--> <?php // validationfn(form_error('orderRecDate')); ?> <div class="form-group"> <label class="control-label col-md-5">Delivery Date:</label> <div class="col-md-7"> <div class="input-group"> <?php if(empty($edit_data2->deliveryDate)){ ?> <input value="<?= isset($orderDetails->deliveryDate) ? date('d/m/Y', strtotime($orderDetails->deliveryDate)) : set_value('deliveryDate'); ?>" type="text" name="deliveryDate" id="deliveryDate" class="form-control " data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> <?php } else {?> <input value="<?php $newDate1 = date("d-m-Y", strtotime($edit_data2->deliveryDate)); echo $newDate1; ?>" type="text" name="deliveryDate" id="deliveryDate" class="form-control " data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> <?php } ?> </span> </div> </div> </div> <?php validationfn(form_error('deliveryDate')); ?> <div class="form-group"> <label class="control-label col-md-5">Banker Name:</label> <div class="col-md-7"> <?php if(empty($edit_data2->bankername)){ ?> <input value="<?= isset($orderDetails->bankerName) ? $orderDetails->bankerName : set_value('bankerName'); ?>" type="text" name="bankr" id="bankerName" class="form-control" readOnly> <?php } else {?> <input value="<?php echo $edit_data2->bankername; ?>" type="text" name="bankr" id="bankerName" class="form-control" readOnly> <?php } ?> </div> </div> <?php validationfn(form_error('bankerName')); ?> <div class="form-group"> <label class="control-label col-md-5">Agent Name:</label> <div class="col-md-7"> <?php if(empty($edit_data2->agentname)){ ?> <input value="<?= isset($orderDetails->agentName) ? $orderDetails->agentName : set_value('agentName'); ?>" type="text" id="agentName" name="agent" class="form-control"> <?php } else {?> <input value="<?php echo $edit_data2->agentname; ?>" type="text" name="orderNo" class="form-control"> <?php } ?> </div> </div> <?php validationfn(form_error('agentName')); ?> <div class="form-group"> <label class="control-label col-md-5">Payment Terms:</label> <div class="col-md-6"> <?php if(empty($edit_data2->paymentTerms)){ ?> <select name="paymentTerms" id="paymentTerms" class="form-control" style="height: 40px;padding-bottom: 0px;width:173px;" <?= isset($orderID) ? 'readonly="readonly"' : '' ?> onchange="showLCTerms(this.value);"> <option value="">Select</option> <?php if(isset($_POST['paymentTerms'])){ $orderDetails->paymentTerms = $_POST['paymentTerms']; } ?> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'LC') echo 'selected'; ?> value="LC">LC</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'DP(On Doc Receipt)') echo 'selected'; ?> value="DP(On Doc Receipt)">DP(On Doc Receipt)</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'Advance Pay') echo 'selected'; ?> value="Advance Pay">Advance Pay</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'Part Payment') echo 'selected'; ?> value="Part Payment">Part Payment</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'Usance(Credit)Bill') echo 'selected'; ?> value="LC">Usance(Credit)Bill</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'On Goods Receipt') echo 'selected'; ?> value="Usance(Credit)Bill">On Goods Receipt</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'Other') echo 'selected'; ?> value="Other">Other</option> </select> <?php } else {?> <select name="paymentTerms" id="paymentTerms" class="form-control" style="height: 40px;padding-bottom: 0px;width:173px;" <?= isset($orderID) ? 'readonly="readonly"' : '' ?> onchange="showLCTerms(this.value);"> <option value="<?php echo $edit_data2->paymentTerms; ?>"><?php echo $edit_data2->paymentTerms; ?></option> <?php if(isset($_POST['paymentTerms'])){ $orderDetails->paymentTerms = $_POST['paymentTerms']; } ?> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'LC') echo 'selected'; ?> value="LC">LC</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'DP(On Doc Receipt)') echo 'selected'; ?> value="DP(On Doc Receipt)">DP(On Doc Receipt)</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'Advance Pay') echo 'selected'; ?> value="Advance Pay">Advance Pay</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'Part Payment') echo 'selected'; ?> value="Part Payment">Part Payment</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'Usance(Credit)Bill') echo 'selected'; ?> value="LC">Usance(Credit)Bill</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'On Goods Receipt') echo 'selected'; ?> value="Usance(Credit)Bill">On Goods Receipt</option> <option <?php if (isset($orderDetails->paymentTerms) && $orderDetails->paymentTerms == 'Other') echo 'selected'; ?> value="Other">Other</option> </select> <?php } ?> </div> </div> <?php validationfn(form_error('paymentTerms')); ?> </div> <div class="col-md-4"> <div class="form-group"> <label class="control-label col-md-5">Commision%:</label> <div class="col-md-7"> <?php if(empty($edit_data2->commision)){ ?> <?php if(isset($_POST['commision'])){ $commision = $_POST['commision']; } else $commision=""; ?> <input type="text" value="<?= isset($orderDetails->agentCommission) ? $orderDetails->agentCommission : $commision ?>" id="commision" name="commision" class="form-control" > <?php } else {?> <input type="text" value="<?php echo $edit_data2->commision; ?>" id="commision" name="commision" class="form-control" readonly="readonly"> <?php } ?> </div> </div> <?php validationfn(form_error('commision')); ?> <div class="form-group"> <label class="control-label col-md-5">Validity Date:</label> <div class="col-md-7"> <?php if(empty($edit_data2->validityDate)){ ?> <?php if(isset($_POST['validityDate'])){ $validityDate = $_POST['validityDate']; } else $validityDate=""; ?> <input type="text" value="<?= isset($orderDetails->validityDate) ? date('d/m/Y', strtotime($orderDetails->validityDate)) : $validityDate ?>" id="validityDate" name="validityDate" class="form-control" readonly="readonly"> <?php } else {?> <input type="text" value="<?php $newDate2 = date("d-m-Y", strtotime($edit_data2->validityDate)); echo $newDate2; ?>" id="validityDate" name="validityDate" class="form-control" readonly="readonly"> <?php } ?> </div> </div> <?php validationfn(form_error('validityDate')); ?> <div class="form-group"> <label class="control-label col-md-5">Currency Name:</label> <div class="col-md-7"> <?php if(empty($edit_data2->currency)){ ?> <select name="currencyName" class="form-control"> <option value="">Select</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'USD')) echo 'selected'; echo set_select('currencyName', "USD"); ?> value="USD">USD</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'GBP')) echo 'selected'; echo set_select('currencyName', "GBP"); ?> value="GBP">GBP</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'EUR')) echo 'selected'; echo set_select('currencyName', "EUR"); ?> value="EUR">EUR</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'CHF')) echo 'selected'; echo set_select('currencyName', "CHF"); ?> value="CHF">CHF</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'INR')) echo 'selected'; echo set_select('currencyName', "INR"); ?> value="INR">INR</option> </select> <?php } else {?> <select name="currencyName" class="form-control"> <option value="<?php echo $edit_data2->currency; ?>"><?php echo $edit_data2->currency; ?></option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'USD')) echo 'selected'; echo set_select('currencyName', "USD"); ?> value="USD">USD</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'GBP')) echo 'selected'; echo set_select('currencyName', "GBP"); ?> value="GBP">GBP</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'EUR')) echo 'selected'; echo set_select('currencyName', "EUR"); ?> value="EUR">EUR</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'CHF')) echo 'selected'; echo set_select('currencyName', "CHF"); ?> value="CHF">CHF</option> <option <?php if (isset($orderDetails->currency) && ($orderDetails->currency == 'INR')) echo 'selected'; echo set_select('currencyName', "INR"); ?> value="INR">INR</option> </select> <?php } ?> </div> </div> <?php validationfn(form_error('currencyName')); ?> <div class="form-group"> <label class="control-label col-md-5">Ex Rate:</label> <div class="col-md-7"> <?php if(empty($edit_data2->exRate)){ ?> <input type="text" value="<?= isset($orderDetails->exRate) ? $orderDetails->exRate : set_value('exRate'); ?>" name="exRate" id="exRate" class="form-control"> <?php } else {?> <input type="text" value="<?php echo $edit_data2->exRate; ?>" name="exRate" id="exRate" class="form-control"> <?php } ?> </div> </div> <?php validationfn(form_error('exRate')); ?> <div class="form-group"> <label class="control-label col-md-5">Contract Type:</label> <div class="col-md-6"> <?php if(empty($edit_data1->contractType)){ ?> <select name="contractType" id="contractType" class="form-control" style="height: 30px;width:173px;"> <?php if(isset($_POST['contractType'])) $contractType=$_POST['contractType']; else $contractType = "";?> <option value="">Select</option> <option value="C&F" <?php echo set_select('contractType', $contractType);?>>C&F</option <option value="CIF" <?php echo set_select('contractType', $contractType);?>>CIF</option> <option value="CIF THRU FEDEX" <?php echo set_select('contractType', $contractType);?>>CIF THRU FEDEX</option> <option value="FOB" <?php echo set_select('contractType', $contractType);?>>FOB</option> <option value="FOB+FRT" <?php echo set_select('contractType', $contractType);?>>FOB+FRT</option> <option value="FOB+INS" <?php echo set_select('contractType', $contractType);?>>FOB+INS</option> <option value="OTHERS" <?php echo set_select('contractType', $contractType);?>>OTHERS</option> </select> <?php } else {?> <select name="contractType" id="contractType" class="form-control" style="height: 30px;width:173px;"> <?php if(isset($_POST['contractType'])) $contractType=$_POST['contractType']; else $contractType = "";?> <option value="<?php echo $edit_data1->contractType; ?>"><?php echo $edit_data1->contractType; ?></option> <option value="C&F" <?php echo set_select('contractType', $contractType);?>>C&F</option <option value="CIF" <?php echo set_select('contractType', $contractType);?>>CIF</option> <option value="CIF THRU FEDEX" <?php echo set_select('contractType', $contractType);?>>CIF THRU FEDEX</option> <option value="FOB" <?php echo set_select('contractType', $contractType);?>>FOB</option> <option value="FOB+FRT" <?php echo set_select('contractType', $contractType);?>>FOB+FRT</option> <option value="FOB+INS" <?php echo set_select('contractType', $contractType);?>>FOB+INS</option> <option value="OTHERS" <?php echo set_select('contractType', $contractType);?>>OTHERS</option> </select> <?php } ?> </div> </div> <?php validationfn(form_error('contractType')); ?> </div> </div> </div> </div> </div> <div class="portlet light bg-inverse"> <!-- <div class="portlet-title"> <div class="caption"> <span class="caption-subject font-red-sunglo bold uppercase">Sub Code</span> <span style="float: right; margin-left: 300px;"><input type="button" id="generate_sub_order" value="Generate Sub OSL" onclick="getSubOrderDetails('', 1);"> </button></span> <span class="caption-helper"></span> </div> </div>--> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label class="control-label col-md-5">Sub Code:</label> <div class="col-md-7"> <?php if(empty($edit_data1->subCode)){ ?> <input type="hidden" name="subOrderID" id="subOrderID" /> <input type="hidden" name="nextSubCode" id="nextSubCode" value="<?= isset($nextSubCode) ? $nextSubCode : ""; ?>" /> <input type='hidden' name='selectedSubCode' id='selectedSubCode' value="<?= isset($nextSubCode) ? $nextSubCode : ""; ?>"> <!-- <input type="text" id="subCode" name="subCode" value="<?php echo set_value('subCode'); ?>" class="form-control" readonly="readonly">--> <?php if (isset($orderID) && ($orderID > 0)) { $subIndex = 0; ?> <select name="subCode" id="subCode" class="form-control select_subcode" style="height: 30px;" onchange="getSubOrderDetails(this.value);"> <?php foreach ($arrSubCode as $row) { $subIndex ++; echo '<option ' . set_select('subCode') . 'value="' . $row['id'] . '" >' . $row['subCode'] . '</option>'; } ?> </select> <input type="hidden" id="lastSubID" name="lastSubID" value="<?php echo $arrSubCode[$subIndex - 1]['id'] + 1; ?>"> <input type="hidden" id="lastSubCode" name="lastSubCode" value="<?php echo $arrSubCode[$subIndex - 1]['subCode'] + 1; ?>"> <?php } else { ?> <input type="text" id="subCode" name="subCode" value="<?=isset($_POST['subCode']) ? $_POST['subCode'] : set_value('subCode') ?>" class="form-control" readonly="readonly"> <?php } ?> <?php } else {?> <input type="hidden" name="subOrderID" id="subOrderID" /> <input type="hidden" name="nextSubCode" id="nextSubCode" value="<?= isset($nextSubCode) ? $nextSubCode : ""; ?>" /> <input type='hidden' name='selectedSubCode' id='selectedSubCode' value="<?= isset($nextSubCode) ? $nextSubCode : ""; ?>"> <!-- <input type="text" id="subCode" name="subCode" value="<?php echo set_value('subCode'); ?>" class="form-control" readonly="readonly">--> <?php if (isset($orderID) && ($orderID > 0)) { $subIndex = 0; ?> <select name="subCode" id="subCode" class="form-control select_subcode" style="height: 30px;" onchange="getSubOrderDetails(this.value);"> <?php foreach ($arrSubCode as $row) { $subIndex ++; echo '<option ' . set_select('subCode') . 'value="' . $row['id'] . '" >' . $row['subCode'] . '</option>'; } ?> </select> <input type="hidden" id="lastSubID" name="lastSubID" value="<?php echo $arrSubCode[$subIndex - 1]['id'] + 1; ?>"> <input type="hidden" id="lastSubCode" name="lastSubCode" value="<?php echo $arrSubCode[$subIndex - 1]['subCode'] + 1; ?>"> <?php } else { ?> <input type="text" id="subCode" name="subCode" value="<?php echo $edit_data1->subCode; ?>" class="form-control" readonly="readonly"> <?php } ?> <?php } ?> <input type="hidden" name="subShadeCount" value="<?= isset($_POST['subShadeCount']) ? $_POST['subShadeCount'] : 1 ?>" id="subShadeCount" /> <?php validationfn(form_error('subCode')); ?> </div> </div> <!-- <div class="form-group"> <label class="control-label col-md-4">Person:</label> <div class="col-md-8"> <input style="width: 120px" type="text" value="<?= isset($orderDetails->person) ? $orderDetails->person : set_value('person'); ?>" name="person" id="person" class="form-control"> </div> </div> --> <?php //validationfn(form_error('person')); ?> </div> <!-- <div class="col-md-6"> <div class="form-group"> <label class="control-label col-md-7">Order Confirmation:</label> <div class="col-md-3"> <div class="md-checkbox"> <input type="checkbox" name="orderConfirmation" id="orderConfirmation" class="md-check" <?php if(isset($_POST['orderConfirmation'])&&($_POST['orderConfirmation']=='on')){ echo 'checked'; } else echo 'checked'?>> <label for="orderConfirmation"> <span class="inc"></span> <span id="orderConfirmCheck" class="check"></span> <span class="box"></span> </label> </div> </div> </div> </div> --> <!-- <div class="col-md-3"> <div class="form-group"> <label class="control-label col-md-4">Confirm Date:</label> <div class="col-md-8"> <div class="input-group"> <input style="width: 150px" type="text" name="orderConfirmDate" id="orderConfirmDate" class="form-control" value="<?php echo date('d/m/Y') ?>" data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> </span> </div> </div> </div> </div> --> <div class="col-md-3"><button id="btnGenSubOsl" style="height: 28px;">Generate Sub OSL</button> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="portlet light bg-inverse" id="div_suborder"> <div class="portlet-body"> <ul id="tabs" class="nav nav-tabs"> <li class="active" id="tab_productDescription"><a href="#tab_1_1" data-toggle="tab" aria-expanded="true"> Product Description </a></li> <li class="dropdown"><a href="#tab_1_2" data-toggle="tab" aria-expanded="false"> Delivery Terms </a></li> <li class="dropdown"><a href="#tab_1_3" data-toggle="tab" aria-expanded="false"> Packing and Label Details </a></li> <li class="dropdown" id="tab_lcterms"><a href="#tab_1_4" data-toggle="tab" aria-expanded="false"> Payment </a></li> <li class="dropdown" id="tab_comments"><a href="#tab_1_5" data-toggle="tab" aria-expanded="false"> Customer Comments </a></li> </ul> <div class="tab-content"> <div class="tab-pane fade active in" id="tab_1_1"> <div class="row"> <div class="col-md-12"> <div class="row"> <div class="col-sm-6"> <fieldset style="background: #fff; padding: 20px 20px 0 10px;"> <div class="form-group"> <label class="control-label col-md-4">Order Type:</label> <div class="col-md-7"> <?php if(empty($edit_data2->orderType)){ ?> <select onchange="parmissionunits(this.value)" name="subOrderType" id="subOrderType" class="form-control" style="height: 30px;"> <option value="">Select</option> <?php foreach ($orderTypes as $type) { echo '<option value="' . $type->fabricType . '"'; if(isset($_POST['subOrderType']) && ($_POST['subOrderType'] == $type->fabricType)) echo 'selected="selected" '; echo '>'; echo $type->fabricType . '</option>'; } ?> </select> <?php } else {?> <select onchange="parmissionunits(this.value)" name="subOrderType" id="subOrderType" class="form-control" style="height: 30px;"> <option value="<?php echo $edit_data2->orderType; ?>"><?php echo $edit_data2->orderType; ?></option> <?php foreach ($orderTypes as $type) { echo '<option value="' . $type->fabricType . '"'; if(isset($_POST['subOrderType']) && ($_POST['subOrderType'] == $type->fabricType)) echo 'selected="selected" '; echo '>'; echo $type->fabricType . '</option>'; } ?> </select> <?php } ?> </div> </div> <?php validationfn(form_error('subOrderType')); ?> <div class="form-group"> <label class="control-label col-md-4">Units:</label> <div class="col-md-7"> <?php if(empty($edit_data1->unit)){ ?> <select name="unit" id="unit" class="form-control" style="height: 30px;"> <option value="">Select</option> <option value="MTRs" <?php echo set_select('unit','MTRs'); ?>>MTRs</option> <option value="No(s)" <?php echo set_select('unit','No(s)'); ?>>No(s)</option> <option value="PAIRS" <?php echo set_select('unit','PAIRS'); ?>>PAIRS</option> <option value="PCS" <?php echo set_select('unit','PCS'); ?>>PCS</option> <option value="SETS" <?php echo set_select('unit','SETS'); ?>>SETS</option> <option value="YARDS" <?php echo set_select('unit','YARDS'); ?>>YARDS</option> </select> <?php } else {?> <select name="unit" id="unit" class="form-control" style="height: 30px;"> <option value="<?php echo $edit_data1->unit; ?>"><?php echo $edit_data1->unit; ?></option> <option value="MTRs" <?php echo set_select('unit','MTRs'); ?>>MTRs</option> <option value="No(s)" <?php echo set_select('unit','No(s)'); ?>>No(s)</option> <option value="PAIRS" <?php echo set_select('unit','PAIRS'); ?>>PAIRS</option> <option value="PCS" <?php echo set_select('unit','PCS'); ?>>PCS</option> <option value="SETS" <?php echo set_select('unit','SETS'); ?>>SETS</option> <option value="YARDS" <?php echo set_select('unit','YARDS'); ?>>YARDS</option> </select> <?php } ?> </div> </div> <?php validationfn(form_error('unit')); ?> <div class="form-group"> <label class="control-label col-md-4">Article No:</label> <div class="col-md-7"> <?php if(empty($edit_data1->articleNo)){ ?> <select name="articleNo" id="articleNo" class="form-control" style="height: 30px;" onchange="getDesignAndQuality(this.value);"> <option value="">Select</option> <?php foreach ($articles as $article) { echo '<option value="' . $article->articleNo . '" '; if(isset($_POST['articleNo'])&&($_POST['articleNo'] == $article->articleNo)) echo ' selected="selected" '; echo '>'; echo $article->articleNo . '</option>'; } ?> </select> <?php } else {?> <select name="articleNo" id="articleNo" class="form-control" style="height: 30px;" onchange="getDesignAndQuality(this.value);"> <option value="<?php echo $edit_data1->articleNo; ?>"><?php echo $edit_data1->articleNo; ?></option> <?php foreach ($articles as $article) { echo '<option value="' . $article->articleNo . '" '; if(isset($_POST['articleNo'])&&($_POST['articleNo'] == $article->articleNo)) echo ' selected="selected" '; echo '>'; echo $article->articleNo . '</option>'; } ?> </select> <?php } ?> </div> </div> <?php validationfn(form_error('articleNo'));?> <div class="form-group"> <label class="control-label col-md-4">Weave:</label> <div class="col-md-7"> <?php if(empty($edit_data1->weave)){ ?> <input type="text" name="weave" id="design" class="form-control" style="height: 30px;" value="<?=set_value('design') ?>" readonly="readonly"> <?php } else {?> <input type="text" name="weave" id="design" class="form-control" style="height: 30px;" value="<?php echo $edit_data1->weave; ?>" readonly="readonly"> <?php } ?> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Design:</label> <div class="col-md-7"> <?php if(empty($edit_data1->design)){ ?> <select name="design" id="dbdesign" class="form-control" style="height: 30px;"> <option value="">Select</option> <option value="0">None</option> <?php foreach ($designdata as $designdata) { echo '<option value="' . $designdata->designmp . '" '; if(isset($_POST['designmp'])&&($_POST['designmp'] == $designdata->designmp)) echo ' selected="selected" '; echo '>'; echo $designdata->designmp . '</option>'; } ?> </select> <?php } else {?> <select name="design" id="dbdesign" class="form-control" style="height: 30px;"> <option value="<?php echo $edit_data1->design; ?>"><?php echo $edit_data1->design; ?></option> <option value="0">None</option> <?php foreach ($designdata as $designdata) { echo '<option value="' . $designdata->designmp . '" '; if(isset($_POST['designmp'])&&($_POST['designmp'] == $designdata->designmp)) echo ' selected="selected" '; echo '>'; echo $designdata->designmp . '</option>'; } ?> </select> <?php } ?> </div> </div> <?php validationfn(form_error('design')); ?> <div class="form-group"> <label class="control-label col-md-4">Quality:</label> <div class="col-md-7"> <?php if(empty($edit_data1->quality)){ ?> <input type="text" name="quality" id="quality" value="<?=set_value('quality') ?>" class="form-control" style="height: 30px;" readonly="readonly"> <?php } else {?> <input type="text" name="quality" id="quality" value="<?php echo $edit_data1->quality; ?>" class="form-control" style="height: 30px;" readonly="readonly"> <?php } ?> </div> </div> </div> <!-- col-sm --> <div class="col-sm-6"> <div class="fieldset2" style="background: #fff; padding: 20px 20px 1px 10px;"> <!-- <?php validationfn(form_error('quality')); ?>--> <div class="form-group"> <label class="control-label col-md-4"><span id="changewss">Width:</span></label> <div class="col-md-7"> <?php if(empty($edit_data1->width)){ ?> <input type="text" name="width" id="width" value="<?=set_value('width') ?>" class="form-control" style="height: 30px;"> <?php } else {?> <input type="text" name="width" id="width" value="<?php echo $edit_data1->width; ?>" class="form-control" style="height: 30px;"> <?php } ?> </div> </div> <?php validationfn(form_error('width')); ?> <div class="form-group"> <label class="control-label col-md-4">Description:</label> <div class="col-md-7"> <?php if(empty($edit_data1->description)){ ?> <input type="text" name="description" id="description" value="<?=set_value('description') ?>" class="form-control" style="height: 30px;"> <?php } else {?> <input type="text" name="description" id="description" value="<?php echo $edit_data1->description; ?>" class="form-control" style="height: 30px;"> <?php } ?> </div> </div> <?php //validationfn(form_error('width')); ?> <!-- <div class="form-group"> <label class="control-label col-md-4">Marketing Instructions:</label> <div class="col-md-7"> <a href="#" data-reveal-id="textboxpopup_marketInstruct" data-animation="fade"> <input type="text" name="marketingInst" id="marketingInst" value="<?=set_value('marketingInst') ?>" class="form-control" style="height: 30px;"></a> </div> </div>--> <div class="form-group"> <label class="control-label col-md-4">Marketing Instructions:</label> <div class="col-md-7"> <input type='file' id="imgInp" /> <br> <img id="blah" alt="" height="100" /> </div> </div> </fieldset> </div> </div> <!-- col-sm-6 --> </div> <!-- row --> </div> <div class="col-md-12"> <div class="row"> <div class="col-md-12"> <div class="portlet-body"> <div class="table-scrollable" style="min_height: 600px;"> <table class="table table-striped table-bordered table-hover" id="tbl_suborders"> <thead> <tr> <th scope="col" style="width: 450px !important"> Our Shades</th> <th scope="col">Buyer Shades</th> <th scope="col">Quantity</th> <th scope="col">Unit Price</th> <th scope="col">Foreign Value</th> <th scope="col">Delivery Date</th> <th scope="col">SKU No.</th> </tr> </thead> <tbody id="dynamicTbody" class="subOrder_content" style="background: #fff;"> <?php if(isset($_POST['subShadeCount']) && ($_POST['subShadeCount']>0)){ for($i = 1; $i<=$_POST['subShadeCount']; $i++){ ?> <tr id="rowCount<?=$i?>" class="rowCount"> <td><input type="hidden" name="shadeID[<?=$i?>]" value="<?=isset($_POST['shadeID'][$i]) ? $_POST['shadeID'][$i] : "" ?>" /> <input type="text" name="ourShade[<?=$i?>]" id="ourShade[<?=$i?>]" value="<?=isset($_POST['ourShade'][$i]) ? $_POST['ourShade'][$i] : "" ?>" class="form-control" style="height: 30px; width: 120px;" /> <?php validationfn(form_error('ourShade['.$i.']')); ?> </td> <td><input type="text" name="buyerShade[<?=$i?>]" id="buyerShade[<?=$i?>]" value="<?=isset($_POST['buyerShade'][$i]) ? $_POST['buyerShade'][$i] : "" ?>" class="form-control" style="height: 30px; width: 120px;" /> <?php validationfn(form_error('buyerShade['.$i.']')); ?> <?php validationfn(form_error('check_equal_ourShade')); ?> </td> <td><input type="text" name="quantity[<?=$i?>]" id="quantity[<?=$i?>]" value="<?=isset($_POST['quantity'][$i]) ? $_POST['quantity'][$i] : "" ?>" class="form-control quantity" style="height: 30px; width: 120px;" /> <?php validationfn(form_error('quantity['.$i.']')); ?> </td> <td><input type="text" name="unitPrice[<?=$i ?>]" id="unitPrice_1" value="<?=isset($_POST['unitPrice'][$i]) ? $_POST['unitPrice'][$i] : "" ?>" <?= ($i==1)? '' : 'readonly' ?> class="form-control unitPrice sub_form_controll" style="height: 30px; width: 120px;" /></td> <td><input type="text" name="foreignValue[<?=$i ?>]" id="foreignValue_1" value="<?=isset($_POST['foreignValue'][$i]) ? $_POST['foreignValue'][$i] : "" ?>" class="form-control foreignValue" style="height: 30px; width: 120px;" /></td> <td><input type="text" name="deliveryDate[<?=$i ?>]" id="deliveryDate[1]" value="<?=isset($_POST['deliveryDate'][$i]) ? $_POST['deliveryDate'][$i] : "" ?>" class="form-control delivery_date" style="height: 30px; width: 120px;" data-provide="datepicker" readonly="readonly" /> </td> <td><input type="text" name="skuNo[<?=$i ?>]" id="skuNo[<?=$i ?>]" value="<?=isset($_POST['skuNo'][$i]) ? $_POST['skuNo'][$i] : "" ?>" class="form-control" style="height: 30px; width: 120px;" /> <?php validationfn(form_error('skuNo['.$i.']')); ?> </td> <td><a id="removeButton" class="btn red addButton" onclick="removeRow(<?=$i?>);"> <i class="fa fa-minus"></i></a></td> </tr> <?php } } else{ foreach($edit_data3 as $edit_data3) { ?> <tr id="rowCount1" class="rowCount"> <td> <?php if(empty($edit_data3->ourShade)){ ?> <input type="hidden" name="shadeID[1]" value="" /> <input type="text" name="ourShade[1]" id="ourShade[1]" class="form-control" style="height: 30px; width: 120px;" /> <?php } else {?> <input type="hidden" name="shadeID[1]" value="" /> <input type="text" name="ourShade[1]" id="ourShade[1]" class="form-control" style="height: 30px; width: 120px;" value="<?php echo $edit_data3->ourShade; ?>" /> <?php } ?> <?php validationfn(form_error('ourShade[1]')); ?> </td> <td> <?php if(empty($edit_data3->buyerShade)){ ?> <input type="text" name="buyerShade[1]" id="buyerShade[1]" class="form-control" style="height: 30px; width: 120px;" /> <?php } else {?> <input type="text" name="buyerShade[1]" id="buyerShade[1]" class="form-control" style="height: 30px; width: 120px;" value="<?php echo $edit_data3->buyerShade; ?>" /> <?php } ?> </td> <td> <?php if(empty($edit_data3->quantity)){ ?> <input type="text" name="quantity[1]" id="quantity[1]" class="form-control quantity" style="height: 30px; width: 120px;" /> <?php } else {?> <input type="text" name="quantity[1]" id="quantity[1]" class="form-control quantity" style="height: 30px; width: 120px;" value="<?php echo $edit_data3->quantity; ?>" /> <?php } ?> </td> <td> <?php if(empty($edit_data3->unitPrice)){ ?> <input type="text" name="unitPrice[1]" id="unitPrice_1" class="form-control unitPrice sub_form_controll" style="height: 30px; width: 120px;" /> <?php } else {?> <input type="text" name="unitPrice[1]" id="unitPrice_1" class="form-control unitPrice sub_form_controll" style="height: 30px; width: 120px;" value="<?php echo $edit_data3->unitPrice; ?>"/> <?php } ?> </td> <td> <?php if(empty($edit_data3->foreignValue)){ ?> <input type="text" name="foreignValue[1]" id="foreignValue_1" class="form-control foreignValue" style="height: 30px; width: 120px;" /> <?php } else {?> <input type="text" name="foreignValue[1]" id="foreignValue_1" class="form-control foreignValue" style="height: 30px; width: 120px;" value="<?php echo $edit_data3->foreignValue; ?>" /> <?php } ?> </td> <td> <?php if(empty($edit_data3->deliveryDate)){ ?> <input type="text" name="deliveryDate[1]" value="<?= isset($orderDetails->deliveryDate) ? date('d/m/Y', strtotime($orderDetails->deliveryDate)) : set_value('deliveryDate'); ?>" id="deliveryDate[1]" class="form-control delivery_date" style="height: 30px; width: 120px;" data-provide="datepicker" /> <?php } else {?> <input type="text" name="deliveryDate[1]" value="<?php $newDate3 = date("d-m-Y", strtotime($edit_data3->deliveryDate)); echo $newDate3; ?>" id="deliveryDate[1]" class="form-control delivery_date" style="height: 30px; width: 120px;" data-provide="datepicker" /> <?php } ?> </td> <td> <?php if(empty($edit_data3->skuNo)){ ?> <input type="text" name="skuNo[1]" id="skuNo[1]" class="form-control" style="height: 30px; width: 120px;" /> <?php } else {?> <input type="text" name="skuNo[1]" id="skuNo[1]" class="form-control" style="height: 30px; width: 120px;" value="<?php echo $edit_data3->skuNo; ?>" /> <?php } ?> </td> <td><a id="removeButton" class="btn red addButton" onclick="removeRow(1);"> <i class="fa fa-minus"></i></a> </td> </tr> <?php } ?> <tr> <!-- <td> <span style="font:normal 12px agency, arial; color:blue; text-decoration:underline; cursor:pointer;" onclick="addMoreRows(this.form);"> Add More </span> </td>--> </tr><?php } ?> </tbody> </table> <div id="addedRows"></div> <a id="addButton" class="btn blue addButton" onclick="addMoreRows(this.form);"> <i class="fa fa-plus"></i></a> </div> </div> </div> </div> <div class="row"> <div class="col-md-2"> <div class="form-group"> <div class="col-md-12"> <label class="control-label">Total Qty:</label> <?php if(empty($edit_data1->totalQuantity)){ ?> <input type="text" name="totalQuantity" id="totalQuantity" value="<?=isset($_POST['totalQuantity']) ? $_POST['totalQuantity']: 0 ?>" class="form-control sub_form_controll" style="height: 30px;" readonly> <?php } else {?> <input type="text" name="totalQuantity" id="totalQuantity" value="<?php echo $edit_data1->totalQuantity; ?>" class="form-control sub_form_controll" style="height: 30px;" readonly> <?php } ?> </div> </div> </div> <div class="col-md-2"> <div class="form-group"> <div class="col-md-12"> <label class="control-label">Total Value:</label> <?php if(empty($edit_data1->totalValue)){ ?> <input type="text" name="totalValue" id="totalValue" value="<?=isset($_POST['totalValue']) ? $_POST['totalValue']: 0 ?>" class="form-control sub_form_controll" style="height: 30px;" readonly> <?php } else {?> <input type="text" name="totalValue" id="totalValue" value="<?php echo $edit_data1->totalValue; ?>" class="form-control sub_form_controll" style="height: 30px;" readonly> <?php } ?> </div> </div> </div> <div class="col-md-2"> <div class="form-group"> <div class="col-md-12"> <label class="control-label">Discount(%):</label> <?php if(empty($edit_data1->discount)){ ?> <input type="text" name="discount" id="discount" value="<?=isset($_POST['discount']) ? $_POST['discount']: 0 ?>" class="form-control" style="height: 30px;" readonly> <?php } else {?> <input type="text" name="discount" id="discount" value="<?php echo $edit_data1->discount; ?>" class="form-control" style="height: 30px;" readonly> <?php } ?> </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <div class="col-md-12"> <label class="control-label">Net Value:</label> <?php if(empty($edit_data1->netValue)){ ?> <input type="text" name="netValue" id="netValue" value="<?=isset($_POST['netValue']) ? $_POST['netValue']: 0 ?>" class="form-control sub_form_controll" style="height: 30px;" readonly> <?php } else {?> <input type="text" name="netValue" id="netValue" value="<?php echo $edit_data1->netValue; ?>" class="form-control sub_form_controll" style="height: 30px;" readonly> <?php } ?> </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <div class="col-md-12"> <label class="control-label">Indian Value:</label> <input value="preview" type="hidden" name="preview1" id="orderMode" class="form-control"> <input value="preview" type="hidden" name="preview2" id="orderMode" class="form-control"> <input value="preview" type="hidden" name="preview3" id="orderMode" class="form-control"> <?php if(empty($edit_data1->indianValue)){ ?> <input type="text" name="indianValue" id="indianValue" value="<?=isset($_POST['indianValue']) ? $_POST['indianValue']: 0 ?>" class="form-control sub_form_controll" style="height: 30px;" readonly> <?php } else {?> <input type="text" name="indianValue" id="indianValue" value="<?php echo $edit_data1->indianValue; ?>" class="form-control sub_form_controll" style="height: 30px;" readonly> <?php } ?> </div> </div> </div> </div> </div> </div> </div> <div class="tab-pane fade" id="tab_1_2"> <div class="row"> <div class="col-md-1"></div> <div class="col-md-8"> <br> <div class="form-group"> <label class="control-label col-md-4">Freight Forwarder:</label> <div class="col-md-6"> <input type="text" id="freightForwarder" name="freightForwarder" class="form-control" style="height: 30px;"> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Freight Type:</label> <div class="col-md-6"> <select id="freightType" name="freightType" class="form-control" style="height: 30px;"> <option value="">Select</option> <option value="PAYED">PAYED</option> <option value="COLLECT">COLLECT</option> <option value="TO PAY">TO PAY</option> <option value="OTHERS">OTHERS</option> </select> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Delivery Mode:</label> <div class="col-md-6"> <select id="deliveryMode" name="deliveryMode" class="form-control" style="height: 30px;"> <option value="">Select</option> <option value="BY AIR">BY AIR</option> <option value="BY SEA">BY SEA</option> <option value="CARGO">CARGO</option> <option value="OTHERS">OTHERS</option> </select> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Delivery Point:</label> <div class="col-md-6"> <input type="text" id="deliveryPoint" name="deliveryPoint" class="form-control" style="height: 30px;"> </div> </div> </div> <div class="col-md-2"></div> </div> </div> <div class="tab-pane fade" id="tab_1_3"> <div class="row"> <div class="col-md-6"> <br> <fieldset style="background: #fff;"> <legend>Packing Instruction</legend> <div class="form-group"> <label class="control-label col-md-4">Type:</label> <div class="col-md-6"> <select name="packingType" id="packingType" class="form-control"> <option value="">Select</option> <option value="GENERAL">GENERAL</option> <option value="SPECIAL">SPECIAL</option> <option value="BOX">BOX</option> <option value="BALE">BALE</option> <option value="OTHERS">OTHERS</option> </select> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Label Terms:</label> <div class="col-md-6"> <input type="text" id="labelTerms" name="labelTerms" class="form-control"> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Instructions:</label> <div class="col-md-6"> <input type="text" id="packingInstructions" name="packingInstructions" class="form-control"> </div> </div> </fieldset> </div> <!-- <div class="col-md-6"> <br> <fieldset style="background: #fff;"> <legend>Inspection Instruction</legend> <div class="form-group"> <label class="control-label col-md-4">Date:</label> <div class="col-md-6"> <div class="input-group"> <input type="text" id="inspectionDate" name="inspectionDate" class="form-control datePicker" data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> </span> </div> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Agency Address:</label> <div class="col-md-6"> <textarea id="agencyAddress" name="agencyAddress" class="form-control"></textarea> </div> </div> </fieldset> </div> --> </div> </div> <div class="tab-pane fade" id="tab_1_4"> <div class="row"> <div class="col-md-1"></div> <div class="col-md-8"> <br> <div class="form-group"> <label class="control-label col-md-4">LC No:</label> <div class="col-md-6"> <input type="text" id="lcNo" name="lcNo" value="<?= isset($orderDetails->lcNo) ? $orderDetails->lcNo : set_value('lcNo'); ?>" class="form-control"> </div> </div> <div class="form-group"> <label class="control-label col-md-4">LC Date:</label> <div class="col-md-6"> <div class="input-group"> <input type="text" id="lcDate" name="lcDate" value="<?= isset($orderDetails->lcDate) ?date('d/m/Y', strtotime($orderDetails->lcDate)) : set_value('lcDate', date('d/m/Y')); ?>" class="form-control datePicker" data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> </span> </div> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Expiry Date:</label> <div class="col-md-6"> <div class="input-group"> <input type="text" id="expiryDate" name="expiryDate" value="<?= isset($orderDetails->expiryDate) ? date('d/m/Y', strtotime($orderDetails->expiryDate)) : set_value('expiryDate'); ?>" class="form-control datePicker" data-provide="datepicker"> <span class="input-group-addon"> <i class="fa fa-calendar"></i> </span> </div> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Days Credit:</label> <div class="col-md-6"> <input type="text" id="daysCredit" name="daysCredit" value="<?= isset($orderDetails->daysCredit) ? $orderDetails->daysCredit : set_value('daysCredit'); ?>" class="form-control"> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Bank:</label> <div class="col-md-6"> <input type="text" id="bank" name="bank" value="<?= isset($orderDetails->bank) ? $orderDetails->bank : set_value('bank'); ?>" class="form-control"> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Amount:</label> <div class="col-md-6"> <input type="text" id="amount" name="amount" value="<?= isset($orderDetails->amount) ? $orderDetails->amount : set_value('amount'); ?>" class="form-control"> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Upload:</label> <div class="col-md-6"> <input type="file" id="imgInp" /> <img id="blah" src="#" alt="" /> </div> </div> </div> <div class="col-md-2"></div> </div> </div> <div class="tab-pane fade" id="tab_1_5"> <div class="row"> <div class="col-md-1"></div> <div class="col-md-8"> <br> <div class="form-group"> <!-- <label class="control-label col-md-4">Customer Comments</label>--> <div class="col-md-6"> <textarea id="customerComments" style="height: 300px; width: 550px;" name="customerComments" class="form-control"><?php if (isset($orderDetails->customerComments)) echo $orderDetails->customerComments; ?></textarea> </div> </div> </div> <div class="col-md-2"></div> </div> </div> </div> <div class="clearfix margin-bottom-20"></div> </div> </div> <!--/row--> <div class="form-actions"> <div class="row"> <div class="col-md-8"> <div class="row"> <div class="col-md-offset-1 col-md-9"> <?php if (isset($orderID) && ($orderID != "")) { ?> <a id="osl_details" class="btn" style="color: #FFFFFF; background: #e7806a;" href="#" data-reveal-id="osl_details_popup" data-animation="fade" onclick="displayOslDetails(<?= $orderID; ?>);"> OSL Details </a> <?php } ?> <button type="submit" name="submitOrder" id="submitOrder" value="Add Order" class="btn" style="color: #FFFFFF; background: #485b7f;">Add Order</button> <a href="<?php echo base_url(); ?>marketing/transactions_order_details/"><button id="cancel" type="button" class="btn default" style="width: 20%;">Cancel</button></a> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </form> <!-- END FORM--> </div> <!-- END DASHBOARD STATS --> </div> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <!--Display content in new popup.. --> <div class="doc_main"> <span class="doc_content"> <div class="manag"> <div id="myModal" class="reveal-modal"> <div class="form-body"> <h3 class="form-section">Customer Details</h3> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Customer Name :</label> <div class="col-md-6"> <span id="customerName"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Product Type :</label> <div class="col-md-6"> <span id="productType"></span> </div> </div> </div> <!--/span--> </div> <!--/row--> <!--<h3 class="form-section">Customer Details</h3>--> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">customer id :</label> <div class="col-md-6"> <span id="customerid"></span> </div> </div> </div> <!--/span--> </div> <!--/row--> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Customer Address :</label> <div class="col-md-6"> <span id="customerAddress"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Country :</label> <div class="col-md-6"> <span id="country"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Banker Name :</label> <div class="col-md-6"> <span id="bankerName"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Banker Address :</label> <div class="col-md-6"> <span id="bankerAddress"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Notes</label> <div class="col-md-6"> <span id="notes"></span> </div> </div> </div> </div> <h3 class="form-section">Contact Person</h3> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Department :</label> <div class="col-md-6"> <span id="department"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Mobile No :</label> <div class="col-md-6"> <span id="mobileno"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Phone No :</label> <div class="col-md-6"> <span id="phoneno"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">E-mail :</label> <div class="col-md-6"> <span id="email"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Website:</label> <div class="col-md-6"> <span id="website"></span> </div> </div> </div> </div> <!--/row--> <h3 class="form-section">Consignee Details</h3> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Consignee Name :</label> <div class="col-md-6"> <span id="consigneename"></span> </div> </div> </div> </div> <!--/row--> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Consignee Address :</label> <div class="col-md-6"> <span id="consigneeAddress"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Agent Name :</label> <div class="col-md-6"> <span id="agentname"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Agent Address :</label> <div class="col-md-6"> <span id="agentAddress"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Agent Contact person :</label> <div class="col-md-6"> <span id="agentcontactperson"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Mobile No :</label> <div class="col-md-6"> <span id="agentmobile"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Phone No :</label> <div class="col-md-6"> <span id="agentphone"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">E-mail :</label> <div class="col-md-6"> <span id="agentemail"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Website:</label> <div class="col-md-6"> <span id="agentwebsite"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Agent Commission(%) :</label> <div class="col-md-6"> <span id="agentCommission"></span> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Agency From date :</label> <div class="col-md-6"> <span id="agentValidityDate"></span> </div> </div> </div> </div> </div> </div> <br> </div> </div> </span> </div> <div class="doc_main"></div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <script> function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } $("#imgInp").change(function(){ readURL(this); }); </script> <style> #blah{ max-width:200px; min-width:200px; min-height:150px; margin-top:20px; } .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th { padding: 7px !important; } </style> <!-- -instruction image upload --> <script> function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } $("#imgInp").change(function(){ readURL(this); }); </script>