3450 lines
170 KiB
PHP
Executable File
3450 lines
170 KiB
PHP
Executable File
<?php
|
|
|
|
$requestedBy=$requestedBy[0]->FirstName;
|
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
|
$CurrentDate = $dt->format('Y-m-d');
|
|
$res_arr_values = array();
|
|
$DeliverOption='';
|
|
$SupId = '';
|
|
$SupName = '';
|
|
$Address = '';
|
|
$PODate = '';
|
|
$TotalCgst='';
|
|
$TotalSgst='';
|
|
$TotalIgst='';
|
|
$DeliveryAddress ='';
|
|
$POStatus = '';
|
|
$PONO = '';
|
|
|
|
$TotalSGST = 0.0;
|
|
$TotalCGST = 0.0;
|
|
$TotalIGST = 0.0;
|
|
$Totalotherallowances = 0.0;
|
|
|
|
|
|
$TotalSummary = 0.0;
|
|
$TotalBasicAmount = 0.0;
|
|
$scopeofwork = '';
|
|
$Import_DispatchDetails='';
|
|
$Import_PlaceofOrgin='';
|
|
$CapitalRange='';
|
|
|
|
$Deliverydt='';
|
|
$DeliverSchedule='';
|
|
$MaxPoDate = '';
|
|
$AvlAmount = 0;
|
|
$currentCurrencyType='';
|
|
$exchangeRate='';
|
|
$exchangeRate = $ExchangeRate;
|
|
$ConfigValue='';
|
|
|
|
$TotalLanding=0;
|
|
$tothighseas=0;
|
|
$totcustom=0;
|
|
$totexciseduty=0;
|
|
$totexcisedutyED=0;
|
|
$totexciseSH=0;
|
|
$totcustomED=0;
|
|
$totcustomSH=0;
|
|
$totaddtnlexcise=0;
|
|
$totgrossduty=0;
|
|
$totavlmodvat=0;
|
|
$totgrossexpense=0;
|
|
$totordervalue=0;
|
|
$ExchangeRate=0;
|
|
$totorder=0;
|
|
$ExchangeRate='';
|
|
$PaymentTerms='';
|
|
$PaymentDays='';
|
|
$PayableAT='';
|
|
$ExchangeDate='';
|
|
$ExchangeRateOn='';
|
|
$UpdatedOn;
|
|
$CapitalRange='';
|
|
$PoStatusName='';
|
|
|
|
$INR='';
|
|
$INRSYM='';
|
|
if(!empty($INRSYMBOL))
|
|
{
|
|
foreach ($INRSYMBOL as $INR)
|
|
{
|
|
$INRSYM=$INR->Currency_Code;
|
|
$INR=$INR->FontCode2000;
|
|
}
|
|
}
|
|
|
|
//echo $INR;
|
|
|
|
if(!empty($MaxPODate))
|
|
{
|
|
foreach ($MaxPODate as $date)
|
|
{
|
|
$MaxPoDate = $date->PODate;
|
|
|
|
}
|
|
}
|
|
if(!empty($POItem))
|
|
{
|
|
//print_r($POItem);
|
|
}
|
|
if(!empty($POMaster))
|
|
{
|
|
|
|
|
|
foreach ($POMaster as $Req)
|
|
{
|
|
|
|
$SupId = $Req->SupplierID;
|
|
|
|
$SupName = $Req->SupplierName;
|
|
$Address = $Req->Address;
|
|
$pdt = new DateTime($Req->PODate);
|
|
$PODate = $pdt->format('Y-m-d');
|
|
$DeliverOption = $Req->DeliveryOption;
|
|
|
|
$DeliverSchedule = $Req->DeliverySchedule;
|
|
$Ddt = new DateTime($Req->DeliveryDate);
|
|
$Deliverydt = $Ddt->format('Y-m-d');
|
|
|
|
$DeliveryAddress =$Req->DeliveryAddress;
|
|
$POStatus = $Req->StatusCode;
|
|
$PoStatusName=$Req->StatusName;
|
|
$PONO = $Req->PONO;
|
|
$scopeofwork = $Req->ServiceDescription;
|
|
$PayableAT=$Req->PayableAT;
|
|
$ExchangeRateOn1=new DateTime($Req->ExchangeRateCalculatedon);
|
|
$ExchangeRateOn=$ExchangeRateOn1->format('Y-m-d');
|
|
$PaymentDays=$Req->PaymentDays;
|
|
|
|
$PaymentTerms=$Req->PaymentTerms;
|
|
//echo $PaymentTerms;
|
|
$UpdatedOn=$Req->UpdatedOn;
|
|
$CapitalRange=$Req->CapitalRange;
|
|
$Import_DispatchDetails=$Req->Import_DispatchDetails;
|
|
$Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
|
|
$CapitalRange=$Req->CapitalRange;
|
|
|
|
}
|
|
}
|
|
|
|
//echo $CapitalRange;
|
|
|
|
if(!empty($AvlBudAmt))
|
|
{
|
|
|
|
$AvlAmount = $AvlBudAmt;
|
|
|
|
}
|
|
?>
|
|
<style>
|
|
.modal
|
|
{
|
|
padding-right:25% ! important;
|
|
}
|
|
.dataTables_paginate
|
|
{
|
|
margin-top: -5%;
|
|
}
|
|
.dataTables_wrapper {
|
|
padding-bottom: 0px;
|
|
}
|
|
.select2{
|
|
width:100% ! important;
|
|
}
|
|
</style>
|
|
<script src="<?php echo base_url() ?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
|
<script type="text/javascript">
|
|
|
|
tinymce.init({
|
|
selector: "textarea#txtSpcialInstruction",
|
|
menubar: false,
|
|
statusbar: false,
|
|
toolbar: false
|
|
// plugins: "link image"
|
|
});
|
|
|
|
var DelOpt = '<?php echo $DeliverOption; ?>';
|
|
var SchName = <?php echo json_encode($DeliverSchedule); ?>;
|
|
var DelDt = '<?php echo $Deliverydt; ?>';
|
|
$(document).ready(function () {
|
|
if(DelOpt=="0"){
|
|
$('#Deliverydtdiv').show();
|
|
$('#Schedulediv').hide();
|
|
$('#Deliverydt').val(DelDt);
|
|
}
|
|
|
|
else if(DelOpt=="1"){
|
|
$('#Deliverydtdiv').hide();
|
|
$('#Schedulediv').show();
|
|
$('#Deliverydt').val('');
|
|
|
|
$('#Scheduleby').val(SchName);
|
|
}
|
|
});
|
|
|
|
|
|
var capitalType='';
|
|
window.onload = function()
|
|
{
|
|
var CapRan = '<?php echo $CapitalRange; ?>';
|
|
if(CapRan == '1')
|
|
{
|
|
|
|
document.getElementById('ExchangeRateOnDiv').style.display = 'none';
|
|
document.getElementById('ExchangeRateOnDiv').style.display = 'none';
|
|
document.getElementById('ExchangeRateDiv').style.display = 'none';
|
|
document.getElementById('currencyTypeDiv').style.display = 'none';
|
|
document.getElementById('ExchangeRateModalDiv').style.display = 'none';
|
|
document.getElementById('ExchangeRateModalEditDiv').style.display = 'none';
|
|
document.getElementById('HideImportTaxTotal').style.display = 'none';
|
|
document.getElementById('ModalImportTaxHide').style.display = 'none';
|
|
document.getElementById('EditModalImportTaxHide').style.display = 'none';
|
|
document.getElementById('ExchangeRateModalViewDiv').style.display = 'none';
|
|
document.getElementById('ViewModalImportTaxHide').style.display = 'none';
|
|
|
|
|
|
capitalType='Domestic';
|
|
|
|
}
|
|
else
|
|
{
|
|
document.getElementById('ExchangeRateOnDiv').style.display = 'block';
|
|
document.getElementById('ExchangeRateOnDiv').style.display = 'block';
|
|
document.getElementById('ExchangeRateDiv').style.display = 'block';
|
|
document.getElementById('currencyTypeDiv').style.display = 'block';
|
|
//document.getElementById('ExchangeRateModalDiv').style.display = 'block';
|
|
document.getElementById('ExchangeRateModalEditDiv').style.display = 'block';
|
|
//document.getElementById('ExchangeRateModalViewDiv').style.display = 'block';
|
|
capitalType='International';
|
|
document.getElementById('currencyTypeDiv').style.display = 'block';
|
|
//document.getElementById('ViewModalImportTaxHide').style.display = 'block';
|
|
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
//Initialize Select2 Elements
|
|
$("#drpSupplier").select2();
|
|
$("#Reqnumber").select2();
|
|
$("#CapitalCostCenter").select2();
|
|
$("#MaterialCode").select2();
|
|
$("#currencytype").select2();
|
|
|
|
$("#PODate").datepicker({
|
|
//minDate : d,
|
|
maxDate : 'now',
|
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
|
});
|
|
$("#Deliverydt").datepicker({
|
|
minDate : 'now',
|
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
|
});
|
|
$('#Date').click(function () {
|
|
//for Date range selection
|
|
$('#Schedulediv').hide();
|
|
$('#Deliverydtdiv').show();
|
|
});
|
|
$('#Schedule').click(function () {
|
|
//for schedule range selection
|
|
$('#Deliverydtdiv').hide();
|
|
$('#Schedulediv').show();
|
|
});
|
|
|
|
});
|
|
</script>
|
|
<div class="content-wrapper">
|
|
<div id="content"></div>
|
|
<?php
|
|
// $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO');
|
|
|
|
$attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO');
|
|
|
|
|
|
|
|
echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
|
|
|
|
|
|
<section class="content">
|
|
|
|
<div style="border:2px solid #333">
|
|
<div class="col-md-12">
|
|
|
|
<center><b><h2>Siddharth Industries - Amendment Capital Purchase Order - <?php echo $PONO;?></h2></b></center>
|
|
|
|
<!-- <div class="col-md-1"><br/>
|
|
<a class="btn btn-info" href="<?php echo base_url(); ?>purchaseorder/CreatecapitalPOPrint" target="_blank">Print</a>
|
|
</div> -->
|
|
</div>
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="col-md-3">
|
|
<div class="col-md-12">
|
|
<label>Requistion No</label>
|
|
<?php
|
|
|
|
$options = array("0"=>'Selected Requisition Numbers');
|
|
if(!empty($ReqList))
|
|
{
|
|
|
|
foreach ($ReqList as $SID):
|
|
|
|
$options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqNo;
|
|
|
|
endforeach;
|
|
}
|
|
echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"');
|
|
|
|
?>
|
|
</div>
|
|
<div class="col-md-12" id="currencyTypeDiv" style="display:none;">
|
|
<label>Currency Type</label>
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
if(!empty($Currency))
|
|
{
|
|
|
|
// $currentCurrencyType=$CurrencyDetail[0]->CurrencyCode;
|
|
$options1[$CurrencyDetail[0]->Currency_Code] = $CurrencyDetail[0]->Currency_Code.' '.' - '.' '.$CurrencyDetail[0]->Country_and_Currency;
|
|
|
|
foreach ($Currency as $Cur)
|
|
if($CurrencyDetail[0]->Currency_Code!=$Cur->Currency_Code){
|
|
$options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
echo form_dropdown('currencytype', $options1,set_value('currencytype',$currentCurrencyType),'id="currencytype"','class="form-control select2"' , 'required="true"');
|
|
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-9">
|
|
<div class="col-md-4">
|
|
<div class="col-md-12">
|
|
<label>Supplier</label>
|
|
|
|
<?php
|
|
|
|
|
|
|
|
if(!empty($Suplist))
|
|
{
|
|
foreach ($Suplist as $SID):
|
|
|
|
|
|
$options2[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
|
|
|
|
endforeach;
|
|
}
|
|
|
|
echo form_dropdown('drpSupplier', $options2,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
|
|
|
|
?>
|
|
|
|
</div>
|
|
<div class="col-md-12"><br/>
|
|
<label>Address</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40');
|
|
echo Form_textarea($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="col-md-12">
|
|
<label>Purchase Order Type</label>
|
|
<div class="form-group">
|
|
|
|
<?php
|
|
$data = array('name' => 'POType','value' => set_value('POType',CAPITAL),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<label>Delivery Address</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40');
|
|
echo Form_textarea($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="col-md-12">
|
|
|
|
<b><u>Select Delivery By</u></b><br/>
|
|
<tr>
|
|
<td>
|
|
<!-- <?php echo form_label('Date', 'Date') . " ". form_radio(array('name' => 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> -->
|
|
|
|
<?php echo form_label('Dispatch instruction', 'Dispatch instruction') ." ". form_radio(array("name"=>"DateRange", "id"=>"Date", "value"=>"0", 'checked'=>'checked')); ?> </td>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<?php echo form_label('Schedule', 'Schedule') . form_radio(array('name' => 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
|
|
|
|
</td>
|
|
</tr>
|
|
</div>
|
|
|
|
<div class="col-md-12" id="Schedulediv" style="display:none;"><br/>
|
|
<label >Schedule :</label>
|
|
<input type="hidden" name="beforeSchedule" value="<?php echo $DeliverSchedule;?>">
|
|
<?php
|
|
$data = array('name' => 'Scheduleby','value' => set_value('Scheduleby',$DeliverSchedule),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
|
|
echo Form_textarea($data);
|
|
?>
|
|
|
|
</div>
|
|
<div class="col-md-12" id="Deliverydtdiv"><br/>
|
|
<label>Dispatch Instruction</label>
|
|
<input type="hidden" name="beforeDisins" value="<?php echo $Import_DispatchDetails;?>">
|
|
<?php
|
|
// $data = array('name' => 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true');
|
|
// echo form_input($data);
|
|
|
|
$data = array('name' => 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
|
|
echo Form_textarea($data);
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-3" id="FromOnline" style="display:none;">
|
|
<a href="http://www.xe.com/" target="_blank"><u>Click here to check Today's Foreign Exchange value</u></a>
|
|
</div>
|
|
<div class="col-md-3" id="ExchangeRateOnDiv" style="display:none;">
|
|
<label>Exchange Rate On</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Exchangerateon','value' => set_value('Exchangerateon',$ExchangeRateOn),'id'=>'Exchangerateon', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-3" id="ExchangeRateDiv" style="display:none;">
|
|
<label id="CurrencySymbol">Exchange Rate </label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ExchangeRt','value' => set_value('ExchangeRt',$exchangeRate),'id'=>'ExchangeRt', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','style'=>'text-align:right');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>Purchase Order Date</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<label>Place of Origin</label>
|
|
<div class="form-group">
|
|
<?php
|
|
// $data = array('name' => 'PlaceOforigin','value' => set_value('PlaceOforigin'),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
|
// echo form_input($data);
|
|
$data = array('name' => 'PlaceOforigin','value' => set_value('PlaceOforigin',$Import_PlaceofOrgin),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
<legend>Payment Details</legend>
|
|
<!-- Text input-->
|
|
<div class="col-md-3"><input type="hidden" name="beforePaymentmethod" id="beforePaymentmethod" value="<?php echo $PaymentTerms ; ?>">
|
|
<span for="payablefrom">Payable Terms</span>
|
|
|
|
<?php
|
|
|
|
|
|
foreach ($Payment as $rl):
|
|
|
|
if($PaymentTerms==$rl->PaymentID)
|
|
{
|
|
//echo $PaymentTerms."<br>";
|
|
//print_r($Payment);
|
|
$options6[$rl->PaymentID] = $rl->PaymentTerms;
|
|
?>
|
|
<input type="hidden" name="beforePaymentTermsText" value="<?php echo $rl->PaymentTerms?>">
|
|
<?php
|
|
}
|
|
|
|
endforeach;
|
|
|
|
|
|
if(!empty($Payment))
|
|
{
|
|
foreach ($Payment as $rl2):
|
|
|
|
if($PaymentTerms!=$rl2->PaymentID)
|
|
{
|
|
$options6[$rl2->PaymentID] = $rl2->PaymentTerms;
|
|
}
|
|
|
|
endforeach;
|
|
}
|
|
|
|
echo form_dropdown('PaymentMethod', $options6,set_value('PaymentMethod',$PaymentTerms),'id="PaymentMethod"' ,'required="true"' ,'class="form-control select2');
|
|
|
|
?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div align="right">
|
|
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a> -->
|
|
</div>
|
|
<br>
|
|
</div>
|
|
<div class="box-body">
|
|
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
|
<thead style="background-color:#ddf">
|
|
<tr>
|
|
<th>SNo</th>
|
|
<th>Requisition No</th>
|
|
<th>Item Name</th>
|
|
<th>Quantity</th>
|
|
<th>UOM</th>
|
|
<th>Rate</th>
|
|
<th>Basic Amount</th>
|
|
<th>Tax Amount</th>
|
|
<th>Total Order Amount</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody id='capitalAppend'>
|
|
<?php
|
|
if(!empty($POItem))
|
|
{
|
|
$index = 0;
|
|
$totalCapitalOrder=0;
|
|
foreach($POItem as $record)
|
|
{
|
|
$index = $index + 1;
|
|
|
|
?>
|
|
<tr id="<?php echo $index ; ?>">
|
|
<td align="left"><?php echo $index ; ?></td>
|
|
<td><?php echo $record->ReqNo ?></td>
|
|
<td><?php echo $record->MaterialName?></td>
|
|
<td style="text-align:right"><?php echo $record->Quantity ?></td>
|
|
<td><?php echo $record->UOM ?></td>
|
|
<td style="text-align:right"><?php echo $record->Rate ?></td>
|
|
<td style="text-align:right"><?php echo $record->Rate * $record->Quantity ?></td>
|
|
<td style="text-align:right"><?php if($CapitalRange=='1'){echo $record->ServiceTaxamount;}else if($CapitalRange=='0'){echo $record->Taxamount; }?></td>
|
|
<td style="text-align:right"><?php echo $record->Rate * $record->Quantity ?></td>
|
|
<?php
|
|
$row=array("materialCode"=>$record->MaterialCode,"ReqNo"=>$record->ReqNo);
|
|
array_push($res_arr_values, $row);
|
|
?>
|
|
|
|
<input type="hidden" name="<?php echo 'Reqnumber'.$index ?>" id="<?php echo 'Reqnumber'.$index ?>" value="<?php echo $record->ReqNo ; ?>" />
|
|
<input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->DepartmentName ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'AvilBudget'.$index ?>" id="<?php echo 'AvilBudget'.$index ?>" 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 'CPCostCode'.$index ?>" id="<?php echo 'CPCostCode'.$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 'ServiceMaterialDescription'.$index ?>" id="<?php echo 'ServiceMaterialDescription'.$index ?>" value="<?php echo $record->ServiceMaterialDescription ; ?>" />
|
|
<input type="hidden" name="<?php echo 'uom'.$index ?>" id="<?php echo 'uom'.$index ?>" value="<?php echo $record->UOM ; ?>" />
|
|
<input type="hidden" name="<?php echo 'frequency'.$index ?>" id="<?php echo 'frequency'.$index ?>" value="<?php echo $record->ServiceFrequency ; ?>" />
|
|
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforequantity'.$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 'beforeitemRate'.$index ?>" id="<?php echo 'itemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
|
<?php if($CapitalRange=='1'){ ?>
|
|
<input type="hidden" name="<?php echo 'rateInUs'.$index ?>" id="<?php echo 'rateInUs'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
|
<?php } ?>
|
|
|
|
<?php if($CapitalRange=='0'){ ?>
|
|
|
|
<input type="hidden" name="<?php echo 'rateInUs'.$index ?>" id="<?php echo 'rateInUs'.$index ?>" value="<?php echo $record->BasicPriceInMTon ; ?>" />
|
|
<input type="hidden" name="<?php echo 'basicvalInINR'.$index ?>" id="<?php echo 'basicvalInINR'.$index ?>" value="<?php echo $record->ProductPrice ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeLanding'.$index ?>" id="<?php echo 'beforeLanding'.$index ?>" value="<?php echo $record->LandingCharge; ?>" />
|
|
<input type="hidden" name="<?php echo 'landingCharge'.$index ?>" id="<?php echo 'landingCharge'.$index ?>" value="<?php echo $record->AfterLandingCharge; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeHighSeasSalesCharge'.$index ?>" id="<?php echo 'beforeHighSeasSalesCharge'.$index ?>" value="<?php echo $record->HighSeasSalesCharge ; ?>" />
|
|
<input type="hidden" name="<?php echo 'HighSeasSalesCharge'.$index ?>" id="<?php echo 'HighSeasSalesCharge'.$index ?>" value="<?php echo $record->AfterHighSeasSalesCharge ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeCustomDuty'.$index ?>" id="<?php echo 'beforeCustomDuty'.$index ?>" value="<?php echo $record->CustomDuty ; ?>" />
|
|
<input type="hidden" name="<?php echo 'CustomDuty'.$index ?>" id="<?php echo 'CustomDuty'.$index ?>" value="<?php echo $record->AfterCustomDuty ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeExciseDuty'.$index ?>" id="<?php echo 'beforeExciseDuty'.$index ?>" value="<?php echo $record->ExciseDuty ; ?>" />
|
|
<input type="hidden" name="<?php echo 'ExciseDuty'.$index ?>" id="<?php echo 'ExciseDuty'.$index ?>" value="<?php echo $record->AfterExciseDuty ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'beforeExciseDutyEDCess'.$index ?>" id="<?php echo 'beforeExciseDutyEDCess'.$index ?>" value="<?php echo $record->ExciseDutyEdCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'ExciseDutyEDCess'.$index ?>" id="<?php echo 'ExciseDutyEDCess'.$index ?>" value="<?php echo $record->AfterExciseDutyEdCess ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'beforeExciseDutySHCess'.$index ?>" id="<?php echo 'beforeExciseDutySHCess'.$index ?>" value="<?php echo $record->ExciseDutySHCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'ExciseDutySHCess'.$index ?>" id="<?php echo 'ExciseDutySHCess'.$index ?>" value="<?php echo $record->AfterExciseDutySHCess ; ?>" />
|
|
|
|
|
|
|
|
<input type="hidden" name="<?php echo 'beforeCustomEDCess'.$index ?>" id="<?php echo 'beforeCustomEDCess'.$index ?>" value="<?php echo $record->CustomEdCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'CustomEDCess'.$index ?>" id="<?php echo 'CustomEDCess'.$index ?>" value="<?php echo $record->AfterCustomEdCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeCustomSHCess'.$index ?>" id="<?php echo 'beforeCustomSHCess'.$index ?>" value="<?php echo $record->CustomSHCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'CustomSHCess'.$index ?>" id="<?php echo 'CustomSHCess'.$index ?>" value="<?php echo $record->AfterCustomSHCess ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'echangeRate'.$index ?>" id="<?php echo 'echangeRate'.$index ?>" value="<?php echo $record->ExchangeRate ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'beforeAdditionalExciseDuty'.$index ?>" id="<?php echo 'beforeAdditionalExciseDuty'.$index ?>" value="<?php echo $record->AddlExciseDuty ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AdditionalExciseDuty'.$index ?>" id="<?php echo 'AdditionalExciseDuty'.$index ?>" value="<?php echo $record->AfterAddlExciseDuty; ?>" />
|
|
<input type="hidden" name="<?php echo 'GrossDutyPayable'.$index ?>" id="<?php echo 'GrossDutyPayable'.$index ?>" value="<?php echo $record->Grossdutypayable; ?>" />
|
|
<input type="hidden" name="<?php echo 'AvailableModvat'.$index ?>" id="<?php echo 'AvailableModvat'.$index ?>" value="<?php echo $record->AvailableModvat; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'GrossExpensesDuetoCustom'.$index ?>" id="<?php echo 'GrossExpensesDuetoCustom'.$index ?>" value="<?php echo $record->Grossexpensesduetocustomduty; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'purchaseRate'.$index ?>" id="<?php echo 'purchaseRate'.$index ?>" value="<?php echo $record->purchaseratePerKG; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'CustomDutyExpenses'.$index ?>" id="<?php echo 'CustomDutyExpenses'.$index ?>" value="<?php echo $record->CustomDutyExpensesPerKG; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'RMCIncludingCustomers'.$index ?>" id="<?php echo 'RMCIncludingCustomers'.$index ?>" value="<?php echo $record->RMCIncludingCustomersPerKG; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'PurQuantity'.$index ?>" id="<?php echo 'PurQuantity'.$index ?>" value="<?php echo $record->QuantityKG; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'PerKgExpense'.$index ?>" id="<?php echo 'PerKgExpense'.$index ?>" value="<?php echo $record->ImportTotalValue; ?>" />
|
|
<?php } ?>
|
|
|
|
<input type="hidden" name="<?php echo 'basicval'.$index ?>" id="<?php echo 'basicval'.$index ?>" value="<?php echo $record->Rate * $record->Quantity ; ?>" />
|
|
<?php if($CapitalRange=='1'){ ?>
|
|
<input type="hidden" name="<?php echo 'SGST'.$index ?>" id="<?php echo 'SGST'.$index ?>" value="<?php echo $record->SGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeSGST'.$index ?>" id="<?php echo 'beforeSGST'.$index ?>" value="<?php echo $record->SGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'afterSGST'.$index ?>" id="<?php echo 'afterSGST'.$index ?>" value="<?php echo $record->After_SGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeSGSTvalue'.$index ?>" id="<?php echo 'beforeSGSTvalue'.$index ?>" value="<?php echo $record->After_SGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'CGST'.$index ?>" id="<?php echo 'CGST'.$index ?>" value="<?php echo $record->CGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeCGST'.$index ?>" id="<?php echo 'beforeCGST'.$index ?>" value="<?php echo $record->CGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'afterCGST'.$index ?>" id="<?php echo 'afterCGST'.$index ?>" value="<?php echo $record->After_CGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeCGSTvalue'.$index ?>" id="<?php echo 'beforeCGSTvalue'.$index ?>" value="<?php echo $record->After_CGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'IGST'.$index ?>" id="<?php echo 'IGST'.$index ?>" value="<?php echo $record->IGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeIGST'.$index ?>" id="<?php echo 'beforeIGST'.$index ?>" value="<?php echo $record->IGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'afterIGST'.$index ?>" id="<?php echo 'afterIGST'.$index ?>" value="<?php echo $record->After_IGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeIGSTvalue'.$index ?>" id="<?php echo 'aftebeforeIGSTvaluerIGST'.$index ?>" value="<?php echo $record->After_IGST ; ?>" />
|
|
<input type="hidden" name="<?php echo 'otherallowance'.$index ?>" id="<?php echo 'otherallowance'.$index ?>" value="<?php echo $record->otherallowance ; ?>" />
|
|
<input type="hidden" name="<?php echo 'beforeotherallowance'.$index ?>" id="<?php echo 'beforeotherallowance'.$index ?>" value="<?php echo $record->otherallowance ; ?>" />
|
|
<input type="hidden" name="<?php echo 'totalservicevalue'.$index ?>" id="<?php echo 'totalservicevalue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
|
|
<?php }?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<td> <a data-target='#EDITCAPITAL' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITCAPITAL"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <!-- <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a> -->
|
|
|
|
<!-- <td> <a data-target='#VIEWCAPITAL' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#VIEWCAPITAL"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> </td> -->
|
|
|
|
</tr> <?php
|
|
if($CapitalRange=='1'){
|
|
$TotalSGST =$TotalSGST+$record->After_SGST;
|
|
$TotalCGST = $TotalCGST+$record->After_CGST;
|
|
$TotalIGST = $TotalIGST+$record->After_IGST;
|
|
$Totalotherallowances = $Totalotherallowances+$record->otherallowance;
|
|
|
|
$TotalSummary = $TotalSummary+$record->ServiceTaxamount;
|
|
$TotalBasicAmount = $TotalBasicAmount+$record->BasicValue;
|
|
//$ServiceDescription = $ServiceDescription;
|
|
}
|
|
if($CapitalRange=='0'){
|
|
$TotalLanding = $TotalLanding + $record->AfterLandingCharge;
|
|
$tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge;
|
|
$totcustom = $totcustom + $record->AfterCustomDuty;
|
|
$totexciseduty = $totexciseduty + $record->AfterExciseDuty;
|
|
$totexcisedutyED = $totexcisedutyED + $record->AfterExciseDutyEdCess;
|
|
$totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess;
|
|
$totcustomED = $totcustomED +$record->AfterCustomEdCess;
|
|
|
|
$totcustomSH = $totcustomSH + $record->AfterCustomSHCess;
|
|
$totaddtnlexcise= $totaddtnlexcise + $record->AfterAddlExciseDuty;
|
|
$totgrossduty = $totgrossduty + $record->Grossdutypayable;
|
|
$totavlmodvat = $totavlmodvat +$record->AvailableModvat;
|
|
|
|
|
|
$totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty;
|
|
$ExchangeRate=$record->ExchangeRate;
|
|
|
|
}
|
|
|
|
|
|
// $totorder=$totorder+$record->TotalOrderValue;
|
|
|
|
|
|
|
|
|
|
}
|
|
//echo $TotalSummary;
|
|
if($CapitalRange=='1'){
|
|
|
|
$totalCapitalOrder = $totalCapitalOrder+$TotalSummary;
|
|
|
|
}
|
|
else if($CapitalRange=='0')
|
|
{
|
|
$totalCapitalOrder = $totalCapitalOrder+$record->BasicValue;;
|
|
}
|
|
?> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>">
|
|
<input type="hidden" name="CapitalToatlOrder" id="CapitalToatlOrder" value="<?php echo $totalCapitalOrder;?>">
|
|
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
|
<input type="hidden" name="capitalType" id="capitalType" value="<?php echo $CapitalRange; ?>"/>
|
|
|
|
|
|
<?php
|
|
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="container-fluid">
|
|
<table class="table table-bordered" style="border:1px solid #333">
|
|
<div align="right" style="padding-right:10px">
|
|
|
|
<br/>
|
|
<div class="modal fade" id="EDITCAPITAL" role="dialog">
|
|
<div class="modal-dialog">
|
|
<!-- Modal content-->
|
|
<form>
|
|
<div class="modal-content" style="width:900px;">
|
|
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<center><h4>Edit Capital Purchase Order Item </h4></center>
|
|
</div>
|
|
<div align="left">
|
|
<div class="col-md-12">
|
|
<div class="col-md-12">
|
|
<div class="col-md-5" style="padding:0px;">
|
|
<div class="col-md-6">
|
|
<label>Req No</label>
|
|
<div>
|
|
|
|
<?php
|
|
$RL = array("0"=>'Select Req No');
|
|
if(!empty($RequistionDetails))
|
|
{
|
|
foreach ($RequistionDetails as $SID):
|
|
$RL[$SID->ReqNo] = $SID->ReqNo.' '.' - '.' '.$SID->DepartmentName;
|
|
endforeach;
|
|
}
|
|
|
|
|
|
$data = array('name' => 'EditReqnumber','value' => set_value('EditReqnumber'),'id'=>'EditReqnumber', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label>Department Name</label>
|
|
<div>
|
|
<?php
|
|
$data = array('name' => 'EditCapitalDepartmentName','value' => set_value('EditCapitalDepartmentName'),'id'=>'EditCapitalDepartmentName', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-5">
|
|
<div class="col-md-6">
|
|
<label>Cost Center Name</label>
|
|
<div>
|
|
<?php
|
|
|
|
$data = array('name' => 'EditCostCenter','value' => set_value('EditCostCenter'),'id'=>'EditCostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label>Avail Bud Amount<?php echo "($INR)"?></label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCapitalbudAmt','value' => set_value('EditCapitalbudAmt'),'id'=>'EditCapitalbudAmt', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2" id="ExchangeRateModalEditDiv" style="display:none;">
|
|
<label> Exchange Rate</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditExchangeRtModal','value' => set_value('EditExchangeRtModal'),'id'=>'EditExchangeRtModal', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-12">
|
|
<div class="col-md-2">
|
|
<label>Item Code</label>
|
|
<div>
|
|
<?php
|
|
$options = array("0"=>'Item Code');
|
|
echo form_dropdown('MaterialCode', $options,set_value('EditMaterialCode'),'id="EditMaterialCode"' ,'class="form-control select2"');
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label>Item Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCapitalItemName','value' => set_value('EditCapitalItemName'),'id'=>'EditCapitalItemName', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label>Service Description </label> <?php
|
|
$data = array('name' => 'Edittxtservicedescription','value' => set_value('Edittxtservicedescription'),'id'=>'Edittxtservicedescription', 'class' => 'form-control');
|
|
echo form_input($data); ?>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label>UOM</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCPUOM','value' => set_value('EditCPUOM'),'id'=>'EditCPUOM', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>Frequency</label>
|
|
<div>
|
|
<?php
|
|
$data = array('name' => 'EditFrequency','value' => set_value('EditFrequency'),'id'=>'EditFrequency', 'class' => 'form-control','readonly' => 'true' );
|
|
echo form_input($data);
|
|
?>
|
|
<input type="hidden" name="EditFrequencyNo" id="EditFrequencyNo" value="EditFrequencyNo" />
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>Quantity</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label id="EditRateIn">Rate(in INR/UOM)</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCPRate','value' => set_value('EditCPRate'),'id'=>'EditCPRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();' );
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label id="EditTotalAmount">Basic value in INR</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCPTotalAmount','value' => set_value('EditCPTotalAmount'),'id'=>'EditCPTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-12" id="EDITCAPdiv" style="border:1px solid #000;padding:0px;">
|
|
<div class="col-md-12" id=""><!--EDITCAPdiv -->
|
|
<div class="col-md-6" align="right">
|
|
|
|
CGST In %
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
|
|
<?php
|
|
$data = array('name' => 'EditCgst','value' => set_value('EditCgst'),'id'=>'EditCgst', 'class' => 'form-control num' ,'placeholder' => 'CGST TAX PERCENTAGE','onchange'=>'EditRatechange()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
|
|
<?php
|
|
$data = array('name' => 'EditAfterCgst','value' => set_value('EditAfterCgst'),'id'=>'EditAfterCgst', 'class' => 'form-control num' ,'placeholder' => 'After CGST','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12" id="EDITCAPdiv1"><!--EDITCAPdiv1 -->
|
|
<div class="col-md-6" align="right">
|
|
|
|
SGST In %
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
|
|
<?php
|
|
$data = array('name' => 'EditSgst','value' => set_value('EditSgst'),'id'=>'EditSgst', 'class' => 'form-control num' ,'placeholder' => 'SGST TAX PERCENTAGE','onchange'=>'EditRatechange()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
|
|
<?php
|
|
$data = array('name' => 'EditAfterSgst','value' => set_value('EditAfterSgst'),'id'=>'EditAfterSgst', 'class' => 'form-control num' ,'placeholder' => 'After SGST','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-12" id="EDITCAPdiv2"><!--EDITCAPdiv2 -->
|
|
<div class="col-md-6" align="right">
|
|
|
|
IGST In %
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
|
|
<?php
|
|
$data = array('name' => 'EditIgst','value' => set_value('EditIgst'),'id'=>'EditIgst', 'class' => 'form-control num' ,'placeholder' => 'IGST TAX PERCENTAGE','onchange'=>'EditRatechange()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
|
|
<?php
|
|
$data = array('name' => 'EditAfterIgst','value' => set_value('EditAfterIgst'),'id'=>'EditAfterIgst', 'class' => 'form-control num' ,'placeholder' => 'After IGST','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12" id="EDITCAPdiv3"><!--EDITCAPdiv3 -->
|
|
<div class="col-md-5 col-md-offset-4" align="right">
|
|
<label>Other Allowances In INR</label>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditOtherAllowances','value' => set_value('EditOtherAllowances'),'id'=>'EditOtherAllowances', 'class' => 'form-control num' ,'placeholder' => 'Other Allowances','onchange'=>'EditRatechange()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12" id="EDITCAPdiv4"><!--EDITCAPdiv4 -->
|
|
<div class="col-md-5 col-md-offset-4" align="right">
|
|
<label>Total Order Value In INR</label>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Editservicetotalordervaue','value' => set_value('Editservicetotalordervaue'),'id'=>'Editservicetotalordervaue', 'class' => 'form-control num','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12" style="padding:1%;" ></div>
|
|
<div class="col-md-12" style="border:1px solid #000;padding:0px;" id="EditModalImportTaxHide" style="display:none;">
|
|
<br/>
|
|
<div class="col-md-6" style="padding:0px;">
|
|
<div class="col-md-12">
|
|
<div class="col-md-4" >
|
|
Basic Price In<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditBasicPriceTax','value' => set_value('EditBasicPriceTax'),'id'=>'EditBasicPriceTax', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterBasicPriceTax','value' => set_value('EditAfterBasicPriceTax'),'id'=>'EditAfterBasicPriceTax', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
Landing charge<?php echo "$INR"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditLandingCharge','value' => set_value('EditLandingCharge'),'id'=>'EditLandingCharge', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterLandingCharge','value' => set_value('EditAfterLandingCharge'),'id'=>'EditAfterLandingCharge', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
High seas sales charge<?php echo "$INR"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditHighseas ','value' => set_value('EditHighseas'),'id'=>'EditHighseas', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' , 'onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterHighseas','value' => set_value('EditAfterHighseas'),'id'=>'EditAfterHighseas', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
Custom duty : (a)<?php echo "$INR"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCustomduty','value' => set_value('EditCustomduty'),'id'=>'EditCustomduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterCustomduty','value' => set_value('EditAfterCustomduty'),'id'=>'EditAfterCustomduty', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
Excise duty : (b)<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditExcisedutyTax','value' => set_value('EditExcisedutyTax'),'id'=>'EditExcisedutyTax', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterExcisedutyTax','value' => set_value('EditAfterExcisedutyTax'),'id'=>'EditAfterExcisedutyTax', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
Excise duty ED_cess : (C)<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditExcisedutyEDcess','value' => set_value('EditExcisedutyEDcess'),'id'=>'EditExcisedutyEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterExcisedutyEDcess','value' => set_value('EditAfterExcisedutyEDcess'),'id'=>'EditAfterExcisedutyEDcess', 'class' => 'form-control','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
Excise duty S & H cess :(d)<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditExcisedutySHcess','value' => set_value('EditExcisedutySHcess'),'id'=>'EditExcisedutySHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterExcisedutySHcess','value' => set_value('EditAfterExcisedutySHcess'),'id'=>'EditAfterExcisedutySHcess', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
Custom ED_cess : (e)<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCustomEDcess','value' => set_value('EditCustomEDcess'),'id'=>'EditCustomEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterCustomEDcess','value' => set_value('EditAfterCustomEDcess'),'id'=>'EditAfterCustomEDcess', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
Custom S & H cess : (f)<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCustomSHcess','value' => set_value('EditCustomSHcess'),'id'=>'EditCustomSHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterCustomSHcess','value' => set_value('EditAfterCustomSHcess'),'id'=>'EditAfterCustomSHcess', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6" style="padding:0px;">
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
Additional Excise duty : (g)<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAdditionalExciseduty ','value' => set_value('EditAdditionalExciseduty'),'id'=>'EditAdditionalExciseduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAfterAdditionalExciseduty','value' => set_value('EditAfterAdditionalExciseduty'),'id'=>'EditAfterAdditionalExciseduty', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-8">
|
|
Gross duty payable<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditGrossdutypayable ','value' => set_value('EditGrossdutypayable'),'id'=>'EditGrossdutypayable', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-8">
|
|
Available Modvat set-off on import :<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAvailableModvat','value' => set_value('EditAvailableModvat'),'id'=>'EditAvailableModvat', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?> (b + c + d + g)
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-8">
|
|
Gross expenses due to custom duty<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditGrossexpenses','value' => set_value('EditGrossexpenses'),'id'=>'EditGrossexpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-12">
|
|
<center> <label>Cost of the product Per KG</label></center>
|
|
<hr/>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
purchase rate [Basic]
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Editpurchaserate','value' => set_value('Editpurchaserate'),'id'=>'Editpurchaserate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4" style="margin-top: -4.8%">
|
|
<span>Quantity</span>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditPurQuantity','value' => set_value('EditPurQuantity'),'id'=>'EditPurQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-4">
|
|
Custom Duty Expenses<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditCustomDutyExpenses ','value' => set_value('EditCustomDutyExpenses'),'id'=>'EditCustomDutyExpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
RMC Including Customers<?php echo "($INR)"?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditRMCIncludingCustomers','value' => set_value('EditRMCIncludingCustomers'),'id'=>'EditRMCIncludingCustomers', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6" align="right" style="display:none;"> <label>Total Order Amount :</label></div>
|
|
<div class="col-md-6" style="display:none;">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EdittxtTotalOrderValue','value' => set_value('EdittxtTotalOrderValue'),'id'=>'EdittxtTotalOrderValue', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
|
<a class="btn btn-info font EditCapital" ID="UpdateCapital" ><i class="fa fa-plus"></i> <span class="bold">Update Capital</span></a>
|
|
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
<br/>
|
|
<!-- this is view the added requistion details -->
|
|
|
|
|
|
<br/>
|
|
</table>
|
|
<div class="col-md-12" style="border: 1px solid;" id="CAPdiv" >
|
|
<div class="col-md-3">
|
|
<label>CGST In INR</label>
|
|
<?php
|
|
$data = array('name' => 'txtTotCgst','value' => set_value('txtTotCgst',$TotalCGST ),'id'=>'txtTotCgst', 'class' => 'form-control num' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-3">
|
|
<label>SGST In INR</label>
|
|
<?php
|
|
$data = array('name' => 'txtTotSgst','value' => set_value('txtTotSgst' ,$TotalSGST),'id'=>'txtTotSgst', 'class' => 'form-control num' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>IGST In INR</label>
|
|
<?php
|
|
$data = array('name' => 'txtTotIgst','value' => set_value('txtTotIgst' ,$TotalIGST),'id'=>'txtTotIgst', 'class' => 'form-control num' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<label >Other Allowances In INR </label>
|
|
<?php
|
|
$data = array('name' => 'TotalOtherAllowances','value' => set_value('TotalOtherAllowances',$Totalotherallowances),'id'=>'TotalOtherAllowances', 'class' => 'form-control num' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
|
|
</div>
|
|
|
|
<label >Total Order Value In INR </label>
|
|
<?php
|
|
$data = array('name' => 'Totalservicesummary','value' => set_value('Totalservicesummary',$TotalSummary),'id'=>'Totalservicesummary', 'class' => 'form-control num' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-12" style="padding:1%;" ></div>
|
|
<div class="col-md-12" style="border: 1px solid;padding:1% 0%;" id="HideImportTaxTotal" style="display:none;">
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Landing Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotallanding','value' => set_value('txttotallanding',$TotalLanding),'id'=>'txttotallanding', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label >Total High seas sales Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalhighseas','value' => set_value('txttotalhighseas',$tothighseas),'id'=>'txttotalhighseas', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Custom Duty Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalcustom','value' => set_value('txttotalcustom',$totcustom),'id'=>'txttotalcustom', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Excise duty Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalexcise','value' => set_value('txttotalexcise',$totexciseduty),'id'=>'txttotalexcise', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Excise duty ED_cess Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalexciseED','value' => set_value('txttotalexciseED',$totexcisedutyED),'id'=>'txttotalexciseED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Excise duty S & H cess Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalexciseSH','value' => set_value('txttotalexciseSH',$totexciseSH),'id'=>'txttotalexciseSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Custom ED_cess Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalcustomED','value' => set_value('txttotalcustomED',$totcustomED),'id'=>'txttotalcustomED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Custom S & H cess Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalcustomSH','value' => set_value('txttotalcustomSH',$totcustomSH),'id'=>'txttotalcustomSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Additional Excise duty Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalAdditionalExciseduty','value' => set_value('txttotalAdditionalExciseduty',$totaddtnlexcise),'id'=>'txttotalAdditionalExciseduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Gross duty payable Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalgrossduty','value' => set_value('txttotalgrossduty',$totgrossduty),'id'=>'txttotalgrossduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Available Modvat set-off on import Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalavlmodvat','value' => set_value('txttotalavlmodvat',$totavlmodvat),'id'=>'txttotalavlmodvat', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-4">
|
|
<label >Total Gross expenses due to custom duty Charge:<?php echo "($INR)"?></label>
|
|
|
|
<?php
|
|
$data = array('name' => 'txttotalgrossexpense','value' => set_value('txttotalgrossexpense',$totgrossexpense),'id'=>'txttotalgrossexpense', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-md-12">
|
|
<label>Special Instructions :</label> <?php
|
|
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$scopeofwork),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
|
echo form_textarea($data);
|
|
?>
|
|
</div>
|
|
|
|
<!-- <div align="right" style="padding-right:10px">
|
|
|
|
<div class="col-md-3 col-md-offset-9"><br/>
|
|
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
|
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
|
<input type="hidden" name="txtStatus" id="txtStatus" />
|
|
<input type="hidden" name="txtRowCount" id="txtRowCount1" />
|
|
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
|
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
|
<a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
|
<input type="reset" class="btn btn-primary" value="Reset">
|
|
|
|
</div>
|
|
</div> -->
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-md-12" style="padding:1% 0%;">
|
|
<div class="col-md-4">
|
|
<span>Request On</span>
|
|
<?php
|
|
$data = array('name' => 'Requeston','value' => set_value('Requeston',$UpdatedOn),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<span>Request By</span>
|
|
<?php
|
|
$data = array('name' => 'RequestBy','value' => set_value('RequestBy',$requestedBy),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<span>Status</span>
|
|
<?php
|
|
|
|
$data = array('name' => 'Status','value' => set_value('Status',$PoStatusName),'id'=>'Status', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div align="right" style="padding:1% 0%;">
|
|
|
|
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
|
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
|
<input type="hidden" name="txtStatus" id="txtStatus" />
|
|
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
|
|
|
|
|
|
|
|
|
<a class="btn btn-primary Save" ID="Submit" onclick="Save()" > <span class="bold">Submit</span></a>
|
|
<input type="reset" class="btn btn-primary" value="Reset">
|
|
|
|
|
|
|
|
</div>
|
|
<br/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
|
<script type="text/html" id="CapitalList">
|
|
<tr id="<%=index%>">
|
|
<td align="left"><%=index%></td>
|
|
<td align="left"><%=ReqNo%></td>
|
|
|
|
<td align="left"><%=MaterialName%></td>
|
|
<td align="left"><%=Quantity%></td>
|
|
<td align="left"><%=UOM%></td>
|
|
<td align="left"><%=Rate%></td>
|
|
<td align="left"><%=BasicAmount%></td>
|
|
<td align="left"><%=Taxvalue%></td>
|
|
<td align="left"><%=TotalValue%></td>
|
|
|
|
<td>
|
|
<a data-target='#EDITCAPITAL' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</script>
|
|
<script>
|
|
var RequistQuantity = '';
|
|
var AvilBudAmt = '';
|
|
var POMaxDate = '<?php echo $MaxPoDate;?>';
|
|
var d = new Date(POMaxDate);
|
|
var SelectedMaterialCode = [];
|
|
var CollIndex = 0;
|
|
var SelectedMaterialList = {
|
|
Mat: []
|
|
};
|
|
var index=<?php echo $index; ?> +1;
|
|
|
|
var myArray = <?php echo json_encode($res_arr_values); ?>;
|
|
$.each(myArray, function(idx, obj) {
|
|
SelectedMaterialCode[CollIndex] = obj.materialCode;
|
|
CollIndex = CollIndex + 1;
|
|
|
|
SelectedMaterialList.Mat.push({
|
|
"materialCode" : obj.materialCode,
|
|
"ReqNo" : obj.ReqNo,
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
$(function() {
|
|
|
|
$("#PODate").datepicker({
|
|
minDate : d,
|
|
maxDate : 'now',
|
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
|
});
|
|
$("#Deliverydt").datepicker({
|
|
minDate : 'now',
|
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
|
});
|
|
|
|
var capital=<?php echo json_encode($CapitalRange, JSON_PRETTY_PRINT) ?>;
|
|
//alert(capital);
|
|
if(capital==0)
|
|
{
|
|
$('#CAPdiv').hide();
|
|
$('#ADDCAPdiv').hide();
|
|
$('#ADDCAPdiv1').hide();
|
|
$('#ADDCAPdiv2').hide();
|
|
$('#ADDCAPdiv3').hide();
|
|
$('#EDITCAPdiv').hide();
|
|
// $('#EDITCAPdiv1').hide();
|
|
// $('#EDITCAPdiv2').hide();
|
|
// $('#EDITCAPdiv3').hide();
|
|
// $('#VIEWCAPdiv').hide();
|
|
// $('#VIEWCAPdiv1').hide();
|
|
// $('#VIEWCAPdiv2').hide();
|
|
// $('#VIEWCAPdiv3').hide();
|
|
//$('#DOMdiv').hide();
|
|
}
|
|
|
|
$('#drpSupplier').change(function() {
|
|
|
|
var id = $('#drpSupplier').val();
|
|
var supPaymentTerms='';
|
|
var supPaymentAT='';
|
|
var subPaymentDate='';
|
|
$("#SupAddress").val('');
|
|
|
|
if(id != '0')
|
|
{
|
|
var y = <?php echo json_encode($Suplist, JSON_PRETTY_PRINT) ?>;
|
|
|
|
|
|
$.each(y, function(idx, obj) {
|
|
if(obj.SupplierID === id)
|
|
{
|
|
$("#SupAddress").val(obj.Address);
|
|
supPaymentTerms=obj.PaymentTerms;
|
|
supPaymentAT=obj.PayableAT;
|
|
subPaymentDate=obj.PaymentDays;
|
|
|
|
}
|
|
|
|
});
|
|
$('#PaymentMethod').empty();
|
|
var paymentList = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
|
|
|
$.each(paymentList, function(idx1, obj1) {
|
|
|
|
|
|
if(obj1.ConfigValue == supPaymentTerms )
|
|
{
|
|
$("#PaymentMethod").append( $('<option></option>').val(obj1.ConfigValue).html(obj1.ConfigValue));
|
|
$("#PayableAT").val(supPaymentAT);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
$.each(paymentList, function(idx, obj) {
|
|
|
|
|
|
if(obj.PaymentTerms != supPaymentTerms )
|
|
{
|
|
$("#PaymentMethod").append( $('<option></option>').val(obj.PaymentTerms).html(obj.PaymentTerms));
|
|
$("#PayableAT").val(supPaymentAT);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
}
|
|
else
|
|
{
|
|
alert('Please select the SupplierID');
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
$('#Reqnumber').change(function() {
|
|
var ExchangeRate='';
|
|
var ExchangeRate = $('#ExchangeRt').val();
|
|
var id = $('#Reqnumber').val();
|
|
|
|
$("#CapitalbudAmt").val('');
|
|
$("#ExchangeRtModal").val(ExchangeRate);
|
|
|
|
$("#MaterialCode").empty();
|
|
$("#CapitalDepartmentName").val('');
|
|
$("#CPUOM").val('');
|
|
$("#CPQuantity").val('');
|
|
$("#CapitalItemName").val('');
|
|
$("#CPTotalAmount").val('');
|
|
$("#txtBasicValue").val('');
|
|
$("#CostCenter").val('');
|
|
clearTaxField();
|
|
if(id != '0')
|
|
{
|
|
|
|
var y = <?php echo json_encode($RequistionDetails, JSON_PRETTY_PRINT) ?>;
|
|
|
|
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
|
|
|
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
|
|
|
// For Binding DepartmentName
|
|
$.each(y, function(idx, obj) {
|
|
if(obj.ReqNo === id)
|
|
{
|
|
$("#CapitalDepartmentName").val(obj.DepartmentName);
|
|
$("#CostCenter").val(obj.CostCenterCode);
|
|
|
|
}
|
|
});
|
|
$("#CapitalbudAmt").val(AvlBudAmt);
|
|
|
|
|
|
// For Binding Material list center for the selected Requistion Number
|
|
$("#MaterialCode").append( $('<option></option>').val("0").html("Select Material Code") );
|
|
var isAdded = "0";
|
|
for(i=0;i<Material.length;i++)
|
|
{
|
|
$.each(Material[i], function(idx, obj) {
|
|
|
|
if(obj.ReqNo === id )
|
|
{
|
|
|
|
$.each(SelectedMaterialList.Mat, function(idx1, el){
|
|
if (id == el.ReqNo )
|
|
{
|
|
|
|
if(el.materialCode == obj.MaterialCode)
|
|
{
|
|
isAdded = "1";
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
isAdded = "0";
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
|
|
if(isAdded == "0")
|
|
{
|
|
|
|
$("#MaterialCode").append( $('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
});
|
|
}
|
|
}
|
|
else
|
|
{
|
|
alert('Please select the Requisition Number');
|
|
return false;
|
|
}
|
|
id = '';
|
|
|
|
});
|
|
$('#MaterialCode').change(function() {
|
|
|
|
var id = $('#MaterialCode').val();
|
|
$("#CapitalItemName").val('');
|
|
$("#CPUOM").val('');
|
|
$("#CPQuantity").val('');
|
|
$("#CPTotalAmount").val('');
|
|
RequistQuantity = '';
|
|
clearTaxField();
|
|
if(id != '0')
|
|
{
|
|
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
|
|
|
for(i=0;i<Material.length;i++)
|
|
{
|
|
$.each(Material[i], function(idx, obj) {
|
|
if(obj.MaterialCode === id)
|
|
{
|
|
$("#CapitalItemName").val(obj.MaterialName);
|
|
$("#CPUOM").val(obj.UOM);
|
|
$("#CPQuantity").val(obj.Quantity);
|
|
RequistQuantity = obj.Quantity;
|
|
|
|
var CPUOMDisplay=obj.UOM;
|
|
|
|
$('#RateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/'+CPUOMDisplay+')');
|
|
$('#EditRateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/Ton)');
|
|
|
|
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
}
|
|
else
|
|
{
|
|
alert('Please select the MaterialCode');
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
|
|
$('#EditMaterialCode').change(function() {
|
|
|
|
|
|
var id = $('#EditMaterialCode').val();
|
|
$("#EditItemName").val('');
|
|
$("#EditUOM").val('');
|
|
$("#EditQuantity").val('');
|
|
$("#EditRate").val('');
|
|
$("#txtEditBasicValue").val('');
|
|
RequistQuantity = '';
|
|
clearEditTaxField();
|
|
if(id != '0')
|
|
{
|
|
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
|
|
|
for(i=0;i<Material.length;i++)
|
|
{
|
|
$.each(Material[i], function(idx, obj) {
|
|
if(obj.MaterialCode === id)
|
|
{
|
|
$("#EditItemName").val(obj.MaterialName);
|
|
$("#EditUOM").val(obj.UOM);
|
|
$("#EditQuantity").val(obj.Quantity);
|
|
RequistQuantity = obj.Quantity;
|
|
var CPUOMDisplay=obj.UOM;
|
|
|
|
$('#RateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/'+CPUOMDisplay+')');
|
|
$('#EditRateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/Ton)');
|
|
}
|
|
});
|
|
}
|
|
|
|
}
|
|
else
|
|
{
|
|
alert('Please select the MaterialCode');
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
|
|
});
|
|
function clearTaxField()
|
|
{
|
|
$('#CPTotalAmount').val('');
|
|
$('#AfterServiceTax').val('');
|
|
$('#AfterEduCess').val('');
|
|
$('#AfterSecHighTax').val('');
|
|
$('#AfterKrishiTax').val('');
|
|
$('#AfterSwachhTax').val('');
|
|
$('#BasicPriceTax ').val('');
|
|
$('#AfterBasicPriceTax').val('');
|
|
|
|
$("#LandingCharge").val('');
|
|
$("#AfterLandingCharge").val('');
|
|
$("#Highseas").val('');
|
|
$("#AfterHighseas").val('');
|
|
$("#Customduty").val('');
|
|
$("#AfterCustomduty").val('');
|
|
$("#ExcisedutyTax").val('');
|
|
$("#AfterExcisedutyTax").val('');
|
|
$("#ExcisedutyEDcess").val('');
|
|
$("#AfterExcisedutyEDcess").val('');
|
|
$("#ExcisedutySHcess").val('');
|
|
$("#AfterExcisedutySHcess").val('');
|
|
$("#CustomEDcess").val('');
|
|
$("#AfterCustomEDcess").val('');
|
|
$("#CustomSHcess").val('');
|
|
$("#AfterCustomSHcess").val('');
|
|
$("#AdditionalExciseduty").val('');
|
|
$("#AfterAdditionalExciseduty").val('');
|
|
$("#Grossdutypayable").val('');
|
|
$("#AvailableModvat").val('');
|
|
$("#Grossexpenses").val('');
|
|
$("#purchaserate").val('');
|
|
$("#CustomDutyExpenses").val('');
|
|
$("#RMCIncludingCustomers").val('');
|
|
$("#PurQuantity").val('');
|
|
|
|
RequistQuantity = '';
|
|
|
|
}
|
|
/*
|
|
|
|
This function is used to validate all field
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* This function used to check quantity exceeding or not */
|
|
|
|
// function ExceedQuantityCheck()
|
|
// {
|
|
// var EnterQuantity = $("#CPQuantity").val()== '' ? "0.00" : parseFloat($("#CPQuantity").val());
|
|
// var ReqQuantity = parseFloat(RequistQuantity);
|
|
// //alert(ReqQuantity);
|
|
// if(EnterQuantity > ReqQuantity)
|
|
// {
|
|
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
|
|
|
// $('#CPQuantity').focus();
|
|
// return false;
|
|
// }
|
|
// else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
/*
|
|
This function is used to calculate tax
|
|
*/
|
|
function calculateServiceCGST(varBasicValue,varCGST)
|
|
{
|
|
|
|
|
|
var basicValue = parseFloat(varBasicValue);
|
|
var Cgst = parseFloat(varCGST);
|
|
var ServiceCGSTvalue = 0.0;
|
|
|
|
ServiceCGSTvalue = <?php echo SERVICETAX_CGST; ?>;
|
|
|
|
var TAXval = parseFloat(ServiceCGSTvalue).toFixed(2);
|
|
|
|
return TAXval;// $('#AfterServiceTax').val(TAXval);
|
|
|
|
}
|
|
function calculateServiceSGST(varBasicValue,varSGST)
|
|
{
|
|
// alert(varBasicValue+"-"+varSGST);
|
|
var basicValue = parseFloat(varBasicValue);
|
|
var Sgst = parseFloat(varSGST);
|
|
var ServiceSGSTvalue = 0.0;
|
|
|
|
ServiceSGSTvalue = <?php echo SERVICETAX_SGST; ?>;
|
|
|
|
var TAXval = parseFloat(ServiceSGSTvalue).toFixed(2);
|
|
|
|
return TAXval;// $('#AfterEduCess').val(TAXval);
|
|
}
|
|
function calculateServiceIGST(varBasicValue,varIGST)
|
|
{
|
|
var basicValue = parseFloat(varBasicValue);
|
|
var Igst = parseFloat(varIGST);
|
|
var ServiceCGSTvalue = 0.0;
|
|
|
|
ServiceCGSTvalue = <?php echo SERVICETAX_IGST; ?>;
|
|
|
|
var TAXval = parseFloat(ServiceCGSTvalue).toFixed(2);
|
|
|
|
return TAXval;//$('#AfterSecHighTax').val(TAXval);
|
|
}
|
|
|
|
|
|
/*
|
|
Calculate Landing charge
|
|
*/
|
|
|
|
function calculateLandingCharge(landingCharge,basicValue){
|
|
var landCharge = landingCharge;
|
|
var basicPrice = parseFloat(basicValue);
|
|
afterLandingCharge = <?php echo Capital_Landing_Charge; ?>;
|
|
|
|
return parseFloat(afterLandingCharge).toFixed(2);
|
|
|
|
|
|
}
|
|
/*Calculate Highseas Charge*/
|
|
function calculateHighseasCharge(AfterLanding,basicPrices,Highseass){
|
|
var afterLandingCharge = parseFloat(AfterLanding);
|
|
var basicPrice = parseFloat(basicPrices);
|
|
var highSeas = Highseass;
|
|
afterHighseasCharge = <?php echo Capital_Highseas_Charge; ?>;
|
|
|
|
return parseFloat(afterHighseasCharge).toFixed(2);
|
|
|
|
}
|
|
/*Calculate calculate Customduty Charge */
|
|
function calculateCustomdutyCharge(AfterLanding,basicPrices,afterHighseass,Customduty){
|
|
var afterLandingCharge = parseFloat(AfterLanding);
|
|
var basicPrice = parseFloat(basicPrices);
|
|
var afterHighseas = parseFloat(afterHighseass);
|
|
var Customduty = Customduty;
|
|
|
|
|
|
afterCustomdutyCharge = <?php echo Capital_Customduty_Charge; ?>;
|
|
|
|
return parseFloat(afterCustomdutyCharge).toFixed(2);
|
|
|
|
}
|
|
|
|
/*
|
|
calculate Excise Charge
|
|
*/
|
|
function calculateExciseCharge(AfterLanding,basicPrices,afterHighseass,afterCustomduty,Excise){
|
|
var afterLandingCharge = parseFloat(AfterLanding);
|
|
var basicPrice = parseFloat(basicPrices);
|
|
var afterHighseas = parseFloat(afterHighseass);
|
|
var afterCustomduty = parseFloat(afterCustomduty);
|
|
var Excise = Excise;
|
|
|
|
|
|
afterExciseCharge = <?php echo Capital_Excise_Charge; ?>;
|
|
|
|
return parseFloat(afterExciseCharge).toFixed(2);
|
|
|
|
}
|
|
/* calculateExciseEDcessCharge*/
|
|
function calculateExciseEDcessCharge(ExciseDuty,ExciseEDcessCharge){
|
|
|
|
var ExciseDuty = parseFloat(ExciseDuty);
|
|
var ExciseEDcessCharge = ExciseEDcessCharge;
|
|
afterExciseEDcessCharge = <?php echo Capital_ExciseEDcess_Charge; ?>;
|
|
|
|
return parseFloat(afterExciseEDcessCharge).toFixed(2);
|
|
}
|
|
|
|
/* calculate Excise duty S & H cess :(d) */
|
|
function calculateExciseSHcessCharge(ExciseDuty,ExciseSHcessCharge){
|
|
|
|
var ExciseDuty = parseFloat(ExciseDuty);
|
|
var ExciseSHcessCharge = ExciseSHcessCharge;
|
|
afterExciseSHcessCharge = <?php echo Capital_ExciseSHcess_Charge; ?>;
|
|
|
|
return parseFloat(afterExciseSHcessCharge).toFixed(2);
|
|
}
|
|
/*
|
|
calculate CustomEDcess Charge
|
|
*/
|
|
function calculateCustomEDcessCharge(AfterLanding,AfterHighseas,AfterCustomduty,AfterExcisedutyTax,AfterExcisedutyEDcess,AfterExcisedutySHcess,CustomEDcess){
|
|
var afterLandingCharge = parseFloat(AfterLanding);
|
|
var AfterHighseas = parseFloat(AfterHighseas);
|
|
var AfterCustomduty = parseFloat(AfterCustomduty);
|
|
var AfterExcisedutyTax = parseFloat(AfterExcisedutyTax);
|
|
var AfterExcisedutyEDcess = parseFloat(AfterExcisedutyEDcess);
|
|
var AfterExcisedutySHcess = parseFloat(AfterExcisedutySHcess);
|
|
var CustomEDcess = CustomEDcess;
|
|
|
|
|
|
afterCustomEDcessCharge = <?php echo Capital_CustomEDcess_Charge; ?>;
|
|
|
|
return parseFloat(afterCustomEDcessCharge).toFixed(2);
|
|
|
|
}
|
|
/*
|
|
calculate custom S & H cess
|
|
*/
|
|
function calculateCustomSHcessCharge(AfterLanding,AfterHighseas,AfterCustomduty,AfterExcisedutyTax,AfterExcisedutyEDcess,AfterExcisedutySHcess,CustomSHcess){
|
|
var afterLandingCharge = parseFloat(AfterLanding);
|
|
var AfterHighseas = parseFloat(AfterHighseas);
|
|
var AfterCustomduty = parseFloat(AfterCustomduty);
|
|
var AfterExcisedutyTax = parseFloat(AfterExcisedutyTax);
|
|
var AfterExcisedutyEDcess = parseFloat(AfterExcisedutyEDcess);
|
|
var AfterExcisedutySHcess = parseFloat(AfterExcisedutySHcess);
|
|
var CustomSHcess = CustomSHcess;
|
|
|
|
|
|
afterCustomCustomSHcessCharge = <?php echo Capital_CustomSHcess_Charge; ?>;
|
|
|
|
return parseFloat(afterCustomCustomSHcessCharge).toFixed(2);
|
|
|
|
}
|
|
/*
|
|
calculate Additional ExciseDuty Charge
|
|
*/
|
|
function calculateAdditionalExciseDutyCharge(basicPrices,AfterLanding,AfterHighseas,AfterCustomduty,AfterExcisedutyTax,AfterExcisedutyEDcess,AfterExcisedutySHcess,AfterCustomEDcess,AfterCustomSHcess,AdditionalExciseduty){
|
|
var basicPrices = parseFloat(basicPrices);
|
|
var afterLandingCharge = parseFloat(AfterLanding);
|
|
var AfterHighseas = parseFloat(AfterHighseas);
|
|
var AfterCustomduty = parseFloat(AfterCustomduty);
|
|
var AfterExcisedutyTax = parseFloat(AfterExcisedutyTax);
|
|
var AfterExcisedutyEDcess = parseFloat(AfterExcisedutyEDcess);
|
|
var AfterExcisedutySHcess = parseFloat(AfterExcisedutySHcess);
|
|
|
|
var AfterCustomEDcess = parseFloat(AfterCustomEDcess);
|
|
var AfterCustomSHcess = parseFloat(AfterCustomSHcess);
|
|
var AdditionalExciseduty = AdditionalExciseduty;
|
|
|
|
|
|
afterAdditionalExcisedutyCharge = <?php echo Capital_AdditionalExciseduty_Charge; ?>;
|
|
|
|
return parseFloat(afterAdditionalExcisedutyCharge).toFixed(2);
|
|
|
|
}
|
|
/*
|
|
calculate Additional Grossdutypayable Charge
|
|
*/
|
|
function calculateGrossdutypayableCharge(AfterLanding,AfterHighseas,AfterCustomduty,AfterExcisedutyTax,AfterExcisedutyEDcess,AfterExcisedutySHcess,AfterCustomEDcess,AfterCustomSHcess,AfterAdditionalExciseduty){
|
|
var AfterAdditionalExciseduty = parseFloat(AfterAdditionalExciseduty);
|
|
var afterLandingCharge = parseFloat(AfterLanding);
|
|
var AfterHighseas = parseFloat(AfterHighseas);
|
|
var AfterCustomduty = parseFloat(AfterCustomduty);
|
|
var AfterExcisedutyTax = parseFloat(AfterExcisedutyTax);
|
|
var AfterExcisedutyEDcess = parseFloat(AfterExcisedutyEDcess);
|
|
var AfterExcisedutySHcess = parseFloat(AfterExcisedutySHcess);
|
|
|
|
var AfterCustomEDcess = parseFloat(AfterCustomEDcess);
|
|
var AfterCustomSHcess = parseFloat(AfterCustomSHcess);
|
|
|
|
|
|
GrossdutypayableCharge = <?php echo Capital_Grossdutypayable_Charge; ?>;
|
|
|
|
return parseFloat(GrossdutypayableCharge).toFixed(2);
|
|
|
|
}
|
|
/*
|
|
calculate ModvatCharge Charge
|
|
*/
|
|
function calculateAvailableModvatCharge(AfterExcisedutyTax,AfterExcisedutyEDcess,AfterExcisedutySHcess,AfterAdditionalExciseduty){
|
|
var AfterExcisedutyTax = parseFloat(AfterExcisedutyTax);
|
|
var AfterExcisedutyEDcess = parseFloat(AfterExcisedutyEDcess);
|
|
var AfterExcisedutySHcess = parseFloat(AfterExcisedutySHcess);
|
|
var AfterAdditionalExciseduty = parseFloat(AfterAdditionalExciseduty);
|
|
|
|
|
|
|
|
ModvatCharge = <?php echo Capital_ModvatCharge_Charge; ?>;
|
|
|
|
return parseFloat(ModvatCharge).toFixed(2);
|
|
|
|
}
|
|
/*
|
|
calculate Grossexpenses Charge
|
|
*/
|
|
function calculateGrossexpensesCharge(Grossdutypayable,AvailableModvat){
|
|
var Grossdutypayable = parseFloat(Grossdutypayable);
|
|
var AvailableModvat = parseFloat(AvailableModvat);
|
|
|
|
|
|
|
|
|
|
Grossexpenses = <?php echo Capital_Grossexpenses_Charge; ?>;
|
|
|
|
return parseFloat(Grossexpenses).toFixed(2);
|
|
|
|
}
|
|
/*
|
|
calculate purchaserate
|
|
*/
|
|
function calculatepurchaserate(AfterBasicPriceTax,PurQuantity){
|
|
var AfterBasicPriceTax = parseFloat(AfterBasicPriceTax);
|
|
var PurQuantity = parseFloat(PurQuantity);
|
|
|
|
|
|
|
|
|
|
purchaserate = <?php echo Capital_purchaserate_Charge; ?>;
|
|
|
|
return parseFloat(purchaserate).toFixed(2);
|
|
|
|
}
|
|
/*
|
|
calculateCustomDutyExpenses
|
|
*/
|
|
function calculateCustomDutyExpenses(Grossexpenses,PurQuantity){
|
|
var Grossexpenses = parseFloat(Grossexpenses);
|
|
var PurQuantity = parseFloat(PurQuantity);
|
|
|
|
|
|
|
|
|
|
CustomDutyExpenses = <?php echo Capital_CustomDutyExpenses_Charge; ?>;
|
|
|
|
return parseFloat(CustomDutyExpenses).toFixed(2);
|
|
|
|
}
|
|
/*
|
|
calculateRMCIncludingCustomers
|
|
*/
|
|
function calculateRMCIncludingCustomers(purchaserate,CustomDutyExpenses){
|
|
var purchaserate = parseFloat(purchaserate);
|
|
var CustomDutyExpenses = parseFloat(CustomDutyExpenses);
|
|
|
|
|
|
|
|
|
|
RMCIncludingCustomers = <?php echo Capital_RMCIncludingCustomers_Charge; ?>;
|
|
|
|
return parseFloat(RMCIncludingCustomers).toFixed(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
This is used to calculate Total order value
|
|
*/
|
|
|
|
/*
|
|
Used to check the exceed budget
|
|
*/
|
|
function ExceedBudget(ValuetoCheck,budgetAmount)
|
|
{
|
|
var ReqAmount = parseFloat(ValuetoCheck);
|
|
var BudAmount = parseFloat(budgetAmount);
|
|
|
|
if(ReqAmount > BudAmount )
|
|
{
|
|
alert('Your exceeding the Avaiable Budget :'+ BudAmount +'.Please adjust the Product to proceed further.');
|
|
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
/* This is used add capital po line item */
|
|
|
|
|
|
/* used to validateExceedLimit */
|
|
function validateExceedLimit()
|
|
{
|
|
|
|
var avalbudAmt = parseFloat($('#CapitalbudAmt').val());
|
|
var basicAmountRate = parseFloat($('#CPTotalAmount').val());
|
|
var totalAmount = parseFloat($('#txtTotalOrderValue').val());
|
|
|
|
if(basicAmountRate > avalbudAmt)
|
|
{
|
|
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
|
$('#CPRate').focus();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|
|
function validateCapitalTax()
|
|
{
|
|
if($('#Reqnumber').val() == "0")
|
|
{
|
|
alert('Please select the Requisition Number');
|
|
$('#Reqnumber').focus();
|
|
return false;
|
|
}
|
|
else if($('#CostCenter').val() == "0")
|
|
{
|
|
alert('Please select the Cost center');
|
|
$('#CostCenter').focus();
|
|
return false;
|
|
}
|
|
else if($('#MaterialCode').val() == "0")
|
|
{
|
|
alert('Please select the Material Code');
|
|
$('#MaterialCode').focus();
|
|
return false;
|
|
}
|
|
else if($('#CPQuantity').val() == '')
|
|
{
|
|
alert('Please Enter the Quantity value');
|
|
$('#CPQuantity').focus();
|
|
return false;
|
|
}
|
|
else if($('#CPRate').val() == '')
|
|
{
|
|
alert('Please Enter the Rate of the Item');
|
|
$('#CPRate').focus();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
function clearCapitalModalFields()
|
|
{
|
|
|
|
|
|
$('#Reqnumber').val('0');
|
|
$('#CapitalDepartmentName').val('');
|
|
$('#CapitalbudAmt').val('');
|
|
$('#CostCenter').val('0');
|
|
$('#MaterialCode').val('0');
|
|
$("#CapitalItemName").val('');
|
|
$("#CPUOM").val('');
|
|
//var exchangeRate = $("#ExchangeRtModal").val();
|
|
$("#CPQuantity").val('');
|
|
$("#CPRate").val('');
|
|
|
|
$("#CPTotalAmount").val('');
|
|
$("#AfterServiceTax").val('');
|
|
$("#AfterEduCess").val('');
|
|
$("#AfterSecHighTax").val('');
|
|
|
|
$("#AfterKrishiTax").val('');
|
|
$("#AfterSwachhTax").val('');
|
|
$('#AfterBasicPriceTax').val('');
|
|
$('#LandingCharge').val('');
|
|
$('#AfterLandingCharge').val('');
|
|
$('#Highseas').val('');
|
|
$('#AfterHighseas').val('');
|
|
$('#Customduty').val('');
|
|
|
|
$('#AfterCustomduty').val('');
|
|
$('#ExcisedutyTax').val('');
|
|
$('#AfterExcisedutyTax').val('');
|
|
$('#ExcisedutyEDcess').val('');
|
|
$('#AfterExcisedutyEDcess').val('');
|
|
$('#ExcisedutySHcess').val('');
|
|
$('#AfterExcisedutySHcess').val('');
|
|
$('#CustomEDcess').val('');
|
|
$('#AfterCustomEDcess').val('');
|
|
$('#CustomSHcess').val('');
|
|
$('#AfterCustomSHcess').val('');
|
|
$('#AdditionalExciseduty').val('');
|
|
$('#AfterAdditionalExciseduty').val('');
|
|
$('#Grossdutypayable').val('');
|
|
$('#AvailableModvat').val('');
|
|
$('#Grossexpenses').val('');
|
|
$('#PurQuantity').val('');
|
|
$('#purchaserate').val('');
|
|
$('#CustomDutyExpenses').val('');
|
|
$('#RMCIncludingCustomers').val('');
|
|
$("#txtTotalOrderValue").val('');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* This function is used to calculate the total amounts after delete the row
|
|
*/
|
|
function populateValueMainFormForDeleteServiceTax(deletedRow)
|
|
{
|
|
|
|
var rows = document.getElementById('serviceTax').rows.length;
|
|
|
|
var TotalOrderValueSummary = 0;
|
|
|
|
var TotalServiceTax = 0;
|
|
var TotalEducess = 0;
|
|
var TotHigherEdu = 0;
|
|
|
|
var TotalKrishiKalyan = 0;
|
|
var TotSwachhBharat = 0;
|
|
|
|
var TotLanding = 0;
|
|
var TotHighseas = 0;
|
|
var TotCustom = 0;
|
|
var TotExcise = 0;
|
|
var TotExciseED = 0;
|
|
var TotExciseSH = 0;
|
|
var TotCustomED = 0;
|
|
var TotCustomSH = 0;
|
|
var TotAdditionalExciseduty = 0;
|
|
var TotGrossduty = 0;
|
|
var TotAvlmodvat = 0;
|
|
|
|
var TotGrossexpense = 0;
|
|
var CapitalToatlOrder=0;
|
|
|
|
for (var i = 1; i < rows; i++) {
|
|
if(deletedRow==i){
|
|
$('#AfterServiceTax'+i).val('');
|
|
$('#AfterEduCess'+i).val('');
|
|
$('#AfterSecHighTax'+i).val('');
|
|
|
|
$('#AfterKrishiTax'+i).val('');
|
|
$('#AfterSwachhTax'+i).val('');
|
|
|
|
$('#landingCharge'+i).val('');
|
|
$('#HighSeasSalesCharge'+i).val('');
|
|
$('#CustomDuty'+i).val('');
|
|
$('#ExciseDuty'+i).val('');
|
|
$('#ExciseDutyEDCess'+i).val('');
|
|
$('#ExciseDutySHCess'+i).val('');
|
|
$('#CustomEDCess'+i).val('');
|
|
$('#CustomSHCess'+i).val('');
|
|
$('#AdditionalExciseDuty'+i).val('');
|
|
$('#GrossDutyPayable'+i).val('');
|
|
$('#AvailableModvat'+i).val('');
|
|
$('#GrossExpensesDuetoCustom'+i).val('');
|
|
$('#basicval'+i).val('');
|
|
|
|
$('#ServiceTotalOrderValue'+i).val('');
|
|
|
|
|
|
|
|
var TotalOrderValueSummaryI = $('#ServiceTotalOrderValue'+i).val() == '' ? '0.00' : $('#ServiceTotalOrderValue'+i).val();
|
|
|
|
var TotalServiceTaxI = $('#AfterServiceTax'+i).val() == '' ? '0.00' : $('#AfterServiceTax'+i).val();
|
|
var TotalEducessI = $('#AfterEduCess'+i).val() == '' ? '0.00' : $('#AfterEduCess'+i).val();
|
|
var TotHigherEduI = $('#AfterSecHighTax'+i).val() == '' ? '0.00' : $('#AfterSecHighTax'+i).val();
|
|
|
|
var TotalKrishiKalyanI = $('#AfterKrishiTax'+i).val() == '' ? '0.00' : $('#AfterKrishiTax'+i).val();
|
|
var TotSwachhBharatI = $('#AfterSwachhTax'+i).val() == '' ? '0.00' : $('#AfterSwachhTax'+i).val();
|
|
|
|
var TotLandingI = $('#landingCharge'+i).val() == '' ? '0.00' : $('#landingCharge'+i).val();
|
|
var TotHighseasI = $('#HighSeasSalesCharge'+i).val() == '' ? '0.00' : $('#HighSeasSalesCharge'+i).val();
|
|
var TotCustomI = $('#CustomDuty'+i).val() == '' ? '0.00' : $('#CustomDuty'+i).val();
|
|
var TotExciseI = $('#ExciseDuty'+i).val() == '' ? '0.00' : $('#ExciseDuty'+i).val();
|
|
var TotExciseEDI = $('#ExciseDutyEDCess'+i).val() == '' ? '0.00' : $('#ExciseDutyEDCess'+i).val();
|
|
var TotExciseSHI = $('#ExciseDutySHCess'+i).val() == '' ? '0.00' : $('#ExciseDutySHCess'+i).val();
|
|
var TotCustomEDI = $('#CustomEDCess'+i).val() == '' ? '0.00' : $('#CustomEDCess'+i).val();
|
|
var TotCustomSHI = $('#CustomSHCess'+i).val() == '' ? '0.00' : $('#CustomSHCess'+i).val();
|
|
var TotAdditionalExcisedutyI = $('#AdditionalExciseDuty'+i).val() == '' ? '0.00' : $('#AdditionalExciseDuty'+i).val();
|
|
var TotGrossdutyI = $('#GrossDutyPayable'+i).val() == '' ? '0.00' : $('#GrossDutyPayable'+i).val();
|
|
var TotAvlmodvatI = $('#AvailableModvat'+i).val() == '' ? '0.00' : $('#AvailableModvat'+i).val();
|
|
|
|
var TotGrossexpenseI = $('#GrossExpensesDuetoCustom'+i).val() == '' ? '0.00' : $('#GrossExpensesDuetoCustom'+i).val();
|
|
|
|
var CapitalToatlOrderI= $('#basicval'+i).val() == '' ? '0.00' : $('#basicval'+i).val();
|
|
}
|
|
|
|
else if(deletedRow!=i){
|
|
|
|
|
|
var TotalOrderValueSummaryI = $('#ServiceTotalOrderValue'+i).val() == '' ? '0.00' : $('#ServiceTotalOrderValue'+i).val();
|
|
|
|
var TotalServiceTaxI = $('#AfterServiceTax'+i).val() == '' ? '0.00' : $('#AfterServiceTax'+i).val();
|
|
var TotalEducessI = $('#AfterEduCess'+i).val() == '' ? '0.00' : $('#AfterEduCess'+i).val();
|
|
var TotHigherEduI = $('#AfterSecHighTax'+i).val() == '' ? '0.00' : $('#AfterSecHighTax'+i).val();
|
|
|
|
var TotalKrishiKalyanI = $('#AfterKrishiTax'+i).val() == '' ? '0.00' : $('#AfterKrishiTax'+i).val();
|
|
var TotSwachhBharatI = $('#AfterSwachhTax'+i).val() == '' ? '0.00' : $('#AfterSwachhTax'+i).val();
|
|
|
|
var TotLandingI = $('#landingCharge'+i).val() == '' ? '0.00' : $('#landingCharge'+i).val();
|
|
var TotHighseasI = $('#HighSeasSalesCharge'+i).val() == '' ? '0.00' : $('#HighSeasSalesCharge'+i).val();
|
|
var TotCustomI = $('#CustomDuty'+i).val() == '' ? '0.00' : $('#CustomDuty'+i).val();
|
|
var TotExciseI = $('#ExciseDuty'+i).val() == '' ? '0.00' : $('#ExciseDuty'+i).val();
|
|
var TotExciseEDI = $('#ExciseDutyEDCess'+i).val() == '' ? '0.00' : $('#ExciseDutyEDCess'+i).val();
|
|
var TotExciseSHI = $('#ExciseDutySHCess'+i).val() == '' ? '0.00' : $('#ExciseDutySHCess'+i).val();
|
|
var TotCustomEDI = $('#CustomEDCess'+i).val() == '' ? '0.00' : $('#CustomEDCess'+i).val();
|
|
var TotCustomSHI = $('#CustomSHCess'+i).val() == '' ? '0.00' : $('#CustomSHCess'+i).val();
|
|
var TotAdditionalExcisedutyI = $('#AdditionalExciseDuty'+i).val() == '' ? '0.00' : $('#AdditionalExciseDuty'+i).val();
|
|
var TotGrossdutyI = $('#GrossDutyPayable'+i).val() == '' ? '0.00' : $('#GrossDutyPayable'+i).val();
|
|
var TotAvlmodvatI = $('#AvailableModvat'+i).val() == '' ? '0.00' : $('#AvailableModvat'+i).val();
|
|
|
|
var TotGrossexpenseI = $('#GrossExpensesDuetoCustom'+i).val() == '' ? '0.00' : $('#GrossExpensesDuetoCustom'+i).val();
|
|
var CapitalToatlOrderI= $('#basicval'+i).val() == '' ? '0.00' : $('#basicval'+i).val();
|
|
}
|
|
else{
|
|
|
|
}
|
|
|
|
TotalServiceTax = parseFloat(TotalServiceTax) + parseFloat(TotalServiceTaxI);
|
|
TotalEducess = parseFloat(TotalEducess) + parseFloat(TotalEducessI);
|
|
TotHigherEdu = parseFloat(TotHigherEdu) + parseFloat(TotHigherEduI);
|
|
|
|
TotalKrishiKalyan = parseFloat(TotalKrishiKalyan) + parseFloat(TotalKrishiKalyanI);
|
|
TotSwachhBharat = parseFloat(TotSwachhBharat) + parseFloat(TotSwachhBharatI);
|
|
|
|
TotLanding = parseFloat(TotLanding) + parseFloat(TotLandingI);
|
|
TotHighseas = parseFloat(TotHighseas) + parseFloat(TotHighseasI);
|
|
TotCustom = parseFloat(TotCustom) + parseFloat(TotCustomI);
|
|
TotExcise = parseFloat(TotExcise) + parseFloat(TotExciseI);
|
|
TotExciseED = parseFloat(TotExciseED) + parseFloat(TotExciseEDI);
|
|
TotExciseSH = parseFloat(TotExciseSH) + parseFloat(TotExciseSHI);
|
|
TotCustomED = parseFloat(TotCustomED) + parseFloat(TotCustomEDI);
|
|
TotCustomSH = parseFloat(TotCustomSH) + parseFloat(TotCustomSHI);
|
|
TotAdditionalExciseduty = parseFloat(TotAdditionalExciseduty) + parseFloat(TotAdditionalExcisedutyI);
|
|
TotGrossduty = parseFloat(TotGrossduty) + parseFloat(TotGrossdutyI);
|
|
TotAvlmodvat = parseFloat(TotAvlmodvat) + parseFloat(TotAvlmodvatI);
|
|
|
|
TotGrossexpense = parseFloat(TotGrossexpense) + parseFloat(TotGrossexpenseI);
|
|
TotalOrderValueSummary = parseFloat(TotalOrderValueSummary) + parseFloat(TotalOrderValueSummaryI);
|
|
CapitalToatlOrder=parseFloat(CapitalToatlOrder) + parseFloat(CapitalToatlOrderI);
|
|
|
|
}
|
|
|
|
$('#TotalAfterServiceTax').val((parseFloat(TotalServiceTax)).toFixed(2) );
|
|
$('#TotalAfterEduCess').val((parseFloat(TotalEducess)).toFixed(2) );
|
|
$('#TotalAfterSecHighTax').val((parseFloat(TotHigherEdu)).toFixed(2) );
|
|
|
|
$('#TotalAfterKrishiTax').val((parseFloat(TotalKrishiKalyan) ).toFixed(2) );
|
|
$('#TotalAfterSwachhTax').val((parseFloat(TotSwachhBharat) ).toFixed(2) );
|
|
|
|
$('#txttotallanding').val((parseFloat(TotLanding) ).toFixed(2) );
|
|
$('#txttotalhighseas').val((parseFloat(TotHighseas) ).toFixed(2) );
|
|
$('#txttotalcustom').val((parseFloat(TotCustom)).toFixed(2) );
|
|
$('#txttotalexcise').val((parseFloat(TotExcise)).toFixed(2) );
|
|
$('#txttotalexciseED').val((parseFloat(TotExciseED)).toFixed(2) );
|
|
$('#txttotalexciseSH').val((parseFloat(TotExciseSH)).toFixed(2) );
|
|
$('#txttotalcustomED').val((parseFloat(TotCustomED)).toFixed(2) );
|
|
$('#txttotalcustomSH').val((parseFloat(TotCustomSH)).toFixed(2) );
|
|
$('#txttotalAdditionalExciseduty').val((parseFloat(TotAdditionalExciseduty)).toFixed(2) );
|
|
$('#txttotalgrossduty').val((parseFloat(TotGrossduty)).toFixed(2) );
|
|
$('#txttotalavlmodvat').val((parseFloat(TotAvlmodvat)).toFixed(2) );
|
|
$('#txttotalgrossexpense').val((parseFloat(TotGrossexpense)).toFixed(2) );
|
|
$('#CapitalToatlOrder').val((parseFloat(CapitalToatlOrder)).toFixed(2) );
|
|
|
|
$('#txtToatlOrder').val((parseFloat(TotalOrderValueSummary)).toFixed(2) );
|
|
|
|
}
|
|
/* get Edit Capital Po Modal*/
|
|
|
|
$("#EDITCAPITAL").on("shown.bs.modal", function(e) {
|
|
|
|
|
|
|
|
userid = $(e.relatedTarget).data('userid');
|
|
|
|
|
|
|
|
$('#isEdit').val(1);
|
|
//alert(userid);
|
|
var tr= document.getElementById(userid);
|
|
|
|
var cellval = tr.cells;
|
|
|
|
var id= $('#Reqnumber'+userid).val();
|
|
|
|
$('#EditReqnumber').val($('#Reqnumber'+userid).val());
|
|
$('#EditCapitalDepartmentName').val($('#departmentName'+userid).val());
|
|
$("#EditCostCenter").val($('#CPCostCode'+userid).val());
|
|
$('#EditCapitalbudAmt').val($('#AvilBudget'+userid).val());
|
|
$('#EditExchangeRtModal').val($('#echangeRate'+userid).val());
|
|
|
|
$('#EditCapitalItemName').val($('#materialName'+userid).val());
|
|
$('#Edittxtservicedescription').val($('#ServiceMaterialDescription'+userid).val());
|
|
$('#EditFrequency').val($('#frequency'+userid).val());
|
|
|
|
$('#EditCPUOM').val($('#uom'+userid).val());
|
|
|
|
$('#EditCPQuantity').val($('#quantity'+userid).val());
|
|
$('#EditCPRate').val($('#rateInUs'+userid).val());
|
|
|
|
$('#EditCPTotalAmount').val($('#basicval'+userid).val());
|
|
|
|
RequistQuantity = $('#quantity'+userid).val();
|
|
$('#EditCgst').val($('#CGST'+userid).val());
|
|
$('#EditAfterCgst').val($('#afterCGST'+userid).val());
|
|
$('#EditSgst').val($('#SGST'+userid).val());
|
|
$('#EditAfterSgst').val($('#afterSGST'+userid).val());
|
|
$('#EditIgst').val($('#IGST'+userid).val());
|
|
$('#EditAfterIgst').val($('#afterIGST'+userid).val());
|
|
$('#EditOtherAllowances').val($('#otherallowance'+userid).val());
|
|
$('#Editservicetotalordervaue').val($('#totalservicevalue'+userid).val());
|
|
|
|
$('#EditAfterBasicPriceTax').val($('#basicvalInINR'+userid).val());
|
|
$('#EditAfterLandingCharge').val($('#landingCharge'+userid).val());
|
|
$('#EditAfterHighseas').val($('#HighSeasSalesCharge'+userid).val());
|
|
$('#EditAfterCustomduty').val($('#CustomDuty'+userid).val());
|
|
$('#EditAfterExcisedutyTax').val($('#ExciseDuty'+userid).val());
|
|
$('#EditAfterExcisedutyEDcess').val($('#ExciseDutyEDCess'+userid).val());
|
|
$('#EditAfterExcisedutySHcess').val($('#ExciseDutySHCess'+userid).val());
|
|
$('#EditAfterCustomEDcess').val($('#CustomEDCess'+userid).val());
|
|
$('#EditAfterCustomSHcess').val($('#CustomSHCess'+userid).val());
|
|
$('#EditAfterAdditionalExciseduty').val($('#AdditionalExciseDuty'+userid).val());
|
|
$('#EditGrossdutypayable').val($('#GrossDutyPayable'+userid).val());
|
|
$('#EditAvailableModvat').val($('#AvailableModvat'+userid).val());
|
|
$('#EditGrossexpenses').val($('#GrossExpensesDuetoCustom'+userid).val());
|
|
$('#Editpurchaserate').val($('#purchaseRate'+userid).val());
|
|
$('#EditCustomDutyExpenses').val($('#CustomDutyExpenses'+userid).val());
|
|
//$('#txtEditInsurance').val($('#RMCIncludingCustomers'+userid).val());
|
|
$('#EditRMCIncludingCustomers').val($('#RMCIncludingCustomers'+userid).val());
|
|
|
|
$('#EdittxtTotalOrderValue').val($('#PerKgExpense'+userid).val());
|
|
|
|
/* get % value */
|
|
|
|
$('#EditLandingCharge').val($('#beforeLanding'+userid).val());
|
|
$('#EditHighseas').val($('#beforeHighSeasSalesCharge'+userid).val());
|
|
$('#EditCustomduty').val($('#beforeCustomDuty'+userid).val());
|
|
$('#EditExcisedutyTax').val($('#beforeExciseDuty'+userid).val());
|
|
$('#EditExcisedutyEDcess').val($('#beforeExciseDutyEDCess'+userid).val());
|
|
$('#EditExcisedutySHcess').val($('#beforeExciseDutySHCess'+userid).val());
|
|
$('#EditCustomEDcess').val($('#beforeCustomEDCess'+userid).val());
|
|
$('#EditCustomSHcess').val($('#beforeCustomSHCess'+userid).val());
|
|
$('#EditAdditionalExciseduty').val($('#beforeAdditionalExciseDuty'+userid).val());
|
|
$('#EditPurQuantity').val($('#PurQuantity'+userid).val());
|
|
|
|
var EditUOM = $('#uom'+userid).val();
|
|
$('#RateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/'+EditUOM+')');
|
|
$('#EditRateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/'+EditUOM+')');
|
|
|
|
|
|
|
|
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
|
|
|
$("#EditMaterialCode").empty();
|
|
|
|
$("#EditMaterialCode").append( $('<option></option>').val($('#materialCode'+userid).val()).html($('#materialCode'+userid).val() + "-" + $('#materialName'+userid).val()) );
|
|
|
|
for(i=0;i<Material.length;i++)
|
|
{
|
|
$.each(Material[i], function(idx, obj) {
|
|
if(obj.MaterialCode != $('#materialCode'+userid).val())
|
|
{
|
|
$("#EditMaterialCode").append( $('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName) );
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
/*get edit material list*/
|
|
$('#EditMaterialCode').change(function() {
|
|
|
|
var id = $('#EditMaterialCode').val();
|
|
$("#EditCapitalItemName").val('');
|
|
$("#EditCPUOM").val('');
|
|
$("#EditCPQuantity").val('');
|
|
$("#EditCPTotalAmount").val('');
|
|
RequistQuantity = '';
|
|
clearTaxField();
|
|
if(id != '0')
|
|
{
|
|
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
|
|
|
for(i=0;i<Material.length;i++)
|
|
{
|
|
$.each(Material[i], function(idx, obj) {
|
|
if(obj.MaterialCode === id)
|
|
{
|
|
$("#EditCapitalItemName").val(obj.MaterialName);
|
|
$("#EditCPUOM").val(obj.UOM);
|
|
$("#EditCPQuantity").val(obj.Quantity);
|
|
RequistQuantity = obj.Quantity;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
else
|
|
{
|
|
alert('Please select the MaterialCode');
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
function clearEditTaxField()
|
|
{
|
|
$('#EditCPRate').val('');
|
|
|
|
$('#EditCPTotalAmount').val('');
|
|
$('#EditAfterServiceTax').val('');
|
|
$('#EditAfterEduCess').val('');
|
|
$('#EditAfterSecHighTax').val('');
|
|
$('#EditAfterKrishiTax').val('');
|
|
$('#EditAfterSwachhTax').val('');
|
|
$('#EditBasicPriceTax ').val('');
|
|
$('#EditAfterBasicPriceTax').val('');
|
|
|
|
$("#EditLandingCharge").val('');
|
|
$("#EditAfterLandingCharge").val('');
|
|
$("#EditHighseas").val('');
|
|
$("#EditAfterHighseas").val('');
|
|
$("#EditCustomduty").val('');
|
|
$("#EditAfterCustomduty").val('');
|
|
$("#EditExcisedutyTax").val('');
|
|
$("#EditAfterExcisedutyTax").val('');
|
|
$("#EditExcisedutyEDcess").val('');
|
|
$("#EditAfterExcisedutyEDcess").val('');
|
|
$("#EditExcisedutySHcess").val('');
|
|
$("#EditAfterExcisedutySHcess").val('');
|
|
$("#EditCustomEDcess").val('');
|
|
$("#EditAfterCustomEDcess").val('');
|
|
$("#EditCustomSHcess").val('');
|
|
$("#EditAfterCustomSHcess").val('');
|
|
$("#EditAdditionalExciseduty").val('');
|
|
$("#EditAfterAdditionalExciseduty").val('');
|
|
$("#EditGrossdutypayable").val('');
|
|
$("#EditAvailableModvat").val('');
|
|
$("#EditGrossexpenses").val('');
|
|
$("#Editpurchaserate").val('');
|
|
$("#EditCustomDutyExpenses").val('');
|
|
$("#EditRMCIncludingCustomers").val('');
|
|
$("#EditPurQuantity").val('');
|
|
$("#EdittxtTotalOrderValue").val('');
|
|
|
|
RequistQuantity = '';
|
|
|
|
}
|
|
|
|
function Save()
|
|
{
|
|
//alert('save function');
|
|
|
|
stat = '<?php echo PO_CREATED; ?>';
|
|
|
|
tinyMCE.triggerSave();
|
|
var splinstr = $('#txtSpcialInstruction').val();
|
|
//alert(splinstr);
|
|
var deladd = $('#DeliveryAddr').val();
|
|
|
|
var ExchangeRateOn = $('#Exchangerateon').val();
|
|
var PaymentMethod = $('#PaymentMethod').val();
|
|
var PayableAT = $('#PayableAT').val();
|
|
var Before = $('#Before').val();
|
|
var After = $('#After').val();
|
|
$('#SpcialInstruction').val(splinstr);
|
|
$('#txtDeliveryAddress').val(deladd);
|
|
$('#txtStatus').val(stat);
|
|
|
|
|
|
if(validate())
|
|
{
|
|
|
|
|
|
if(document.getElementById('serviceTax').rows.length < 2)
|
|
{
|
|
alert('Please Select Line item to Create PO');
|
|
$('#Deliverydt').focus();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
|
|
//alert('else');
|
|
|
|
$('#content').loader('show');
|
|
//salert('ss');
|
|
//alert('before Ajax');
|
|
$.ajax({
|
|
|
|
data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&PaymentDate="+PaymentDate,
|
|
type:"POST",
|
|
url:"<?php echo base_url() ?>amendmentpurchaseorder/EditAmendCapitalPurchaseOrder",
|
|
|
|
success:function(data) {
|
|
if(data)
|
|
{
|
|
alert(data);
|
|
$('#content').loader('hide');
|
|
|
|
$('#txtRowCount').val('');
|
|
$('#txtDeletedRow').val('');
|
|
$('#SpcialInstruction').val('');
|
|
$('#txtDeliveryAddress').val('');
|
|
|
|
clearAfterAddLineItemAdd();
|
|
window.location ="amendmentpurchaseorder";
|
|
|
|
}
|
|
else
|
|
{
|
|
$('#content').loader('hide');
|
|
alert("Error");
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
This function is used to validate all field and caluclate all field while edit capital po
|
|
|
|
*/
|
|
function EditRatechange(){
|
|
|
|
|
|
if($('#EditReqnumber').val() == "0")
|
|
{
|
|
alert('Please select the Requisition Number');
|
|
$('#EditReqnumber').focus();
|
|
return false;
|
|
}
|
|
else if($('#EditMaterialCode').val() == "0")
|
|
{
|
|
alert('Please select the Material Code');
|
|
$('#EditMaterialCode').focus();
|
|
return false;
|
|
}
|
|
else if($('#EditCostCenter').val() == "0")
|
|
{
|
|
alert('Please select the CostCenterCode');
|
|
$('#EditCostCenter').focus();
|
|
return false;
|
|
}
|
|
// EditExceedQuantityCheck();
|
|
|
|
// if(EditExceedQuantityCheck()){
|
|
|
|
|
|
if($('#EditCPQuantity').val() != '' && $('#EditCPRate').val() != '')
|
|
{
|
|
|
|
var txtQuantity = parseFloat( $('#EditCPQuantity').val());
|
|
//var txtExchangeRate = parseFloat( $('#EditExchangeRtModal').val());
|
|
var RatePerTon = parseFloat( $('#EditCPRate').val());
|
|
//var txtUnitPrice = parseFloat($('#Rate').val());
|
|
|
|
//var txtExchangeRate='';
|
|
if(capitalType=='International'){
|
|
alert('international');
|
|
txtExchangeRate = parseFloat( $('#EditExchangeRtModal').val());
|
|
var Tot = txtQuantity * RatePerTon;
|
|
}
|
|
|
|
else{
|
|
alert('Dometic');
|
|
var Tot = txtQuantity * RatePerTon;
|
|
txtExchangeRate = 1;
|
|
}
|
|
|
|
|
|
var BasicInINR=Tot * txtExchangeRate;
|
|
|
|
$('#EditCPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
|
$('#EditAfterBasicPriceTax').val(Math.round(BasicInINR));
|
|
|
|
//ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val());
|
|
|
|
if(ExceedBudget($('#EditCPTotalAmount').val(),$('#EditCapitalbudAmt').val())){
|
|
//Service Tax calculation
|
|
|
|
|
|
$('#EditAfterCgst').val(calculateServiceCGST($('#EditCPTotalAmount').val(),$('#EditCgst').val()));
|
|
|
|
$('#EditAfterSgst').val( calculateServiceSGST($('#EditCPTotalAmount').val(),$('#EditSgst').val()));
|
|
|
|
|
|
|
|
$('#EditAfterIgst').val(calculateServiceIGST($('#EditCPTotalAmount').val(),$('#EditIgst').val()));
|
|
|
|
var tempEditservicetotalordervaue=(parseFloat($('#EditCPTotalAmount').val())+parseFloat($('#EditAfterCgst').val())+parseFloat($('#EditAfterSgst').val())+parseFloat($('#EditAfterIgst').val())+parseFloat($('#EditOtherAllowances').val()));
|
|
$('#Editservicetotalordervaue').val(parseFloat(tempEditservicetotalordervaue).toFixed(2));
|
|
|
|
|
|
|
|
|
|
|
|
// $('#EditAfterBasicPriceTax').val(Math.round($('#EditCPTotalAmount').val()));
|
|
|
|
if($('#EditLandingCharge').val()!='' && $('#EditAfterBasicPriceTax').val()!=''){
|
|
$('#EditAfterLandingCharge').val(calculateLandingCharge($('#EditLandingCharge').val(),$('#EditAfterBasicPriceTax').val()));
|
|
|
|
|
|
if($('#EditHighseas').val()!='' && $('#EditAfterLandingCharge').val()!=''){
|
|
$('#EditAfterHighseas').val(calculateHighseasCharge($('#EditAfterLandingCharge').val(),$('#EditAfterBasicPriceTax').val(),$('#EditHighseas').val()));
|
|
|
|
if($('#EditCustomduty').val()!='' && $('#EditAfterHighseas').val()!=''){
|
|
$('#EditAfterCustomduty').val(calculateCustomdutyCharge($('#EditAfterLandingCharge').val(),$('#EditAfterBasicPriceTax').val(),$('#EditAfterHighseas').val(),$('#EditCustomduty').val()));
|
|
if($('#EditAfterCustomduty').val()!='' && $('#EditExcisedutyTax').val()!=''){
|
|
$('#EditAfterExcisedutyTax').val(calculateExciseCharge($('#EditAfterLandingCharge').val(),$('#EditAfterBasicPriceTax').val(),$('#EditAfterHighseas').val(),$('#EditAfterCustomduty').val(),$('#EditExcisedutyTax').val()));
|
|
|
|
if($('#EditAfterExcisedutyTax').val()!='' && $('#EditExcisedutyEDcess').val()!=''){
|
|
$('#EditAfterExcisedutyEDcess').val(calculateExciseEDcessCharge($('#EditAfterExcisedutyTax').val(),$('#EditExcisedutyEDcess').val()));
|
|
|
|
if($('#EditAfterExcisedutyTax').val()!='' && $('#EditExcisedutySHcess').val()!=''){
|
|
$('#EditAfterExcisedutySHcess').val(calculateExciseSHcessCharge($('#EditAfterExcisedutyTax').val(),$('#EditExcisedutySHcess').val()));
|
|
if($('#EditAfterExcisedutySHcess').val()!='' && $('#EditCustomEDcess').val()!=''){
|
|
$('#EditAfterCustomEDcess').val(calculateCustomEDcessCharge($('#EditAfterLandingCharge').val(),$('#EditAfterHighseas').val(),$('#EditAfterCustomduty').val(),$('#EditAfterExcisedutyTax').val(),$('#EditAfterExcisedutyEDcess').val(),$('#EditAfterExcisedutySHcess').val(),$('#EditCustomEDcess').val()));
|
|
|
|
}
|
|
if($('#EditAfterExcisedutySHcess').val()!='' && $('#EditCustomSHcess').val()!=''){
|
|
$('#EditAfterCustomSHcess').val(calculateCustomSHcessCharge($('#EditAfterLandingCharge').val(),$('#EditAfterHighseas').val(),$('#EditAfterCustomduty').val(),$('#EditAfterExcisedutyTax').val(),$('#EditAfterExcisedutyEDcess').val(),$('#EditAfterExcisedutySHcess').val(),$('#EditCustomSHcess').val()));
|
|
|
|
if($('#EditAfterCustomSHcess').val()!='' && $('#EditAdditionalExciseduty').val()!=''){
|
|
$('#EditAfterAdditionalExciseduty').val(calculateAdditionalExciseDutyCharge($('#EditAfterBasicPriceTax').val(),$('#EditAfterLandingCharge').val(),$('#EditAfterHighseas').val(),$('#EditAfterCustomduty').val(),$('#EditAfterExcisedutyTax').val(),$('#EditAfterExcisedutyEDcess').val(),$('#EditAfterExcisedutySHcess').val(),$('#EditAfterCustomEDcess').val(),$('#EditAfterCustomSHcess').val(),$('#EditAdditionalExciseduty').val()));
|
|
|
|
|
|
$('#EditGrossdutypayable').val(calculateGrossdutypayableCharge($('#EditAfterLandingCharge').val(),$('#EditAfterHighseas').val(),$('#EditAfterCustomduty').val(),$('#EditAfterExcisedutyTax').val(),$('#EditAfterExcisedutyEDcess').val(),$('#EditAfterExcisedutySHcess').val(),$('#EditAfterCustomEDcess').val(),$('#EditAfterCustomSHcess').val(),$('#EditAfterAdditionalExciseduty').val()));
|
|
|
|
$('#EditAvailableModvat').val(calculateAvailableModvatCharge($('#EditAfterExcisedutyTax').val(),$('#EditAfterExcisedutyEDcess').val(),$('#EditAfterExcisedutySHcess').val(),$('#EditAfterAdditionalExciseduty').val()));
|
|
$('#EditGrossexpenses').val(calculateGrossexpensesCharge($('#EditGrossdutypayable').val(),$('#EditAvailableModvat').val()));
|
|
if($('#EditPurQuantity').val()!=''){
|
|
$('#Editpurchaserate').val(calculatepurchaserate($('#EditAfterBasicPriceTax').val(),$('#EditPurQuantity').val()));
|
|
$('#EditCustomDutyExpenses').val(calculateCustomDutyExpenses($('#EditGrossexpenses').val(),$('#EditPurQuantity').val()));
|
|
$('#EditRMCIncludingCustomers').val(calculateRMCIncludingCustomers($('#Editpurchaserate').val(),$('#EditCustomDutyExpenses').val()));
|
|
var Rmc = $('#EditRMCIncludingCustomers').val();
|
|
var Quanty =$('#EditCPQuantity').val();
|
|
var BasicAmt = $('#EditCPTotalAmount').val();
|
|
var perKg = parseFloat(BasicAmt).toFixed(2);
|
|
|
|
|
|
$('#EdittxtTotalOrderValue').val(perKg);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
else{
|
|
//alert('Please Enter Excise duty S & H cess');
|
|
}
|
|
}
|
|
else{
|
|
//alert('Please Enter Excise Duty ED_cess');
|
|
|
|
}
|
|
}
|
|
else{
|
|
//alert('Please Enter Excise Duty');
|
|
}
|
|
}
|
|
else{
|
|
//alert('Please Enter Custom Duty');
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
else{
|
|
//alert('Please Enter Landing Charge ')
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
calculateTotalValue();
|
|
|
|
// var res = ExceedBudget($('#TotalOrderValue').val(), $('#CapitalbudAmt').val());
|
|
//if(!res)
|
|
// {
|
|
// $('#CPRate').focus();
|
|
// return false;
|
|
// }
|
|
}
|
|
}
|
|
|
|
|
|
else{
|
|
$('CPRate').focus();
|
|
}
|
|
|
|
// }
|
|
// else{
|
|
// clearTaxField();
|
|
// }
|
|
|
|
}
|
|
/* This function used to check quantity exceeding or not while Editing*/
|
|
|
|
// function EditExceedQuantityCheck()
|
|
// {
|
|
// var EnterQuantity = $("#EditCPQuantity").val()== '' ? "0.00" : parseFloat($("#EditCPQuantity").val());
|
|
// var ReqQuantity = parseFloat(RequistQuantity);
|
|
|
|
// //alert(ReqQuantity);
|
|
// if(EnterQuantity > ReqQuantity)
|
|
// {
|
|
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
|
|
|
// $('#EditCPQuantity').focus();
|
|
// return false;
|
|
// }
|
|
// else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
/**
|
|
* This function is used for Edit Capital
|
|
*/
|
|
$('.EditCapital').click(function(){
|
|
|
|
|
|
if( validateEditCapitalTax() && validateEditExceedLimit())
|
|
{
|
|
//alert('EDIT');
|
|
|
|
var tr= document.getElementById(userid);
|
|
var cellval = tr.cells;
|
|
|
|
var Reqnumber = $('#EditReqnumber').val();
|
|
var departmentName = $('#EditCapitalDepartmentName').val();
|
|
var AvilBudget = $('#EditCapitalbudAmt').val();
|
|
var costCode = $('#EditCostCenter').val();
|
|
var servicedescription=$('#Edittxtservicedescription').val();
|
|
var materialCode =$('#EditMaterialCode').val();
|
|
var materialName = $("#EditCapitalItemName").val();
|
|
var uom = $("#EditCPUOM").val();
|
|
var exchangeRate = $("#EditExchangeRtModal").val();
|
|
var quantity = $("#EditCPQuantity").val();
|
|
var convertRate = $("#EditCPRate").val();
|
|
var itemRate = convertRate;
|
|
var basicval = $("#EditCPTotalAmount").val();
|
|
var CGST=$("#EditCgst").val();
|
|
var SGST=$("#EditSgst").val();
|
|
var IGST=$("#EditIgst").val();
|
|
|
|
var AfterCGST = $("#EditAfterCgst").val();
|
|
var AfterSGST = $("#EditAfterSgst").val();
|
|
var AfterIGST = $("#EditAfterIgst").val();
|
|
var otherallowance = $("#EditOtherAllowances").val();
|
|
|
|
var totalservicevalue = $("#Editservicetotalordervaue").val();
|
|
var Total = (parseFloat(AfterCGST)+parseFloat(AfterSGST)+parseFloat(AfterIGST)+parseFloat(otherallowance));
|
|
//alert(totalservicevalue+"-"+Total);
|
|
var TotalTaxValue = EditcalculateTaxValue();
|
|
|
|
var landingCharge = $('#EditAfterLandingCharge').val();
|
|
var HighSeasSalesCharge = $('#EditAfterHighseas').val();
|
|
var CustomDuty = $('#EditAfterCustomduty').val();
|
|
var ExciseDuty = $('#EditAfterExcisedutyTax').val();
|
|
var ExciseDutyEDCess = $('#EditAfterExcisedutyEDcess').val();
|
|
var ExciseDutySHCess = $('#EditAfterExcisedutySHcess').val();
|
|
var CustomEDCess = $('#EditAfterCustomEDcess').val();
|
|
var CustomSHCess = $('#EditAfterCustomSHcess').val();
|
|
var AdditionalExciseDuty = $('#EditAfterAdditionalExciseduty').val();
|
|
var GrossDutyPayable = $('#EditGrossdutypayable').val();
|
|
var AvailableModvat = $('#EditAvailableModvat').val();
|
|
var GrossExpensesDuetoCustom = $('#EditGrossexpenses').val();
|
|
var PurQuantity = $('#EditPurQuantity').val();
|
|
var purchaseRate = $('#Editpurchaserate').val();
|
|
var CustomDutyExpenses = $('#EditCustomDutyExpenses').val();
|
|
var RMCIncludingCustomers = $('#EditRMCIncludingCustomers').val();
|
|
var TotalOrderValuePerkg = $("#EdittxtTotalOrderValue").val();
|
|
|
|
/*get % values */
|
|
var beforeLanding = $('#EditLandingCharge').val();
|
|
var beforeHighSeasSalesCharge = $('#EditHighseas').val();
|
|
var beforeCustomDuty = $('#EditCustomduty').val();
|
|
var beforeExciseDuty = $('#EditExcisedutyTax').val();
|
|
var beforeExciseDutyEDCess = $('#EditExcisedutyEDcess').val();
|
|
var beforeExciseDutySHCess = $('#EditExcisedutySHcess').val();
|
|
var beforeCustomEDCess = $('#EditCustomEDcess').val();
|
|
var beforeCustomSHCess = $('#EditCustomSHcess').val();
|
|
var beforeAdditionalExciseDuty =$('#EditAdditionalExciseduty').val();
|
|
var PurQuantity = $('#EditPurQuantity').val();
|
|
var basicvalInINR=$('#EditAfterBasicPriceTax').val();
|
|
|
|
|
|
|
|
|
|
|
|
$('#Reqnumber'+userid).val(Reqnumber);
|
|
$('#departmentName'+userid).val(departmentName);
|
|
$('#CPCostCode'+userid).val(costCode);
|
|
$('#AvilBudget'+userid).val(AvilBudget);
|
|
$('#echangeRate'+userid).val(exchangeRate);
|
|
$('#materialCode'+userid).val(materialCode);
|
|
$('#materialName'+userid).val(materialName);
|
|
$('#uom'+userid).val(uom);
|
|
$('#quantity'+userid).val(quantity);
|
|
$('#rateInUs'+userid).val(convertRate);
|
|
|
|
$('#basicval'+userid).val(basicval);
|
|
|
|
RequistQuantity = $('#quantity'+userid).val();
|
|
$('#SGST'+userid).val(SGST);
|
|
$('#CGST'+userid).val(CGST);
|
|
$('#IGST'+userid).val(IGST);
|
|
|
|
$('#afterSGST'+userid).val(AfterSGST);
|
|
$('#afterCGST'+userid).val(AfterCGST);
|
|
$('#afterIGST'+userid).val(AfterIGST);
|
|
|
|
$('#otherallowance'+userid).val(otherallowance);
|
|
$('#totalservicevalue'+userid).val(totalservicevalue);
|
|
$('#ServiceMaterialDescription'+userid).val(servicedescription);
|
|
|
|
$('#landingCharge'+userid).val(landingCharge);
|
|
$('#HighSeasSalesCharge'+userid).val(HighSeasSalesCharge);
|
|
$('#CustomDuty'+userid).val(CustomDuty);
|
|
$('#ExciseDuty'+userid).val(ExciseDuty);
|
|
$('#ExciseDutyEDCess'+userid).val(ExciseDutyEDCess);
|
|
$('#ExciseDutySHCess'+userid).val(ExciseDutySHCess);
|
|
$('#CustomEDCess'+userid).val(CustomEDCess);
|
|
$('#CustomSHCess'+userid).val(CustomSHCess);
|
|
$('#AdditionalExciseDuty'+userid).val(AdditionalExciseDuty);
|
|
$('#GrossDutyPayable'+userid).val(GrossDutyPayable);
|
|
$('#AvailableModvat'+userid).val(AvailableModvat);
|
|
$('#GrossExpensesDuetoCustom'+userid).val(GrossExpensesDuetoCustom);
|
|
$('#purchaseRate'+userid).val(purchaseRate);
|
|
$('#CustomDutyExpenses'+userid).val(CustomDutyExpenses);
|
|
$('#RMCIncludingCustomers'+userid).val(RMCIncludingCustomers);
|
|
$('#basicvalInINR'+userid).val(basicvalInINR);
|
|
|
|
|
|
|
|
/* get % value */
|
|
|
|
$('#beforeLanding'+userid).val(beforeLanding);
|
|
$('#beforeHighSeasSalesCharge'+userid).val(beforeHighSeasSalesCharge);
|
|
$('#beforeCustomDuty'+userid).val(beforeCustomDuty);
|
|
$('#beforeExciseDuty'+userid).val(beforeExciseDuty);
|
|
$('#beforeExciseDutyEDCess'+userid).val(beforeExciseDutyEDCess);
|
|
$('#beforeExciseDutySHCess'+userid).val(beforeExciseDutySHCess);
|
|
$('#beforeCustomEDCess'+userid).val(beforeCustomEDCess);
|
|
$('#beforeCustomSHCess'+userid).val(beforeCustomSHCess);
|
|
$('#beforeAdditionalExciseDuty'+userid).val(beforeAdditionalExciseDuty);
|
|
$('#PurQuantity'+userid).val(PurQuantity);
|
|
$('#PerKgExpense'+userid).val(TotalOrderValuePerkg);
|
|
|
|
cellval[2].innerHTML = materialName;
|
|
//alert(materialName);
|
|
cellval[3].innerHTML = quantity;
|
|
//alert(quantity);
|
|
cellval[4].innerHTML =uom;
|
|
//alert(uom);
|
|
cellval[5].innerHTML =itemRate;
|
|
//alert(itemRate);
|
|
cellval[6].innerHTML =basicval;
|
|
//alert(basicval);
|
|
cellval[7].innerHTML =TotalTaxValue;
|
|
//alert(TotalTaxValue);
|
|
cellval[8].innerHTML =basicval;
|
|
//alert(basicval);
|
|
|
|
|
|
|
|
populateValueMainFormForEditCapitalTax();
|
|
|
|
}
|
|
|
|
});
|
|
function validateEditCapitalTax()
|
|
{
|
|
|
|
if($('#EditReqnumber').val() == "0")
|
|
{
|
|
alert('Please select the Requisition Number');
|
|
$('#EditReqnumber').focus();
|
|
return false;
|
|
}
|
|
else if($('#EditCostCenter').val() == "0")
|
|
{
|
|
alert('Please select the Cost center');
|
|
$('#EditCostCenter').focus();
|
|
return false;
|
|
}
|
|
else if($('#EditMaterialCode').val() == "0")
|
|
{
|
|
alert('Please select the Material Code');
|
|
$('#EditMaterialCode').focus();
|
|
return false;
|
|
}
|
|
else if($('#EditCPQuantity').val() == '')
|
|
{
|
|
alert('Please Enter the Quantity value');
|
|
$('#EditCPQuantity').focus();
|
|
return false;
|
|
}
|
|
else if($('#EditCPRate').val() == '')
|
|
{
|
|
alert('Please Enter the Rate of the Item');
|
|
$('#EditCPRate').focus();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
/* calculate tax value*/
|
|
function EditcalculateTaxValue(){
|
|
var CGSTTaxAmount = $('#EditAfterCgst').val() == '' ? '0.00' : $('#EditAfterCgst').val();
|
|
var SGSTTaxAmount = $('#EditAfterSgst').val() == '' ? '0.00' : $('#EditAfterSgst').val();
|
|
var IGSTTaxAmount = $('#EditAfterIgst').val() == '' ? '0.00' : $('#EditAfterIgst').val();
|
|
var otherallowanceAmount = $('#EditOtherAllowances').val() == '' ? '0.00' : $('#EditOtherAllowances').val();
|
|
|
|
var landingCharge = $('#EditAfterLandingCharge').val() == '' ? '0.00' : $('#EditAfterLandingCharge').val();
|
|
var HighSeasSalesCharge = $('#EditAfterHighseas').val() == '' ? '0.00' : $('#EditAfterHighseas').val();
|
|
var CustomDuty = $('#EditAfterCustomduty').val() == '' ? '0.00' : $('#EditAfterCustomduty').val();
|
|
var ExciseDuty = $('#EditAfterExcisedutyTax').val() == '' ? '0.00' : $('#EditAfterExcisedutyTax').val();
|
|
var ExciseDutyEDCess = $('#EditAfterExcisedutyEDcess').val() == '' ? '0.00' : $('#EditAfterExcisedutyEDcess').val();
|
|
var ExciseDutySHCess = $('#EditAfterExcisedutySHcess').val() == '' ? '0.00' : $('#EditAfterExcisedutySHcess').val();
|
|
var CustomEDCess = $('#EditAfterCustomEDcess').val() == '' ? '0.00' : $('#EditAfterCustomEDcess').val();
|
|
var CustomSHCess = $('#EditAfterCustomSHcess').val() == '' ? '0.00' : $('#EditAfterCustomSHcess').val();
|
|
var AdditionalExciseDuty = $('#EditAfterAdditionalExciseduty').val() == '' ? '0.00' : $('#EditAfterAdditionalExciseduty').val();
|
|
var GrossDutyPayable = $('#EditGrossdutypayable').val() == '' ? '0.00' : $('#EditGrossdutypayable').val();
|
|
var AvailableModvat = $('#EditAvailableModvat').val() == '' ? '0.00' : $('#EditAvailableModvat').val();
|
|
var GrossExpensesDuetoCustom = $('#EditGrossexpenses').val() == '' ? '0.00' : $('#EditGrossexpenses').val();
|
|
var purchaseRate = $('#Editpurchaserate').val() == '' ? '0.00' : $('#Editpurchaserate').val();
|
|
var CustomDutyExpenses = $('#EditCustomDutyExpenses').val() == '' ? '0.00' : $('#EditCustomDutyExpenses').val();
|
|
var RMCIncludingCustomers = $('#EditRMCIncludingCustomers').val() == '' ? '0.00' : $('#EditRMCIncludingCustomers').val();
|
|
var totTaxvalue = (parseFloat(CGSTTaxAmount)+ parseFloat(SGSTTaxAmount)+ parseFloat(IGSTTaxAmount) + parseFloat(otherallowanceAmount));
|
|
//+parseFloat(landingCharge)+parseFloat(HighSeasSalesCharge)+parseFloat(CustomDuty)+parseFloat(ExciseDuty)+parseFloat(ExciseDutyEDCess)+parseFloat(ExciseDutySHCess)+parseFloat(CustomEDCess)+parseFloat(CustomSHCess)+parseFloat(AdditionalExciseDuty)+parseFloat(GrossDutyPayable)+parseFloat(AvailableModvat)+parseFloat(GrossExpensesDuetoCustom)+parseFloat(purchaseRate)+parseFloat(CustomDutyExpenses)+parseFloat(RMCIncludingCustomers)
|
|
|
|
var totTax = parseFloat(totTaxvalue).toFixed(2);
|
|
// alert("TAx from EditcalculateTaxValue function "+totTax );
|
|
return totTax;
|
|
}
|
|
/* used to validateExceedLimit for edit*/
|
|
function validateEditExceedLimit()
|
|
{
|
|
|
|
|
|
var avalbudAmt = parseFloat($('#EditCapitalbudAmt').val());
|
|
var basicAmountRate = parseFloat($('#EditCPTotalAmount').val());
|
|
var totalAmount = parseFloat($('#EdittxtTotalOrderValue').val());
|
|
|
|
if(basicAmountRate > avalbudAmt)
|
|
{
|
|
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
|
$('#EditCPRate').focus();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* This function is used to calculate the total amounts after Edit row
|
|
*/
|
|
function populateValueMainFormForEditCapitalTax()
|
|
{
|
|
|
|
var rows = document.getElementById('serviceTax').rows.length;
|
|
var TotalOrderValueSummary = 0;
|
|
|
|
var TotalCGSTTax = 0;
|
|
var TotalSGSTTax = 0;
|
|
var TotalIGSTTax = 0;
|
|
|
|
var Totalotherallowance = 0;
|
|
|
|
|
|
var TotLanding = 0;
|
|
var TotHighseas = 0;
|
|
var TotCustom = 0;
|
|
var TotExcise = 0;
|
|
var TotExciseED = 0;
|
|
var TotExciseSH = 0;
|
|
var TotCustomED = 0;
|
|
var TotCustomSH = 0;
|
|
var TotAdditionalExciseduty = 0;
|
|
var TotGrossduty = 0;
|
|
var TotAvlmodvat = 0;
|
|
|
|
var TotGrossexpense = 0;
|
|
|
|
var CapitalToatlOrder=0;
|
|
|
|
for (var i = 1; i < rows; i++) {
|
|
|
|
var TotalOrderValueSummaryI = $('#totalservicevalue'+i).val() == '' ? '0.00' : $('#totalservicevalue'+i).val();
|
|
|
|
var TotalCGSTTaxI = $('#afterCGST'+i).val() == '' ? '0.00' : $('#afterCGST'+i).val();
|
|
var TotalSGSTTaxI = $('#afterSGST'+i).val() == '' ? '0.00' : $('#afterSGST'+i).val();
|
|
var TotalIGSTTaxI = $('#afterIGST'+i).val() == '' ? '0.00' : $('#afterIGST'+i).val();
|
|
|
|
var TotalotherallowanceI = $('#otherallowance'+i).val() == '' ? '0.00' : $('#otherallowance'+i).val();
|
|
|
|
|
|
var TotLandingI = $('#landingCharge'+i).val() == '' ? '0.00' : $('#landingCharge'+i).val();
|
|
var TotHighseasI = $('#HighSeasSalesCharge'+i).val() == '' ? '0.00' : $('#HighSeasSalesCharge'+i).val();
|
|
var TotCustomI = $('#CustomDuty'+i).val() == '' ? '0.00' : $('#CustomDuty'+i).val();
|
|
var TotExciseI = $('#ExciseDuty'+i).val() == '' ? '0.00' : $('#ExciseDuty'+i).val();
|
|
var TotExciseEDI = $('#ExciseDutyEDCess'+i).val() == '' ? '0.00' : $('#ExciseDutyEDCess'+i).val();
|
|
var TotExciseSHI = $('#ExciseDutySHCess'+i).val() == '' ? '0.00' : $('#ExciseDutySHCess'+i).val();
|
|
var TotCustomEDI = $('#CustomEDCess'+i).val() == '' ? '0.00' : $('#CustomEDCess'+i).val();
|
|
var TotCustomSHI = $('#CustomSHCess'+i).val() == '' ? '0.00' : $('#CustomSHCess'+i).val();
|
|
var TotAdditionalExcisedutyI = $('#AdditionalExciseDuty'+i).val() == '' ? '0.00' : $('#AdditionalExciseDuty'+i).val();
|
|
var TotGrossdutyI = $('#GrossDutyPayable'+i).val() == '' ? '0.00' : $('#GrossDutyPayable'+i).val();
|
|
var TotAvlmodvatI = $('#AvailableModvat'+i).val() == '' ? '0.00' : $('#AvailableModvat'+i).val();
|
|
|
|
var TotGrossexpenseI = $('#GrossExpensesDuetoCustom'+i).val() == '' ? '0.00' : $('#GrossExpensesDuetoCustom'+i).val();
|
|
var CapitalToatlOrderI = $('#basicval'+i).val() == '' ? '0.00' : $('#basicval'+i).val();
|
|
|
|
TotalCGSTTax = parseFloat(TotalCGSTTax) + parseFloat(TotalCGSTTaxI);
|
|
TotalSGSTTax = parseFloat(TotalSGSTTax) + parseFloat(TotalSGSTTaxI);
|
|
TotalIGSTTax = parseFloat(TotalIGSTTax) + parseFloat(TotalIGSTTaxI);
|
|
|
|
Totalotherallowance = parseFloat(Totalotherallowance) + parseFloat(TotalotherallowanceI);
|
|
|
|
|
|
TotLanding = parseFloat(TotLanding) + parseFloat(TotLandingI);
|
|
TotHighseas = parseFloat(TotHighseas) + parseFloat(TotHighseasI);
|
|
TotCustom = parseFloat(TotCustom) + parseFloat(TotCustomI);
|
|
TotExcise = parseFloat(TotExcise) + parseFloat(TotExciseI);
|
|
TotExciseED = parseFloat(TotExciseED) + parseFloat(TotExciseEDI);
|
|
TotExciseSH = parseFloat(TotExciseSH) + parseFloat(TotExciseSHI);
|
|
TotCustomED = parseFloat(TotCustomED) + parseFloat(TotCustomEDI);
|
|
TotCustomSH = parseFloat(TotCustomSH) + parseFloat(TotCustomSHI);
|
|
TotAdditionalExciseduty = parseFloat(TotAdditionalExciseduty) + parseFloat(TotAdditionalExcisedutyI);
|
|
TotGrossduty = parseFloat(TotGrossduty) + parseFloat(TotGrossdutyI);
|
|
TotAvlmodvat = parseFloat(TotAvlmodvat) + parseFloat(TotAvlmodvatI);
|
|
|
|
TotGrossexpense = parseFloat(TotGrossexpense) + parseFloat(TotGrossexpenseI);
|
|
TotalOrderValueSummary = parseFloat(TotalOrderValueSummary) + parseFloat(TotalOrderValueSummaryI);
|
|
CapitalToatlOrder = parseFloat(CapitalToatlOrder) + parseFloat(CapitalToatlOrderI);
|
|
|
|
}
|
|
|
|
$('#txtTotCgst').val((parseFloat(TotalCGSTTax)).toFixed(2) );
|
|
$('#txtTotSgst').val((parseFloat(TotalSGSTTax)).toFixed(2) );
|
|
$('#txtTotIgst').val((parseFloat(TotalIGSTTax)).toFixed(2) );
|
|
$('#TotalOtherAllowances').val((parseFloat(Totalotherallowance) ).toFixed(2) );
|
|
|
|
|
|
$('#txttotallanding').val((parseFloat(TotLanding) ).toFixed(2) );
|
|
$('#txttotalhighseas').val((parseFloat(TotHighseas) ).toFixed(2) );
|
|
$('#txttotalcustom').val((parseFloat(TotCustom)).toFixed(2) );
|
|
$('#txttotalexcise').val((parseFloat(TotExcise)).toFixed(2) );
|
|
$('#txttotalexciseED').val((parseFloat(TotExciseED)).toFixed(2) );
|
|
$('#txttotalexciseSH').val((parseFloat(TotExciseSH)).toFixed(2) );
|
|
$('#txttotalcustomED').val((parseFloat(TotCustomED)).toFixed(2) );
|
|
$('#txttotalcustomSH').val((parseFloat(TotCustomSH)).toFixed(2) );
|
|
$('#txttotalAdditionalExciseduty').val((parseFloat(TotAdditionalExciseduty)).toFixed(2) );
|
|
$('#txttotalgrossduty').val((parseFloat(TotGrossduty)).toFixed(2) );
|
|
$('#txttotalavlmodvat').val((parseFloat(TotAvlmodvat)).toFixed(2) );
|
|
$('#txttotalgrossexpense').val((parseFloat(TotGrossexpense)).toFixed(2) );
|
|
$('#CapitalToatlOrder').val((parseFloat(CapitalToatlOrder)).toFixed(2) );
|
|
|
|
$('#Totalservicesummary').val((parseFloat(TotalOrderValueSummary)).toFixed(2) );
|
|
|
|
}
|
|
var DisplayCurrencySymbol='';
|
|
var ViewCurrencySymbol='';
|
|
var currency = <?php echo json_encode($Currency, JSON_PRETTY_PRINT) ?>;
|
|
$.each(currency, function(idx, obj) {
|
|
if(obj.Currency_Code === $("#currencytype").val())
|
|
{
|
|
$("#CurrencySymbol").val(obj.FontCode2000);
|
|
DisplayCurrencySymbol=obj.FontCode2000;
|
|
ViewCurrencySymbol=obj.FontCode2000;
|
|
|
|
var DisplayUOM=$('#uom').val();
|
|
$('#CurrencySymbol').html('Exchange Rate In' + " "+obj.FontCode2000);
|
|
$('#RateIn').html('Rate(in' + " "+obj.FontCode2000 + '/'+DisplayUOM+')');
|
|
$('#EditRateIn').html('Rate(in' + " "+obj.FontCode2000 + '/'+DisplayUOM+')');
|
|
$('#TotalAmount').html('Basic Value in' + " "+DisplayCurrencySymbol);
|
|
$('#EditTotalAmount').html('Basic Value in' + " "+DisplayCurrencySymbol);
|
|
//$('#ViewTotalAmount').html('Basic Value in' + " "+ViewCurrencySymbol);
|
|
// $('#ViewRateIn').html('Rate(in' + " "+ViewCurrencySymbol + '/'+DisplayUOM+')');
|
|
|
|
}
|
|
|
|
|
|
});
|
|
$('#currencytype').change(function(){
|
|
var SelectCurrency = $('#currencytype').val();
|
|
|
|
|
|
$.each(currency, function(idx, obj) {
|
|
if(obj.Currency_Code === SelectCurrency)
|
|
{
|
|
$("#CurrencySymbol").val(obj.FontCode2000);
|
|
DisplayCurrencySymbol=obj.FontCode2000;
|
|
$('#CurrencySymbol').html('Exchange Rate In' + " "+obj.FontCode2000);
|
|
$('#RateIn').html('Rate(in' + " "+obj.FontCode2000 + '/Ton)');
|
|
$('#EditRateIn').html('Rate(in' + " "+obj.FontCode2000 + '/Ton)');
|
|
$('#TotalAmount').html('Basic Value in' + " "+DisplayCurrencySymbol);
|
|
$('#EditTotalAmount').html('Basic Value in' + " "+DisplayCurrencySymbol);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
});
|
|
|
|
var PaymentDate='<?php echo $PaymentDays; ?>';
|
|
$('#Before').change(function(){
|
|
PaymentDate=$('#Before').val();
|
|
});
|
|
$('#After').change(function(){
|
|
PaymentDate=$('#After').val();
|
|
|
|
});
|
|
|
|
</script>
|