changes in amendment purchase order vadivel J 21-11-2024

This commit is contained in:
vadivelJ96 2024-11-22 17:23:54 +05:30
parent 387c2af713
commit 00f1a98071
3 changed files with 505 additions and 349 deletions

View File

@ -231,6 +231,7 @@ class Amendmentpurchaseorder extends BaseController
{ {
$NewPO = ''; $NewPO = '';
$MAD = ''; $MAD = '';
$changeStatus = $this->request->getPost('changeStatus');
$PONO = $this->request->getPost('txtPONO'); $PONO = $this->request->getPost('txtPONO');
$POdt = $this->request->getPost('PODate'); $POdt = $this->request->getPost('PODate');
$PODate = get_date_time_format($POdt); $PODate = get_date_time_format($POdt);
@ -306,7 +307,7 @@ class Amendmentpurchaseorder extends BaseController
} }
$AmendmentNewPoNo = generate_amendment_po_number($PONO); $AmendmentNewPoNo = generate_amendment_po_number($PONO);
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult); $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus == 1 ? PO_RELEASED : PO_DRAFT, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult);
$file = $this->request->getFile('POFile'); $file = $this->request->getFile('POFile');
$requestfilename = $file->getName(); $requestfilename = $file->getName();
$PrePOFile = $this->request->getPost('PrePOFile'); $PrePOFile = $this->request->getPost('PrePOFile');
@ -329,7 +330,10 @@ class Amendmentpurchaseorder extends BaseController
} else { } else {
$POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null;
} }
// print_r($POMaster);die;
// print_r($POMaster);
// echo 'end';
// die;
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO); $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
@ -578,6 +582,7 @@ class Amendmentpurchaseorder extends BaseController
echo 'Purchase Order Amended Successfully! PO Number Is: ' . $PONO . '- New PO Number is' . $NewPO; echo 'Purchase Order Amended Successfully! PO Number Is: ' . $PONO . '- New PO Number is' . $NewPO;
} }
/** /**

View File

@ -131,14 +131,17 @@ if (!empty($INRSYMBOL)) {
<!-- Latest compiled and minified CSS --> <!-- Latest compiled and minified CSS -->
<style> <style>
.modal { overflow: auto !important; } .modal {
overflow: auto !important;
}
.text-right { .text-right {
text-align: right !important; text-align: right !important;
} }
.text-center { .text-center {
text-align: center !important; text-align: center !important;
} }
</style> </style>
<script src="<?php echo base_url() ?>public/assets/tinymce/js/tinymce/tinymce.min.js"></script> <script src="<?php echo base_url() ?>public/assets/tinymce/js/tinymce/tinymce.min.js"></script>
@ -169,7 +172,7 @@ if (!empty($INRSYMBOL)) {
var DelDt = '<?php echo $Deliverydt; ?>'; var DelDt = '<?php echo $Deliverydt; ?>';
var insurancestatus = '<?php echo $insurencestatus; ?>'; var insurancestatus = '<?php echo $insurencestatus; ?>';
var InsuranceNumber = '<?php echo $insurenceno; ?>'; var InsuranceNumber = '<?php echo $insurenceno; ?>';
$(document).ready(function() { $(document).ready(function () {
// $('#RequistionNo').attr("style", "pointer-events: none;"); // $('#RequistionNo').attr("style", "pointer-events: none;");
$('#drpSupplier').attr("style", "pointer-events: none;"); $('#drpSupplier').attr("style", "pointer-events: none;");
@ -233,7 +236,7 @@ if (!empty($INRSYMBOL)) {
Mat: [] Mat: []
}; };
// alert(new Date(year,month,day)); // alert(new Date(year,month,day));
$(function() { $(function () {
$("#PODate").datepicker({ $("#PODate").datepicker({
minDate: d, minDate: d,
@ -255,7 +258,7 @@ if (!empty($INRSYMBOL)) {
maxDate : 'now', maxDate : 'now',
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
}); */ }); */
$('#drpSupplier').change(function() { $('#drpSupplier').change(function () {
var cd = $("#drpSupplier option:selected").text(); var cd = $("#drpSupplier option:selected").text();
//alert(cd); //alert(cd);
$("#changeSup").val(cd); $("#changeSup").val(cd);
@ -265,7 +268,7 @@ if (!empty($INRSYMBOL)) {
if (id != '0') { if (id != '0') {
var y = <?php echo json_encode($Suplist, JSON_PRETTY_PRINT) ?>; var y = <?php echo json_encode($Suplist, JSON_PRETTY_PRINT) ?>;
$.each(y, function(idx, obj) { $.each(y, function (idx, obj) {
if (obj.SupplierID === id) { if (obj.SupplierID === id) {
if (obj.MSME) { if (obj.MSME) {
$("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address);
@ -282,7 +285,7 @@ if (!empty($INRSYMBOL)) {
}); });
$('#EditDiscountType').change(function() { $('#EditDiscountType').change(function () {
selValue = $("#EditDiscountType").val(); selValue = $("#EditDiscountType").val();
$('#txtEditDiscount').val(''); $('#txtEditDiscount').val('');
$('#txtEditAfterDiscount').val(''); $('#txtEditAfterDiscount').val('');
@ -303,7 +306,7 @@ if (!empty($INRSYMBOL)) {
}); });
$('#EditPackagingType').change(function() { $('#EditPackagingType').change(function () {
$('#txtEditPackaging').val(''); $('#txtEditPackaging').val('');
$('#txtEditAfterPackaging').val(''); $('#txtEditAfterPackaging').val('');
selValue = $("#EditPackagingType").val(); selValue = $("#EditPackagingType").val();
@ -328,7 +331,7 @@ if (!empty($INRSYMBOL)) {
$('#drpEditFreight').change(function() { $('#drpEditFreight').change(function () {
var FreightType = $("#drpEditFreight").val(); var FreightType = $("#drpEditFreight").val();
@ -684,9 +687,7 @@ if (!empty($INRSYMBOL)) {
//alert((FreightValue/100) * (basicValue-AfterDiscount)); //alert((FreightValue/100) * (basicValue-AfterDiscount));
//alert(((FreightValue/100) * basicValue)); //alert(((FreightValue/100) * basicValue));
//alert(FreightCalculation); //alert(FreightCalculation);
if (FreightCalculation == 0) if (FreightCalculation == 0) {
{
AfterFreight = <?php echo FREIGHT_PERCENTAGE; ?>; AfterFreight = <?php echo FREIGHT_PERCENTAGE; ?>;
} else { } else {
AfterFreight = <?php echo FREIGHT_PERCENTAGE_AFTER; ?>; AfterFreight = <?php echo FREIGHT_PERCENTAGE_AFTER; ?>;
@ -847,30 +848,30 @@ if (!empty($INRSYMBOL)) {
//alert('tot:'+tot); //alert('tot:'+tot);
return tot; return tot;
} }
$(document).ready(function() { $(document).ready(function () {
$("#PaymentTerms").select2(); $("#PaymentTerms").select2();
$('#Date').click(function() { $('#Date').click(function () {
//for Date range selection //for Date range selection
$('#Schedulediv').hide(); $('#Schedulediv').hide();
$('#Deliverydtdiv').show(); $('#Deliverydtdiv').show();
}); });
$('#Schedule').click(function() { $('#Schedule').click(function () {
//for schedule range selection //for schedule range selection
$('#Deliverydtdiv').hide(); $('#Deliverydtdiv').hide();
$('#Schedulediv').show(); $('#Schedulediv').show();
}); });
SetVatorCST(); SetVatorCST();
}); });
$(document).ready(function() { $(document).ready(function () {
$('#Local').click(function() { $('#Local').click(function () {
//for Date range selection //for Date range selection
$('#IGSTShow').hide(); $('#IGSTShow').hide();
$('#SGSTShow').show(); $('#SGSTShow').show();
$('#SGSTModel').show(); // SGST Fields in Modal Show $('#SGSTModel').show(); // SGST Fields in Modal Show
$('#IGSTModel').hide(); // IGST Fields in Modal Hide $('#IGSTModel').hide(); // IGST Fields in Modal Hide
}); });
$('#Inter_state').click(function() { $('#Inter_state').click(function () {
//for schedule range selection //for schedule range selection
$('#SGSTShow').hide(); $('#SGSTShow').hide();
$('#IGSTShow').show(); $('#IGSTShow').show();
@ -931,7 +932,8 @@ if (!empty($INRSYMBOL)) {
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4><?= "Amendment Revenue Purchase Order - $PONO "; ?></h4> <h4><?= "Amendment Revenue Purchase Order - $PONO "; ?></h4>
<a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-secondary" id="back" value="Back">Back</a> <a href="<?php echo base_url() ?>amendmentpurchaseorder" class="btn btn-secondary" id="back"
value="Back">Back</a>
</div> </div>
</div> </div>
</div> </div>
@ -952,7 +954,7 @@ if (!empty($INRSYMBOL)) {
<?php <?php
$options = array("0" => 'Selected Requisition Numbers'); $options = array("0" => 'Selected Requisition Numbers');
if (!empty($ReqList)) { if (!empty($ReqList)) {
foreach ($ReqList as $SID) : foreach ($ReqList as $SID):
$options[$SID->ReqNo] = $SID->ReqNo; $options[$SID->ReqNo] = $SID->ReqNo;
//$ReqType = $SID->ReqType; //$ReqType = $SID->ReqType;
@ -975,7 +977,7 @@ if (!empty($INRSYMBOL)) {
//print_r( $options); //print_r( $options);
if (!empty($Suplist)) { if (!empty($Suplist)) {
foreach ($Suplist as $SID) : foreach ($Suplist as $SID):
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName;
endforeach; endforeach;
} }
@ -1021,13 +1023,14 @@ if (!empty($INRSYMBOL)) {
<label>Delivery Date<span class="text-danger">*</span></label> <label>Delivery Date<span class="text-danger">*</span></label>
<div> <div>
<?php <?php
$data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;', 'min' => date('d-m-Y'),); $data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;', 'min' => date('d-m-Y'), );
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> </div>
<div class="form-group col-md-3" id="Schedulediv" style="display:none;"> <div class="form-group col-md-3" id="Schedulediv" style="display:none;">
<input type="hidden" name="beforeScheduleby" value="<?php echo $DeliverSchedule; ?>"> <input type="hidden" name="beforeScheduleby"
value="<?php echo $DeliverSchedule; ?>">
<label>Schedule By<span class="text-danger">*</span></label> <label>Schedule By<span class="text-danger">*</span></label>
<?php <?php
$data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby', $DeliverSchedule), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); $data = array('name' => 'Scheduleby', 'value' => set_value('Scheduleby', $DeliverSchedule), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110');
@ -1040,7 +1043,8 @@ if (!empty($INRSYMBOL)) {
<?php <?php
$data = array('name' => 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'readonly' => 'true'); $data = array('name' => 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'readonly' => 'true');
echo Form_textarea($data); echo Form_textarea($data);
?> <input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress" value="<?php echo $DeliveryAddress; ?>"> ?> <input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress"
value="<?php echo $DeliveryAddress; ?>">
</div> </div>
</div> </div>
</div> </div>
@ -1108,7 +1112,7 @@ if (!empty($INRSYMBOL)) {
if (!empty($PoTypeOptions)) { if (!empty($PoTypeOptions)) {
foreach ($PoTypeOptions as $POpt) : foreach ($PoTypeOptions as $POpt):
$optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue;
@ -1144,13 +1148,14 @@ if (!empty($INRSYMBOL)) {
//echo "$pay2->PaymentTerms"; //echo "$pay2->PaymentTerms";
?> ?>
<input type="hidden" name="beforePaymentTermsText" value="<?php echo $pay2->PaymentTerms ?>"> <input type="hidden" name="beforePaymentTermsText"
value="<?php echo $pay2->PaymentTerms ?>">
<?php <?php
$optionsPay[$pay2->PaymentID] = $pay2->PaymentTerms; $optionsPay[$pay2->PaymentID] = $pay2->PaymentTerms;
} }
foreach ($Payment as $pay1) : foreach ($Payment as $pay1):
if ($Terms != $pay1->PaymentID) { if ($Terms != $pay1->PaymentID) {
@ -1214,7 +1219,8 @@ if (!empty($INRSYMBOL)) {
<br> <br>
<div class="form-row"> <div class="form-row">
<div class="table-responsive"> <div class="table-responsive">
<table id="revenueTax" class="table table-striped table-hover mb-0" style="font-size:12px;"> <table id="revenueTax" class="table table-striped table-hover mb-0"
style="font-size:12px;">
<thead> <thead>
<tr> <tr>
@ -1248,69 +1254,178 @@ if (!empty($INRSYMBOL)) {
<td><?php echo $record->UOM ?></td> <td><?php echo $record->UOM ?></td>
<td align="right"><?php echo $record->Rate ?></td> <td align="right"><?php echo $record->Rate ?></td>
<td align="right"><?php echo number_format($record->BasicValue, 2, '.', '') ?></td> <td align="right">
<?php echo number_format($record->BasicValue, 2, '.', '') ?></td>
<td align="right"><?php echo $record->Taxamount ?></td> <td align="right"><?php echo $record->Taxamount ?></td>
<td align="right"><?php echo $record->TotalValue ?></td> <td align="right"><?php echo $record->TotalValue ?></td>
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" /> <input type="hidden" name="<?php echo 'Reqnumber' . $index ?>"
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" /> id="<?php echo 'Reqnumber' . $index ?>"
<input type="hidden" name="<?php echo 'AvlAmount' . $index ?>" id="<?php echo 'AvlAmount' . $index ?>" value="<?php echo $AvlAmount; ?>" /> value="<?php echo $record->ReqNo; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>" id="<?php echo 'LineItemNo' . $index ?>" value="<?php echo $record->LineItemNo; ?>" /> <input type="hidden" name="<?php echo 'departmentName' . $index ?>"
<input type="hidden" name="<?php echo 'costCode' . $index ?>" id="<?php echo 'costCode' . $index ?>" value="<?php echo $record->CostCenterCode; ?>" /> id="<?php echo 'departmentName' . $index ?>"
<input type="hidden" name="<?php echo 'materialCode' . $index ?>" id="<?php echo 'materialCode' . $index ?>" value="<?php echo $record->MaterialCode; ?>" /> value="<?php echo $record->DepartmentName; ?>" />
<input type="hidden" name="<?php echo 'materialName' . $index ?>" id="<?php echo 'materialName' . $index ?>" value="<?php echo $record->MaterialName; ?>" /> <input type="hidden" name="<?php echo 'AvlAmount' . $index ?>"
<input type="hidden" name="<?php echo 'uom' . $index ?>" id="<?php echo 'uom' . $index ?>" value="<?php echo $record->UOM; ?>" /> id="<?php echo 'AvlAmount' . $index ?>"
<input type="hidden" name="<?php echo 'quantity' . $index ?>" id="<?php echo 'quantity' . $index ?>" value="<?php echo $record->Quantity; ?>" /> value="<?php echo $AvlAmount; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo' . $index ?>"
id="<?php echo 'LineItemNo' . $index ?>"
value="<?php echo $record->LineItemNo; ?>" />
<input type="hidden" name="<?php echo 'costCode' . $index ?>"
id="<?php echo 'costCode' . $index ?>"
value="<?php echo $record->CostCenterCode; ?>" />
<input type="hidden" name="<?php echo 'materialCode' . $index ?>"
id="<?php echo 'materialCode' . $index ?>"
value="<?php echo $record->MaterialCode; ?>" />
<input type="hidden" name="<?php echo 'materialName' . $index ?>"
id="<?php echo 'materialName' . $index ?>"
value="<?php echo $record->MaterialName; ?>" />
<input type="hidden" name="<?php echo 'uom' . $index ?>"
id="<?php echo 'uom' . $index ?>"
value="<?php echo $record->UOM; ?>" />
<input type="hidden" name="<?php echo 'quantity' . $index ?>"
id="<?php echo 'quantity' . $index ?>"
value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'itemRate' . $index ?>" id="<?php echo 'itemRate' . $index ?>" value="<?php echo $record->Rate; ?>" /> <input type="hidden" name="<?php echo 'itemRate' . $index ?>"
<input type="hidden" name="<?php echo 'per' . $index ?>" id="<?php echo 'per' . $index ?>" value="<?php echo $record->Per; ?>" /> id="<?php echo 'itemRate' . $index ?>"
<input type="hidden" name="<?php echo 'service_description' . $index ?>" id="<?php echo 'service_description' . $index ?>" value="<?php echo $record->ServiceMaterialDescription; ?>" /> value="<?php echo $record->Rate; ?>" />
<input type="hidden" name="<?php echo 'per' . $index ?>"
id="<?php echo 'per' . $index ?>"
value="<?php echo $record->Per; ?>" />
<input type="hidden" name="<?php echo 'service_description' . $index ?>"
id="<?php echo 'service_description' . $index ?>"
value="<?php echo $record->ServiceMaterialDescription; ?>" />
<input type="hidden" name="<?php echo 'DisType' . $index ?>" id="<?php echo 'DisType' . $index ?>" value="<?php echo $record->DiscountType; ?>" /> <input type="hidden" name="<?php echo 'DisType' . $index ?>"
<input type="hidden" name="<?php echo 'beforeDisType' . $index ?>" id="<?php echo 'beforeDisType' . $index ?>" value="<?php echo $record->DiscountType; ?>" /> id="<?php echo 'DisType' . $index ?>"
<input type="hidden" name="<?php echo 'DisVal' . $index ?>" id="<?php echo 'DisVal' . $index ?>" value="<?php echo $record->DiscountValue; ?>" /> value="<?php echo $record->DiscountType; ?>" />
<input type="hidden" name="<?php echo 'beforeDisVal' . $index ?>" id="<?php echo 'beforeDisVal' . $index ?>" value="<?php echo $record->DiscountValue; ?>" /> <input type="hidden" name="<?php echo 'beforeDisType' . $index ?>"
<input type="hidden" name="<?php echo 'AfterDisVal' . $index ?>" id="<?php echo 'AfterDisVal' . $index ?>" value="<?php echo $record->AfterDiscount; ?>" /> id="<?php echo 'beforeDisType' . $index ?>"
<input type="hidden" name="<?php echo 'beforeAfterDisVal' . $index ?>" id="<?php echo 'beforeAfterDisVal' . $index ?>" value="<?php echo $record->AfterDiscount; ?>" /> value="<?php echo $record->DiscountType; ?>" />
<input type="hidden" name="<?php echo 'PackOption' . $index ?>" id="<?php echo 'PackOption' . $index ?>" value="<?php echo $record->PackagingCalulatedOn; ?>" /> <input type="hidden" name="<?php echo 'DisVal' . $index ?>"
<input type="hidden" name="<?php echo 'PackType' . $index ?>" id="<?php echo 'PackType' . $index ?>" value="<?php echo $record->PackagingType; ?>" /> id="<?php echo 'DisVal' . $index ?>"
<input type="hidden" name="<?php echo 'beforePackType' . $index ?>" id="<?php echo 'beforePackType' . $index ?>" value="<?php echo $record->PackagingType; ?>" /> value="<?php echo $record->DiscountValue; ?>" />
<input type="hidden" name="<?php echo 'PackVal' . $index ?>" id="<?php echo 'PackVal' . $index ?>" value="<?php echo $record->PackagingValue; ?>" /> <input type="hidden" name="<?php echo 'beforeDisVal' . $index ?>"
<input type="hidden" name="<?php echo 'beforePackVal' . $index ?>" id="<?php echo 'beforePackVal' . $index ?>" value="<?php echo $record->PackagingValue; ?>" /> id="<?php echo 'beforeDisVal' . $index ?>"
<input type="hidden" name="<?php echo 'AfterPackVal' . $index ?>" id="<?php echo 'AfterPackVal' . $index ?>" value="<?php echo $record->AfterPackagingValue; ?>" /> value="<?php echo $record->DiscountValue; ?>" />
<input type="hidden" name="<?php echo 'beforeAfterPackVal' . $index ?>" id="<?php echo 'beforeAfterPackVal' . $index ?>" value="<?php echo $record->AfterPackagingValue; ?>" /> <input type="hidden" name="<?php echo 'AfterDisVal' . $index ?>"
<input type="hidden" name="<?php echo 'VatOption' . $index ?>" id="<?php echo 'VatOption' . $index ?>" value="<?php echo isset($record->VatCalulatedOn) ? $record->VatCalulatedOn : ''; ?>" /> id="<?php echo 'AfterDisVal' . $index ?>"
<input type="hidden" name="<?php echo 'VatVal' . $index ?>" id="<?php echo 'VatVal' . $index ?>" value="<?php echo $record->SGST; ?>" /> <!-- SGST--> value="<?php echo $record->AfterDiscount; ?>" />
<input type="hidden" name="<?php echo 'beforeVatVal' . $index ?>" id="<?php echo 'beforeVatVal' . $index ?>" value="<?php echo $record->SGST; ?>" /><!-- SGST--> <input type="hidden" name="<?php echo 'beforeAfterDisVal' . $index ?>"
<input type="hidden" name="<?php echo 'AfterVatVal' . $index ?>" id="<?php echo 'AfterVatVal' . $index ?>" value="<?php echo $record->AfterSGST; ?>" /><!-- SGST--> id="<?php echo 'beforeAfterDisVal' . $index ?>"
<input type="hidden" name="<?php echo 'beforeAfterVatVal' . $index ?>" id="<?php echo 'beforeAfterVatVal' . $index ?>" value="<?php echo $record->AfterSGST; ?>" /><!-- SGST--> value="<?php echo $record->AfterDiscount; ?>" />
<input type="hidden" name="<?php echo 'GSTVal' . $index ?>" id="<?php echo 'GSTVal' . $index ?>" value="<?php echo $record->CGST; ?>" /><!-- CGST--> <input type="hidden" name="<?php echo 'PackOption' . $index ?>"
<input type="hidden" name="<?php echo 'beforeGSTVal' . $index ?>" id="<?php echo 'beforeGSTVal' . $index ?>" value="<?php echo $record->CGST; ?>" /><!-- CGST--> id="<?php echo 'PackOption' . $index ?>"
<input type="hidden" name="<?php echo 'AfterGSTVal' . $index ?>" id="<?php echo 'AfterGSTVal' . $index ?>" value="<?php echo $record->AfterCGST; ?>" /><!-- CGST--> value="<?php echo $record->PackagingCalulatedOn; ?>" />
<input type="hidden" name="<?php echo 'beforeAfterGSTVal' . $index ?>" id="<?php echo 'beforeAfterGSTVal' . $index ?>" value="<?php echo $record->AfterCGST; ?>" /><!-- CGST--> <input type="hidden" name="<?php echo 'PackType' . $index ?>"
<input type="hidden" name="<?php echo 'OtherTaxVal' . $index ?>" id="<?php echo 'OtherTaxVal' . $index ?>" value="<?php echo $record->IGST; ?>" /><!-- IGST--> id="<?php echo 'PackType' . $index ?>"
<input type="hidden" name="<?php echo 'beforeOtherTaxVal' . $index ?>" id="<?php echo 'beforeOtherTaxVal' . $index ?>" value="<?php echo $record->IGST; ?>" /><!-- IGST--> value="<?php echo $record->PackagingType; ?>" />
<input type="hidden" name="<?php echo 'AfterOtherTaxVal' . $index ?>" id="<?php echo 'AfterOtherTaxVal' . $index ?>" value="<?php echo $record->AfterIGST; ?>" /><!-- IGST--> <input type="hidden" name="<?php echo 'beforePackType' . $index ?>"
<input type="hidden" name="<?php echo 'beforeAfterOtherTaxVal' . $index ?>" id="<?php echo 'beforeAfterOtherTaxVal' . $index ?>" value="<?php echo $record->AfterIGST; ?>" /><!-- IGST--> id="<?php echo 'beforePackType' . $index ?>"
value="<?php echo $record->PackagingType; ?>" />
<input type="hidden" name="<?php echo 'PackVal' . $index ?>"
id="<?php echo 'PackVal' . $index ?>"
value="<?php echo $record->PackagingValue; ?>" />
<input type="hidden" name="<?php echo 'beforePackVal' . $index ?>"
id="<?php echo 'beforePackVal' . $index ?>"
value="<?php echo $record->PackagingValue; ?>" />
<input type="hidden" name="<?php echo 'AfterPackVal' . $index ?>"
id="<?php echo 'AfterPackVal' . $index ?>"
value="<?php echo $record->AfterPackagingValue; ?>" />
<input type="hidden" name="<?php echo 'beforeAfterPackVal' . $index ?>"
id="<?php echo 'beforeAfterPackVal' . $index ?>"
value="<?php echo $record->AfterPackagingValue; ?>" />
<input type="hidden" name="<?php echo 'VatOption' . $index ?>"
id="<?php echo 'VatOption' . $index ?>"
value="<?php echo isset($record->VatCalulatedOn) ? $record->VatCalulatedOn : ''; ?>" />
<input type="hidden" name="<?php echo 'VatVal' . $index ?>"
id="<?php echo 'VatVal' . $index ?>"
value="<?php echo $record->SGST; ?>" /> <!-- SGST-->
<input type="hidden" name="<?php echo 'beforeVatVal' . $index ?>"
id="<?php echo 'beforeVatVal' . $index ?>"
value="<?php echo $record->SGST; ?>" /><!-- SGST-->
<input type="hidden" name="<?php echo 'AfterVatVal' . $index ?>"
id="<?php echo 'AfterVatVal' . $index ?>"
value="<?php echo $record->AfterSGST; ?>" /><!-- SGST-->
<input type="hidden" name="<?php echo 'beforeAfterVatVal' . $index ?>"
id="<?php echo 'beforeAfterVatVal' . $index ?>"
value="<?php echo $record->AfterSGST; ?>" /><!-- SGST-->
<input type="hidden" name="<?php echo 'GSTVal' . $index ?>"
id="<?php echo 'GSTVal' . $index ?>"
value="<?php echo $record->CGST; ?>" /><!-- CGST-->
<input type="hidden" name="<?php echo 'beforeGSTVal' . $index ?>"
id="<?php echo 'beforeGSTVal' . $index ?>"
value="<?php echo $record->CGST; ?>" /><!-- CGST-->
<input type="hidden" name="<?php echo 'AfterGSTVal' . $index ?>"
id="<?php echo 'AfterGSTVal' . $index ?>"
value="<?php echo $record->AfterCGST; ?>" /><!-- CGST-->
<input type="hidden" name="<?php echo 'beforeAfterGSTVal' . $index ?>"
id="<?php echo 'beforeAfterGSTVal' . $index ?>"
value="<?php echo $record->AfterCGST; ?>" /><!-- CGST-->
<input type="hidden" name="<?php echo 'OtherTaxVal' . $index ?>"
id="<?php echo 'OtherTaxVal' . $index ?>"
value="<?php echo $record->IGST; ?>" /><!-- IGST-->
<input type="hidden" name="<?php echo 'beforeOtherTaxVal' . $index ?>"
id="<?php echo 'beforeOtherTaxVal' . $index ?>"
value="<?php echo $record->IGST; ?>" /><!-- IGST-->
<input type="hidden" name="<?php echo 'AfterOtherTaxVal' . $index ?>"
id="<?php echo 'AfterOtherTaxVal' . $index ?>"
value="<?php echo $record->AfterIGST; ?>" /><!-- IGST-->
<input type="hidden"
name="<?php echo 'beforeAfterOtherTaxVal' . $index ?>"
id="<?php echo 'beforeAfterOtherTaxVal' . $index ?>"
value="<?php echo $record->AfterIGST; ?>" /><!-- IGST-->
<!-- <input type="hidden" name="<?php echo 'FreightOption' . $index ?>" id="<?php echo 'FreightOption' . $index ?>" value="<?php echo isset($record->FreightCalulatedOn) ? $record->FreightCalulatedOn : ''; ?>" /> --> <!-- <input type="hidden" name="<?php echo 'FreightOption' . $index ?>" id="<?php echo 'FreightOption' . $index ?>" value="<?php echo isset($record->FreightCalulatedOn) ? $record->FreightCalulatedOn : ''; ?>" /> -->
<input type="hidden" name="<?php echo 'FreightType' . $index ?>" id="<?php echo 'FreightType' . $index ?>" value="<?php echo $record->FreightType; ?>" /> <input type="hidden" name="<?php echo 'FreightType' . $index ?>"
<input type="hidden" name="<?php echo 'beforeFreightType' . $index ?>" id="<?php echo 'beforeFreightType' . $index ?>" value="<?php echo $record->FreightType; ?>" /> id="<?php echo 'FreightType' . $index ?>"
<input type="hidden" name="<?php echo 'FreightVal' . $index ?>" id="<?php echo 'FreightVal' . $index ?>" value="<?php echo $record->FreightValue; ?>" /> value="<?php echo $record->FreightType; ?>" />
<input type="hidden" name="<?php echo 'beforeFreightVal' . $index ?>" id="<?php echo 'beforeFreightVal' . $index ?>" value="<?php echo $record->FreightValue; ?>" /> <input type="hidden" name="<?php echo 'beforeFreightType' . $index ?>"
<input type="hidden" name="<?php echo 'AfterFreightVal' . $index ?>" id="<?php echo 'AfterFreightVal' . $index ?>" value="<?php echo $record->AfterFreightValue; ?>" /> id="<?php echo 'beforeFreightType' . $index ?>"
<input type="hidden" name="<?php echo 'beforeAfterFreightVal' . $index ?>" id="<?php echo 'before-AfterFreightVal' . $index ?>" value="<?php echo $record->AfterFreightValue; ?>" /> value="<?php echo $record->FreightType; ?>" />
<input type="hidden" name="<?php echo 'Nooftrips' . $index ?>" id="<?php echo 'Nooftrips' . $index ?>" value="<?php echo $record->NoOfTrip; ?>" /> <input type="hidden" name="<?php echo 'FreightVal' . $index ?>"
<input type="hidden" name="<?php echo 'beforeNooftrips' . $index ?>" id="<?php echo 'beforeNooftrips' . $index ?>" value="<?php echo $record->NoOfTrip; ?>" /> id="<?php echo 'FreightVal' . $index ?>"
<input type="hidden" name="<?php echo 'basicval' . $index ?>" id="<?php echo 'basicval' . $index ?>" value="<?php echo $record->BasicValue; ?>" /> value="<?php echo $record->FreightValue; ?>" />
<input type="hidden" name="<?php echo 'Insval' . $index ?>" id="<?php echo 'Insval' . $index ?>" value="<?php echo $record->Insurance; ?>" /> <input type="hidden" name="<?php echo 'beforeFreightVal' . $index ?>"
<input type="hidden" name="<?php echo 'beforeInsval' . $index ?>" id="<?php echo 'beforeInsval' . $index ?>" value="<?php echo $record->Insurance; ?>" /> id="<?php echo 'beforeFreightVal' . $index ?>"
<input type="hidden" name="<?php echo 'TotalOrderValue' . $index ?>" id="<?php echo 'TotalOrderValue' . $index ?>" value="<?php echo $record->TotalValue; ?>" /> value="<?php echo $record->FreightValue; ?>" />
<input type="hidden" name="<?php echo 'beforeqty' . $index ?>" id="<?php echo 'beforeqty' . $index ?>" value="<?php echo $record->Quantity; ?>" /> <input type="hidden" name="<?php echo 'AfterFreightVal' . $index ?>"
<input type="hidden" name="<?php echo 'beforeitemRate' . $index ?>" id="<?php echo 'beforeitemRate' . $index ?>" value="<?php echo $record->Rate; ?>" /> id="<?php echo 'AfterFreightVal' . $index ?>"
value="<?php echo $record->AfterFreightValue; ?>" />
<input type="hidden"
name="<?php echo 'beforeAfterFreightVal' . $index ?>"
id="<?php echo 'before-AfterFreightVal' . $index ?>"
value="<?php echo $record->AfterFreightValue; ?>" />
<input type="hidden" name="<?php echo 'Nooftrips' . $index ?>"
id="<?php echo 'Nooftrips' . $index ?>"
value="<?php echo $record->NoOfTrip; ?>" />
<input type="hidden" name="<?php echo 'beforeNooftrips' . $index ?>"
id="<?php echo 'beforeNooftrips' . $index ?>"
value="<?php echo $record->NoOfTrip; ?>" />
<input type="hidden" name="<?php echo 'basicval' . $index ?>"
id="<?php echo 'basicval' . $index ?>"
value="<?php echo $record->BasicValue; ?>" />
<input type="hidden" name="<?php echo 'Insval' . $index ?>"
id="<?php echo 'Insval' . $index ?>"
value="<?php echo $record->Insurance; ?>" />
<input type="hidden" name="<?php echo 'beforeInsval' . $index ?>"
id="<?php echo 'beforeInsval' . $index ?>"
value="<?php echo $record->Insurance; ?>" />
<input type="hidden" name="<?php echo 'TotalOrderValue' . $index ?>"
id="<?php echo 'TotalOrderValue' . $index ?>"
value="<?php echo $record->TotalValue; ?>" />
<input type="hidden" name="<?php echo 'beforeqty' . $index ?>"
id="<?php echo 'beforeqty' . $index ?>"
value="<?php echo $record->Quantity; ?>" />
<input type="hidden" name="<?php echo 'beforeitemRate' . $index ?>"
id="<?php echo 'beforeitemRate' . $index ?>"
value="<?php echo $record->Rate; ?>" />
<td> <a data-target='#EDITREVENUE' data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-toggle="modal" href="#EDITREVENUE"><i class="ri-pencil-fill"></i></a> <td> <a data-target='#EDITREVENUE' data-id="<?php echo $index; ?>"
data-userid="<?php echo $index; ?>" data-toggle="modal"
href="#EDITREVENUE"><i class="ri-pencil-fill"></i></a>
<!-- <td> <a data-toggle="tooltip" href="#"><i class="ri-pencil-fill" data-toggle="tooltip" title="<?php //echo $record->ReqNo; <!-- <td> <a data-toggle="tooltip" href="#"><i class="ri-pencil-fill" data-toggle="tooltip" title="<?php //echo $record->ReqNo;
?> - Click here to view Requistion details"></i>&nbsp;&nbsp;&nbsp;</a> </td> --> ?> - Click here to view Requistion details"></i>&nbsp;&nbsp;&nbsp;</a> </td> -->
@ -1421,7 +1536,8 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Total Order Amount <?php echo "($INRSYM)" ?> </label> <label>Total Order Amount <?php echo "($INRSYM)" ?> </label>
<input type="hidden" name="preTotalOdervalue" value="<?php echo $totOrderSummaryAmt; ?>"> <input type="hidden" name="preTotalOdervalue"
value="<?php echo $totOrderSummaryAmt; ?>">
<?php <?php
$data = array('name' => 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); $data = array('name' => 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data); echo form_input($data);
@ -1442,21 +1558,29 @@ if (!empty($INRSYMBOL)) {
<div> <div>
<input type="file" name="POFile" id="POFile"> <input type="file" name="POFile" id="POFile">
<?php if ($PrePOFile) { ?> <?php if ($PrePOFile) { ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label> <label><a title="previously uploaded PO File"
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously
uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?> <?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br> <input type="hidden" id="PrePOFile" name="PrePOFile"
value="<?php echo $PrePOFile; ?>" /><br>
</div> </div>
<div class="btn-container" style="text-align: right;"> <div class="btn-container" style="text-align: right;">
<input type="button" class="btn btn-success" value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
<input type="hidden" name="txtPoRange" id="txtPoRange" /> <input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" /> <input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" /> <input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" /> <input type="hidden" name="txtRowCount" id="txtRowCount"
value="<?php echo $RowCount; ?>" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" /> <input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" /> <input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" >&nbsp;&nbsp;<span class="bold">Save</span></a> --> <input type="button" class="btn btn-secondary" value="Cancel"
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a> onClick="window.location ='amendmentpurchaseorder';">
<a class="btn btn-primary Save" onclick="Save(0)">&nbsp;&nbsp;<span
class="bold">Draft</span></a>
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span
class="bold">Approve</span></a>
<!-- <input type="reset" class="btn btn-success" value = "OK"> --> <!-- <input type="reset" class="btn btn-success" value = "OK"> -->
</div> </div>
@ -1501,23 +1625,23 @@ if (!empty($INRSYMBOL)) {
</div> <!-- content --> </div> <!-- content -->
</div> </div>
<!-- Modal for Packing Calculation --> <!-- Modal for Packing Calculation -->
<div id="packagingcalmodel" class="modal fade" tabindex="-1" role="dialog" <div id="packagingcalmodel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Packing Calculation On</h4> <h4 class="modal-title">Packing Calculation On</h4>
<button type="button" class="close" data-dismiss="modal" <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
aria-hidden="true">×</button>
</div> </div>
<div class="modal-body p-4"> <div class="modal-body p-4">
<form> <form>
<div > <div>
<input type="radio" name="optPackaging" checked="checked" value="0" id="optPackagingBasicAmount"> <input type="radio" name="optPackaging" checked="checked" value="0"
id="optPackagingBasicAmount">
<label for="optPackagingBasicAmount">Basic Amount</label> <label for="optPackagingBasicAmount">Basic Amount</label>
</div> </div>
<div > <div>
<input type="radio" name="optPackaging" id="optPackagingAfterDiscountAmount" value="1"> <input type="radio" name="optPackaging" id="optPackagingAfterDiscountAmount" value="1">
<label for="optPackagingAfterDiscountAmount">After Discount Amount</label> <label for="optPackagingAfterDiscountAmount">After Discount Amount</label>
</div> </div>
@ -1527,25 +1651,26 @@ if (!empty($INRSYMBOL)) {
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-secondary" data-dismiss="modal" value="Cancel">Cancel</a> <a class="btn btn-secondary" data-dismiss="modal" value="Cancel">Cancel</a>
&nbsp;&nbsp; &nbsp;&nbsp;
<a class="btn btn-success" ID="PackagingOption" onclick="SetPackagingOption();" >&nbsp;&nbsp;<span class="bold">Ok</span></a> <a class="btn btn-success" ID="PackagingOption" onclick="SetPackagingOption();">&nbsp;&nbsp;<span
class="bold">Ok</span></a>
</div> </div>
</div> </div>
</div> </div>
</div><!-- /.modal --> </div><!-- /.modal -->
<!-- Modal for CST Calculation --> <!-- Modal for CST Calculation -->
<div id="CSTCalModel" class="modal fade" tabindex="-1" role="dialog" <div id="CSTCalModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> style="display: none;">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">CST Calculation On</h4> <h4 class="modal-title">CST Calculation On</h4>
<button type="button" class="close" data-dismiss="modal" <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
aria-hidden="true">×</button>
</div> </div>
<div class="modal-body p-4"> <div class="modal-body p-4">
<form> <form>
<div class="radio"> <div class="radio">
<label><input type="radio" name="optCST" checked="checked" value="0" id="optCST">Basic Amount</label> <label><input type="radio" name="optCST" checked="checked" value="0" id="optCST">Basic
Amount</label>
</div> </div>
<div class="radio"> <div class="radio">
<label><input type="radio" name="optCST" value="1" id="optCST">Excise Duty</label> <label><input type="radio" name="optCST" value="1" id="optCST">Excise Duty</label>
@ -1554,19 +1679,19 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a> <a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success" ID="CSTOption" onclick="SetCSTCalculation();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a> <a class="btn btn-success" ID="CSTOption" onclick="SetCSTCalculation();"
style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
</div> </div>
</div> </div>
</div> </div>
</div><!-- /.modal --> </div><!-- /.modal -->
<div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" <div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> style="display: none;">
<div class="modal-dialog modal-full-width" style="width:1060px !important ;" > <div class="modal-dialog modal-full-width" style="width:1060px !important ;">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Edit Revenue Purchase Order Line Item</h4> <h4 class="modal-title">Edit Revenue Purchase Order Line Item</h4>
<button type="button" class="close" data-dismiss="modal" <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
aria-hidden="true">×</button>
</div> </div>
<form> <form>
<div class="modal-body p-4"> <div class="modal-body p-4">
@ -1701,7 +1826,7 @@ if (!empty($INRSYMBOL)) {
//print_r( $options); //print_r( $options);
if (!empty($TaxType)) { if (!empty($TaxType)) {
foreach ($TaxType as $SID) : foreach ($TaxType as $SID):
$options[$SID->ConfigValue] = $SID->ConfigValue; $options[$SID->ConfigValue] = $SID->ConfigValue;
@ -1740,7 +1865,7 @@ if (!empty($INRSYMBOL)) {
<?php <?php
$options = array("0" => 'Select Freight Type'); $options = array("0" => 'Select Freight Type');
if (!empty($FreightType)) { if (!empty($FreightType)) {
foreach ($FreightType as $SID) : foreach ($FreightType as $SID):
$options[$SID->ConfigValue] = $SID->ConfigValue; $options[$SID->ConfigValue] = $SID->ConfigValue;
endforeach; endforeach;
} }
@ -1784,7 +1909,7 @@ if (!empty($INRSYMBOL)) {
//print_r( $options); //print_r( $options);
if (!empty($TaxType)) { if (!empty($TaxType)) {
foreach ($TaxType as $SID) : foreach ($TaxType as $SID):
$options[$SID->ConfigValue] = $SID->ConfigValue; $options[$SID->ConfigValue] = $SID->ConfigValue;
@ -1903,7 +2028,8 @@ if (!empty($INRSYMBOL)) {
<label><?php echo "Revenue Description"; ?></label> <label><?php echo "Revenue Description"; ?></label>
<?php <?php
$data = array('name' => 'Edit_Service_Description', 'value' => set_value('Edit_Service_Description'), 'id' => 'Edit_Service_Description', 'class' => 'form-control', 'rows' => '2', 'cols' => '100'); $data = array('name' => 'Edit_Service_Description', 'value' => set_value('Edit_Service_Description'), 'id' => 'Edit_Service_Description', 'class' => 'form-control', 'rows' => '2', 'cols' => '100');
echo form_textarea($data);; echo form_textarea($data);
;
?> ?>
</div> </div>
@ -1912,7 +2038,8 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-success" data-dismiss="modal" value="Cancel" style="margin:10px;">Cancel</a> <a class="btn btn-success" data-dismiss="modal" value="Cancel" style="margin:10px;">Cancel</a>
<a class="btn btn-success EditRevenue" ID="EditRevenue">&nbsp;&nbsp;<span class="bold">Edit Revenue</span></a> <a class="btn btn-success EditRevenue" ID="EditRevenue">&nbsp;&nbsp;<span class="bold">Edit
Revenue</span></a>
</div> </div>
</form> </form>
</div> </div>
@ -1927,23 +2054,25 @@ if (!empty($INRSYMBOL)) {
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Freight Calculation On</h4> <h4 class="modal-title">Freight Calculation On</h4>
<button type="button" class="close" data-dismiss="modal" <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
aria-hidden="true">×</button>
</div> </div>
<div class="modal-body p-4"> <div class="modal-body p-4">
<form> <form>
<div> <div>
<label><input type="radio" name="optfreight" checked="checked" value='0' id="optFreight"> Basic Amount</label> <label><input type="radio" name="optfreight" checked="checked" value='0' id="optFreight"> Basic
Amount</label>
</div> </div>
<div> <div>
<label><input type="radio" name="optfreight" id="optFreight" value='1'> After Discount Amount</label> <label><input type="radio" name="optfreight" id="optFreight" value='1'> After Discount
Amount</label>
</div> </div>
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a> <a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>
<a class="btn btn-info waves-effect waves-light" ID="PackagingOption" onclick="SetFreightOption();" >&nbsp;&nbsp;<span class="bold">Ok</span></a> <a class="btn btn-info waves-effect waves-light" ID="PackagingOption"
onclick="SetFreightOption();">&nbsp;&nbsp;<span class="bold">Ok</span></a>
</div> </div>
</div> </div>
</div> </div>
@ -1952,55 +2081,60 @@ if (!empty($INRSYMBOL)) {
<!-- Modal for Excise Duty Calculation--> <!-- Modal for Excise Duty Calculation-->
<div id="ExciseDutyCalModel" class="modal fade" tabindex="-1" role="dialog" <div id="ExciseDutyCalModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Excise Duty Calculation On</h4> <h4 class="modal-title">Excise Duty Calculation On</h4>
<button type="button" class="close" data-dismiss="modal" <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
aria-hidden="true">×</button>
</div> </div>
<div class="modal-body p-4"> <div class="modal-body p-4">
<form> <form>
<div class="radio"> <div class="radio">
<label><input type="radio" name="optExcise" checked="checked" value="0" id="optExcise">From Basic Amount</label> <label><input type="radio" name="optExcise" checked="checked" value="0" id="optExcise">From
Basic Amount</label>
</div> </div>
<div class="radio"> <div class="radio">
<label><input type="radio" name="optExcise" value="1" id="optExcise">Basic Amount - Discount Amount</label> <label><input type="radio" name="optExcise" value="1" id="optExcise">Basic Amount - Discount
Amount</label>
</div> </div>
<div class="radio"> <div class="radio">
<label><input type="radio" name="optExcise" value="2" id="optExcise">(Basic Amount - Discount Amount ) + Packing Cost</label> <label><input type="radio" name="optExcise" value="2" id="optExcise">(Basic Amount - Discount
Amount ) + Packing Cost</label>
</div> </div>
<div class="radio"> <div class="radio">
<label><input type="radio" name="optExcise" value="3" id="optExcise">Basic Amount + Packing Cost</label> <label><input type="radio" name="optExcise" value="3" id="optExcise">Basic Amount + Packing
Cost</label>
</div> </div>
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-secondary waves-effect" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a> <a class="btn btn-secondary waves-effect" data-dismiss="modal" style="margin-top: -24px;"
<a class="btn btn-info waves-effect waves-ligh" ID="ExciseOption" onclick="SetExciseCalculation();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a> value="Cancel">Cancel</a>
<a class="btn btn-info waves-effect waves-ligh" ID="ExciseOption" onclick="SetExciseCalculation();"
style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
</div> </div>
</div> </div>
</div> </div>
</div><!-- /.modal --> </div><!-- /.modal -->
<!-- Modal for Vat Calculation --> <!-- Modal for Vat Calculation -->
<div id="VatCalModel" class="modal fade" tabindex="-1" role="dialog" <div id="VatCalModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> style="display: none;">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Vat Calculation On</h4> <h4 class="modal-title">Vat Calculation On</h4>
<button type="button" class="close" data-dismiss="modal" <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
aria-hidden="true">×</button>
</div> </div>
<div class="modal-body p-4"> <div class="modal-body p-4">
<form> <form>
<div class="radio"> <div class="radio">
<label><input type="radio" name="optVat" checked="checked" value="0" id="optVat">Basic Amount</label> <label><input type="radio" name="optVat" checked="checked" value="0" id="optVat">Basic
Amount</label>
</div> </div>
<div class="radio"> <div class="radio">
<label><input type="radio" name="optVat" value="1" id="optVat">Excise Duty</label> <label><input type="radio" name="optVat" value="1" id="optVat">Excise Duty</label>
@ -2009,7 +2143,8 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a> <a class="btn btn-success" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-success" ID="VatOption" onclick="SetVatCalculation();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a> <a class="btn btn-success" ID="VatOption" onclick="SetVatCalculation();"
style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
</div> </div>
</div> </div>
@ -2037,11 +2172,11 @@ if (!empty($INRSYMBOL)) {
</tr> </tr>
</script> --> </script> -->
<script> <script>
$(document).ready(function() { $(document).ready(function () {
var tempUserId = 0; var tempUserId = 0;
var index = '1'; var index = '1';
var userid = ''; var userid = '';
$("#EDITREVENUE").on("shown.bs.modal", function(e) { $("#EDITREVENUE").on("shown.bs.modal", function (e) {
var AvlBudAmt = '<?php echo $AvlAmount ?>'; var AvlBudAmt = '<?php echo $AvlAmount ?>';
@ -2099,9 +2234,9 @@ if (!empty($INRSYMBOL)) {
$("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val())); $("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
var isAdded = "0"; var isAdded = "0";
for (i = 0; i < Material.length; i++) { for (i = 0; i < Material.length; i++) {
$.each(Material[i], function(idx, obj) { $.each(Material[i], function (idx, obj) {
if (obj.ReqNo === id) { if (obj.ReqNo === id) {
$.each(SelectedMaterialList.Mat, function(idx1, el) { $.each(SelectedMaterialList.Mat, function (idx1, el) {
if (id == el.ReqNo) { if (id == el.ReqNo) {
if (el.materialCode == obj.MaterialCode) { if (el.materialCode == obj.MaterialCode) {
isAdded = "1"; isAdded = "1";
@ -2134,7 +2269,7 @@ if (!empty($INRSYMBOL)) {
}); });
$('#BudgetType').attr("style", "pointer-events: none;"); $('#BudgetType').attr("style", "pointer-events: none;");
$('#EditRevenue').click(function() { $('#EditRevenue').click(function () {
tinyMCE.triggerSave(); tinyMCE.triggerSave();
if (validateEditRevenueTax() && validateEditExceedLimit()) { if (validateEditRevenueTax() && validateEditExceedLimit()) {
var CostCode = $("#EditCostCenter").val(); var CostCode = $("#EditCostCenter").val();
@ -2364,7 +2499,7 @@ if (!empty($INRSYMBOL)) {
}, },
type: "POST", type: "POST",
url: "<?php echo base_url() ?>serviceAvilBudgetAmount", url: "<?php echo base_url() ?>serviceAvilBudgetAmount",
success: function(data) { success: function (data) {
$('#loader').hide(); $('#loader').hide();
if (data) { if (data) {
avalbudAmt = parseFloat(data); avalbudAmt = parseFloat(data);
@ -2430,6 +2565,13 @@ if (!empty($INRSYMBOL)) {
//alert('final else for store data'); //alert('final else for store data');
// $('.content').loader('show'); // $('.content').loader('show');
var formData = new FormData($('.CreatePO')[0]); var formData = new FormData($('.CreatePO')[0]);
if (status == 0) { // for draft
formData.append('changeStatus','STO14');
};
if (status == 1) { // for approve
formData.append('changeStatus','STO26');
};
$('#loader').show(); $('#loader').show();
$.ajax({ $.ajax({
// data:$('.CreatePO').serialize(), // data:$('.CreatePO').serialize(),
@ -2438,8 +2580,8 @@ if (!empty($INRSYMBOL)) {
data: formData, data: formData,
processData: false, processData: false,
contentType: false, contentType: false,
success: function(data) { success: function (data) {
// console.log(data); console.log(data);
if (data) { if (data) {
$('#loader').hide(); $('#loader').hide();
$('#txtRowCount').val(''); $('#txtRowCount').val('');
@ -2447,13 +2589,20 @@ if (!empty($INRSYMBOL)) {
$('#txtStatus').val(''); $('#txtStatus').val('');
$('#SpcialInstruction').val(''); $('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val('') $('#txtDeliveryAddress').val('')
window.location = "amendmentpurchaseorder";
window.location = status == 1 ? "amendmentpurchaseorder" : "purchaseorderListing";
} else { } else {
$('#loader').hide(); $('#loader').hide();
alert("Error");
} }
},
error : function(error){
console.error("error occured" + error);
},
complete : function (){
$('#loader').hide();
console.log("ajax call is completed ..!!")
} }
}); });
@ -2461,8 +2610,10 @@ if (!empty($INRSYMBOL)) {
} }
} }
// this function is used to clear data changing schedule option // this function is used to clear data changing schedule option
$('#Scheduleby').change(function() { $('#Scheduleby').change(function () {
$("#Deliverydt").datepicker({ $("#Deliverydt").datepicker({
minDate: 'now', minDate: 'now',
@ -2473,13 +2624,13 @@ if (!empty($INRSYMBOL)) {
}); });
}); });
$('#Deliverydt').change(function() { $('#Deliverydt').change(function () {
$('#Scheduleby').val(''); $('#Scheduleby').val('');
}); });
// < !--script for table, It works uned the datatable plugin-- > // < !--script for table, It works uned the datatable plugin-- >
$(function() { $(function () {
// $('#revenueTax').DataTable({ // $('#revenueTax').DataTable({
// "paging": false, // "paging": false,
@ -2492,7 +2643,7 @@ if (!empty($INRSYMBOL)) {
// }); // });
}); });
//If others is the payment terms , display mandatory field //If others is the payment terms , display mandatory field
$("#PaymentTerms").change(function() { $("#PaymentTerms").change(function () {
if ($('#PaymentTerms').val().trim() == 'PT08') { if ($('#PaymentTerms').val().trim() == 'PT08') {
$('#otheroptiondiv').show(); $('#otheroptiondiv').show();
} else { } else {
@ -2501,7 +2652,7 @@ if (!empty($INRSYMBOL)) {
}); });
</script> </script>
<script> <script>
$('#insurancestatus').change(function() { $('#insurancestatus').change(function () {
var ans = $("#insurancestatus").val(); var ans = $("#insurancestatus").val();
//alert(ans); //alert(ans);
if (ans == 0) { if (ans == 0) {
@ -2517,13 +2668,13 @@ if (!empty($INRSYMBOL)) {
<script> <script>
$(document).ready(function() { $(document).ready(function () {
// When the second modal is about to be shown // When the second modal is about to be shown
$('#packagingcalmodel').on('show.bs.modal', function () { $('#packagingcalmodel').on('show.bs.modal', function () {
// Set a higher z-index for the second modal to appear on top // Set a higher z-index for the second modal to appear on top
$('#packagingcalmodel').css('z-index', 1060); // Set the z-index for the second modal $('#packagingcalmodel').css('z-index', 1060); // Set the z-index for the second modal
// Ensure the second modal backdrop appears above the first one // Ensure the second modal backdrop appears above the first one
setTimeout(function() { setTimeout(function () {
$('.modal-backdrop').last().css('z-index', 1055); $('.modal-backdrop').last().css('z-index', 1055);
}, 0); }, 0);
}); });
@ -2537,13 +2688,13 @@ if (!empty($INRSYMBOL)) {
</script> </script>
<script> <script>
$(document).ready(function() { $(document).ready(function () {
// When the second modal is about to be shown // When the second modal is about to be shown
$('#freightmodel').on('show.bs.modal', function () { $('#freightmodel').on('show.bs.modal', function () {
// Set a higher z-index for the second modal to appear on top // Set a higher z-index for the second modal to appear on top
$('#freightmodel').css('z-index', 1060); // Set the z-index for the second modal $('#freightmodel').css('z-index', 1060); // Set the z-index for the second modal
// Ensure the second modal backdrop appears above the first one // Ensure the second modal backdrop appears above the first one
setTimeout(function() { setTimeout(function () {
$('.modal-backdrop').last().css('z-index', 1055); $('.modal-backdrop').last().css('z-index', 1055);
}, 0); }, 0);
}); });

View File

@ -139,7 +139,7 @@
} else { } else {
$cdate = date('d-m-Y', strtotime($record->createdDtm)); $cdate = date('d-m-Y', strtotime($record->createdDtm));
} ?> } ?>
<td><?php echo $cdate; ?> </td> <td><?php echo $cdate; ?></td>
<!-- <td><?php echo $record->userId ?></td> --> <!-- <td><?php echo $record->userId ?></td> -->
<td><?php echo $record->FirstName ?></td> <td><?php echo $record->FirstName ?></td>
<td><?php echo $record->EmailId ?></td> <td><?php echo $record->EmailId ?></td>