EVOLUTION-NINJA
Edit File: add_transaction_demo2.php
<?php //echo '<pre>';print_r($arrSubCode);exit; //echo '<pre>'; print_r($_POST);exit; if(isset($_POST['orderID']) && $_POST['orderID']!= ""){ $orderID = $_POST['orderID']; } ?> <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 = $('#mainDeliveryDate').val(); var unitPrice = $('#unitPrice_1').val(); if (!unitPrice) { unitPrice = ""; } $('#subShadeCount').val(rowCount); alert(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, shadeID) { if (confirm('Are you sure to delete row data?')) { jQuery('#rowCount' + removeNum).remove(); rowCount--; $('#subShadeCount').val(rowCount); if(shadeID){ if(shadeID>0){ $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/deleteSubShade", data: {'shadeID': shadeID}, success: function (data) { alert('Shade details deleted successfully'); } }); } } } else { } } 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); 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 generateFun(){ alert('generate fun'); $('#subShadeCount').val(1); var deliveryDate = $('#deliveryDate').val(); rowCount=1; 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(0); $('#dynamicTbody').html(divContent); $("#articleNo").val(); $("#design").val(); $("#quality").val(); $("#width").val(); $("#description").val(); $("#marketingInst").val(); $("#contractType").val(); $("#totalQuantity").val(); $("#totalValue").val(); $("#discount").val(); $("#netValue").val(); $("#indianValue").val(); $("#freightForwarder").val(); $("#freightType").val(); $("#deliveryMode").val(); $("#deliveryPoint").val(); $("#packingType").val(); $("#labelTerms").val(); $("#packingInstructions").val(); $("#inspectionDate").val(); $("#agencyAddress").val(); } 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 () { $('.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); }) ); $('#mainDeliveryDate').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) { document.getElementById("oslNo").value = data; 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 () { $("#mainDeliveryDate").datepicker({ dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true }); }); $(function () { $("#orderConfirmDate").datepicker({ dateFormat: "dd/mm/yy", 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> <?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"> <!-- 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_input2" 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> </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-4">OSL No:</label> <div class="col-md-8"> <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 : ""; ?>"> <input type="text" id="oslNo" name="oslNo" class="form-control" value="<?= isset($orderDetails->oslNo) ? $orderDetails->oslNo : set_value('oslNo') ?>" readonly="readonly"> <?php validationfn(form_error('oslNo')); ?> </div> </div> <div class="form-group"> <label class="control-label col-md-4">File No:</label> <div class="col-md-8"> <div class="input-group"> <div class="input-group-btn"> <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> </div> <select onchange="getCustomerData(this.value)" id="fileNo" 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> </div> <?php validationfn(form_error('fileNo')); ?> </div> </div> <div class="form-group"> <label class="control-label col-md-4">Party name:</label> <div class="col-md-8"> <?php if(isset($_POST['partyName'])){ $partyName = $_POST['partyName']; } else $partyName=""; ?> <input type="text" id="partyName" name="partyName" value="<?= isset($orderDetails->customerName) ? $orderDetails->customerName : $partyName ?>" class="form-control" readonly="readonly"> </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-4">Mode of Order:</label> <div class="col-md-8"> <input value="<?= isset($orderDetails->orderMode) ? $orderDetails->orderMode : set_value('orderMode'); ?>" type="text" name="orderMode" id="orderMode" class="form-control"> </div> </div> <?php validationfn(form_error('orderMode')); ?> <div class="form-group"> <label class="control-label col-md-4">Party Order No:</label> <div class="col-md-8"> <input value="<?= isset($orderDetails->orderNo) ? $orderDetails->orderNo : set_value('orderNo'); ?>" type="text" name="orderNo" class="form-control"> </div> </div> <?php validationfn(form_error('orderNo')); ?> </div> <!--/row--> <div class="col-md-4"> <div class="form-group"> <label class="control-label col-md-4">Party Ref:</label> <div class="col-md-8"> <input value="<?= isset($orderDetails->partyRef) ? $orderDetails->partyRef : set_value('partyRef'); ?>" type="text" name="partyRef" class="form-control"> </div> </div> <?php validationfn(form_error('partyRef')); ?> <div class="form-group"> <label class="control-label col-md-4">Order Date:</label> <div class="col-md-8"> <div class="input-group openDatePicker"> <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> </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-4">Delivery Date:</label> <div class="col-md-8"> <div class="input-group"> <input value="<?= isset($orderDetails->deliveryDate) ? date('d/m/Y', strtotime($orderDetails->deliveryDate)) : set_value('mainDeliveryDate'); ?>" type="text" name="mainDeliveryDate" id="mainDeliveryDate" 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('mainDeliveryDate')); ?> <div class="form-group"> <label class="control-label col-md-4">Banker Name:</label> <div class="col-md-8"> <input value="<?= isset($orderDetails->bankerName) ? $orderDetails->bankerName : set_value('bankerName'); ?>" readonly type="text" name="bankerName" id="bankerName" class="form-control" readonly="readonly"> </div> </div> <?php validationfn(form_error('bankerName')); ?> <div class="form-group"> <label class="control-label col-md-4">Agent Name:</label> <div class="col-md-8"> <input value="<?= isset($orderDetails->agentName) ? $orderDetails->agentName : set_value('agentName'); ?>" readonly type="text" id="agentName" name="agentName" class="form-control" readonly="readonly"> </div> </div> <?php validationfn(form_error('agentName')); ?> </div> <div class="col-md-4"> <div class="form-group"> <label class="control-label col-md-4">Commision%:</label> <div class="col-md-8"> <?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" readonly="readonly"> </div> </div> <?php validationfn(form_error('commision')); ?> <div class="form-group"> <label class="control-label col-md-4">Validity Date:</label> <div class="col-md-8"> <?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"> </div> </div> <?php validationfn(form_error('validityDate')); ?> <div class="form-group"> <label class="control-label col-md-4">Currency Name:</label> <div class="col-md-8"> <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> </div> </div> <?php validationfn(form_error('currencyName')); ?> <div class="form-group"> <label class="control-label col-md-4">Ex Rate:</label> <div class="col-md-8"> <input type="text" value="<?= isset($orderDetails->exRate) ? $orderDetails->exRate : set_value('exRate'); ?>" name="exRate" id="exRate" class="form-control"> </div> </div> <?php validationfn(form_error('exRate')); ?> </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="generateFun();"></button></span> <span class="caption-helper"></span> </div> <button id="btnGenSubOsl">Generate Sub OSL</button> </div> <div class="row"> <div class="col-md-3"> <div class="form-group"> <label class="control-label col-md-4">Sub Code:</label> <div class="col-md-8"> <input type="hidden" name="subOrderID" id="subOrderID" value="<?= isset($firstSubOrderID)? $firstSubOrderID : set_value('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 ++; if(isset($firstSubOrderID)){ } echo '<option ' . set_select('subCode'); if(isset($firstSubOrderID) && $firstSubOrderID>0 && $firstSubOrderID == $row['id']){ echo ' selected '; } echo '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 } ?> <input type="hidden" name="subShadeCount" value="<?= isset($_POST['subShadeCount']) ? $_POST['subShadeCount'] : 1 ?>" id="subShadeCount" /> <?php //validationfn(form_error('subCode')); ?> </div> </div> </div> <div class="col-md-3"> <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($firstSubOrder['orderConfirmation'])&&($firstSubOrder['orderConfirmation']=='Yes')){ echo 'checked'; } else echo ''?>> <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 type="text" name="orderConfirmDate" id="orderConfirmDate" class="form-control" value="<?= isset($firstSubOrder) ? date('d/m/Y', strtotime($firstSubOrder['orderConfirmDate'])) : 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"> <div class="form-group"> <label class="control-label col-md-4">Person:</label> <div class="col-md-8"> <input 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> </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 Insp Terms </a> </li> <li class="dropdown" id="tab_lcterms"> <a href="#tab_1_4" data-toggle="tab" aria-expanded="false"> LC Terms </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-4"> <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"> <select 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($firstSubOrder['subOrderType']) && ($firstSubOrder['subOrderType'] == $type->fabricType)) echo 'selected="selected" '; echo '>'; echo $type->fabricType . '</option>'; } ?> </select> </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"> <select name="unit" id="unit" class="form-control" style="height: 30px;"> <option value="">Select</option> <option <?= (isset($firstSubOrder['unit'])&& $firstSubOrder['unit'] == 'MTRs') ? ' selected ' : '' ?> value="MTRs" <?php echo set_select('unit','MTRs'); ?>>MTRs</option> <option <?= (isset($firstSubOrder['unit'])&& $firstSubOrder['unit'] == 'No(s)') ? ' selected ' : '' ?> value="No(s)" <?php echo set_select('unit','No(s)'); ?>>No(s)</option> <option <?= (isset($firstSubOrder['unit'])&& $firstSubOrder['unit'] == 'PAIRS') ? ' selected ' : '' ?> value="PAIRS" <?php echo set_select('unit','PAIRS'); ?>>PAIRS</option> <option <?= (isset($firstSubOrder['unit'])&& $firstSubOrder['unit'] == 'PCS') ? ' selected ' : '' ?> value="PCS" <?php echo set_select('unit','PCS'); ?>>PCS</option> <option <?= (isset($firstSubOrder['unit'])&& $firstSubOrder['unit'] == 'SETS') ? ' selected ' : '' ?> value="SETS" <?php echo set_select('unit','SETS'); ?>>SETS</option> <option <?= (isset($firstSubOrder['unit'])&& $firstSubOrder['unit'] == 'YARDS') ? ' selected ' : '' ?> value="YARDS" <?php echo set_select('unit','YARDS'); ?>>YARDS</option> </select> </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"> <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($firstSubOrder['articleNo'])&&($firstSubOrder['articleNo'] == $article->articleNo)) echo ' selected="selected" '; echo '>'; echo $article->articleNo . '</option>'; } ?> </select> </div> </div> <?php validationfn(form_error('articleNo')); ?> <div class="form-group"> <label class="control-label col-md-4"> :</label> <div class="col-md-7"> <input type="text" name="design" id="design" class="form-control" style="height: 30px;" value="<?= isset($firstSubOrder['design'])? $firstSubOrder['design'] : set_value('design') ?>" readonly="readonly"> </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"> <input type="text" name="quality" id="quality" value="<?= isset($firstSubOrder['quality']) ? $firstSubOrder['quality'] : set_value('quality') ?>" class="form-control" style="height: 30px;" readonly="readonly"> </div> </div> <?php validationfn(form_error('quality')); ?> <div class="form-group"> <label class="control-label col-md-4">Width:</label> <div class="col-md-7"> <input type="text" name="width" id="width" value="<?=isset($firstSubOrder['width']) ? $firstSubOrder['width'] : set_value('width') ?>" class="form-control" style="height: 30px;"> </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"> <input type="text" name="description" id="description" value="<?= isset($firstSubOrder['description']) ? $firstSubOrder['description'] : set_value('description') ?>" class="form-control" style="height: 30px;"> </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"> <input type="text" name="marketingInst" id="marketingInst" value="<?=set_value('marketingInst') ?>" class="form-control" style="height: 30px;"> </div> </div> <?php validationfn(form_error('description')); ?> <div class="form-group"> <label class="control-label col-md-4">Payment Terms:</label> <div class="col-md-7"> <select name="paymentTerms" id="paymentTerms" class="form-control" style="height: 30px;" <?= 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($firstSubOrder->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> </div> </div> <?php validationfn(form_error('paymentTerms')); ?> <div class="form-group"> <label class="control-label col-md-4">Contract Type:</label> <div class="col-md-7"> <select name="contractType" id="contractType" class="form-control" style="height: 30px;"> <?php if(isset($_POST['contractType'])) $contractType=$_POST['contractType']; else $contractType = "";?> <option value="">Select</option> <option <?= (isset($firstSubOrder['contractType'])&& $firstSubOrder['contractType'] == 'C&F') ? ' selected ' : '' ?> value="C&F" <?php echo set_select('contractType', $contractType);?> >C&F</option <option <?= (isset($firstSubOrder['contractType'])&& $firstSubOrder['contractType'] == 'CIF') ? ' selected ' : '' ?> value="CIF" <?php echo set_select('contractType', $contractType);?>>CIF</option> <option <?= (isset($firstSubOrder['contractType'])&& $firstSubOrder['contractType'] == 'CIF THRU FEDEX') ? ' selected ' : '' ?> value="CIF THRU FEDEX" <?php echo set_select('contractType', $contractType);?>>CIF THRU FEDEX</option> <option <?= (isset($firstSubOrder['contractType'])&& $firstSubOrder['contractType'] == 'FOB') ? ' selected ' : '' ?> value="FOB" <?php echo set_select('contractType', $contractType);?>>FOB</option> <option <?= (isset($firstSubOrder['contractType'])&& $firstSubOrder['contractType'] == 'FOB+FRT') ? ' selected ' : '' ?> value="FOB+FRT" <?php echo set_select('contractType', $contractType);?>>FOB+FRT</option> <option <?= (isset($firstSubOrder['contractType'])&& $firstSubOrder['contractType'] == 'FOB+INS') ? ' selected ' : '' ?> value="FOB+INS" <?php echo set_select('contractType', $contractType);?>>FOB+INS</option> <option <?= (isset($firstSubOrder['contractType'])&& $firstSubOrder['contractType'] == 'OTHERS') ? ' selected ' : '' ?> value="OTHERS" <?php echo set_select('contractType', $contractType);?>>OTHERS</option> </select> </div> </div> <?php validationfn(form_error('contractType')); ?> </fieldset> </div> <div class="col-md-8"> <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($firstSubOrderShades) && count($firstSubOrderShades)>0) { $i = 0; foreach($firstSubOrderShades as $shade){ ?> <tr id="rowCount<?=$i?>" class="rowCount"> <td><input type="hidden" name="shadeID[<?=$i?>]" value="<?=$shade['shadeID']?>" /> <input type="text" name="ourShade[<?=$i?>]" id="ourShade[<?=$i?>]" class="form-control" style="height: 30px;width:120px;" value="<?= isset($shade['ourShade']) ?$shade['ourShade'] : set_value('ourShade[' . $i . ']') ?>" /> <?php validationfn(form_error('ourShade[<?=$i?>]')); ?> </td> <td> <input type="text" name="buyerShade[<?=$i?>]" id="buyerShade[<?=$i?>]" class="form-control" style="height: 30px;width:120px;" value="<?=$shade['buyerShade']?>"/> </td> <td> <input type="text" name="quantity[<?=$i?>]" id="quantity[<?=$i?>]" value="<?=$shade['quantity']?>" class="form-control quantity" style="height: 30px;width:120px;" /> </td> <td> <input type="text" name="unitPrice[<?=$i?>]" id="unitPrice_<?=$i?>" value="<?=$shade['unitPrice']?>" class="form-control unitPrice sub_form_controll" style="height: 30px;width:120px;" /> </td> <td> <input type="text" name="foreignValue[<?=$i?>]" id="foreignValue_1" value="<?=$shade['foreignValue']?>" class="form-control foreignValue" style="height: 30px;width:120px;" /> </td> <td> <input type="text" name="deliveryDate[<?=$i?>]" value="<?= isset($orderDetails->deliveryDate) ? date('d/m/Y', strtotime($orderDetails->deliveryDate)) : set_value('deliveryDate'); ?>" id="deliveryDate[<?=$i?>]" class="form-control delivery_date" style="height: 30px;width:120px;" data-provide="datepicker" /> </td> <td> <input type="text" name="skuNo[<?=$i?>]" id="skuNo[<?=$i?>]" value="<?=$shade['skuNo']?>" class="form-control" style="height: 30px;width:120px;" /> </td> <td> <a id="removeButton" class="btn red addButton" onclick="removeRow(<?=$i?>,<?=$shade['shadeID']?> );"> <i class="fa fa-minus"></i></a> </td> </tr> <?php $i ++; } } else{ ?> <tr id="rowCount1" class="rowCount"> <td><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 validationfn(form_error('ourShade[1]')); ?> </td> <td> <input type="text" name="buyerShade[1]" id="buyerShade[1]" class="form-control" style="height: 30px;width:120px;" /> </td> <td> <input type="text" name="quantity[1]" id="quantity[1]" class="form-control quantity" style="height: 30px;width:120px;" /> </td> <td> <input type="text" name="unitPrice[1]" id="unitPrice_1" class="form-control unitPrice sub_form_controll" style="height: 30px;width:120px;" /> </td> <td> <input type="text" name="foreignValue[1]" id="foreignValue_1" class="form-control foreignValue" style="height: 30px;width:120px;" /> </td> <td> <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" /> </td> <td> <input type="text" name="skuNo[1]" id="skuNo[1]" class="form-control" style="height: 30px;width:120px;" /> </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> </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> <input type="text" name="totalQuantity" id="totalQuantity" value="<?=isset($_POST['totalQuantity']) ? $_POST['totalQuantity']: 0 ?>" class="form-control sub_form_controll" style="height: 30px;"> </div> </div> </div> <div class="col-md-2"> <div class="form-group"> <div class="col-md-12"> <label class="control-label">Total Value:</label> <input type="text" name="totalValue" id="totalValue" value="<?=isset($_POST['totalValue']) ? $_POST['totalValue']: 0 ?>" class="form-control sub_form_controll" style="height: 30px;"> </div> </div> </div> <div class="col-md-2"> <div class="form-group"> <div class="col-md-12"> <label class="control-label">Discount(%):</label> <input type="text" name="discount" id="discount" value="<?=isset($_POST['discount']) ? $_POST['discount']: 0 ?>" class="form-control" style="height: 30px;"> </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <div class="col-md-12"> <label class="control-label">Net Value:</label> <input type="text" name="netValue" id="netValue" value="<?=isset($_POST['netValue']) ? $_POST['netValue']: 0 ?>" class="form-control sub_form_controll" style="height: 30px;"> </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 type="text" name="indianValue" id="indianValue" value="<?=isset($_POST['indianValue']) ? $_POST['indianValue']: 0 ?>" class="form-control sub_form_controll" style="height: 30px;"> </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> <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> <!--/row--> <!--/row--> <br> <!-- <div class="form-actions"> <div class="row"> <div class="col-md-8"> <div class="row"> <div class="col-md-offset-3 col-md-9"> <input type="submit" name="submitcustomer" value="Add New Customer" class="btn" style=" width:50%; color:#FFFFFF; background:#485b7f;"> <a href="<?php echo base_url(); ?>dashboard/customer_master_details" class="btn default" style=" width:20%;">Cancel</a> </div> </div> </div> </div> </div>--> </div> </div> </span> </div> <div class="doc_main"></div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER -->