4974 lines
265 KiB
PHP
Executable File
4974 lines
265 KiB
PHP
Executable File
<?php
|
|
$AvlAmount = 0;
|
|
$ReqType ='';
|
|
$Value='';
|
|
$EXCRATE=0;
|
|
$parentPO= '';
|
|
$ServiceDescription='';
|
|
//$Value="$";
|
|
//echo $ExchangeRate;
|
|
//echo $Currency;
|
|
//echo $unicode;
|
|
$Value=$unicode;
|
|
//echo $Value;
|
|
$Currencycode=$currencycode;
|
|
//echo $Currencycode;
|
|
|
|
$DeliverySchedule='';
|
|
|
|
foreach ($CurrencyDetail as $Detail)
|
|
{
|
|
$Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency;
|
|
}
|
|
//echo $Cur;
|
|
|
|
|
|
foreach ($PaymentTerms as $TER)
|
|
{
|
|
$Terms=$TER->PaymentTerms;
|
|
}
|
|
//echo $Terms;
|
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
|
$CurrentDate = $dt->format('Y-m-d');
|
|
|
|
$MaxPoDate = '';
|
|
if(!empty($MaxPODate))
|
|
{
|
|
foreach ($MaxPODate as $date)
|
|
{
|
|
$MaxPoDate = $date->PODate;
|
|
}
|
|
}
|
|
|
|
if(!empty($AvlBudAmt))
|
|
{
|
|
|
|
$AvlAmount = $AvlBudAmt;
|
|
|
|
}
|
|
//echo $AvlBudAmt;;
|
|
|
|
$CompanyAddress = '';
|
|
if(!empty($CompanyDetails))
|
|
{
|
|
foreach ($CompanyDetails as $Req)
|
|
{
|
|
$CompanyAddress = $Req->Address;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$INR='';
|
|
$INRSYM='';
|
|
if(!empty($INRSYMBOL))
|
|
{
|
|
foreach ($INRSYMBOL as $INR)
|
|
{
|
|
$INRSYM=$INR->Currency_Code;
|
|
$INR=$INR->FontCode2000;
|
|
}
|
|
}
|
|
//echo $INR;
|
|
//echo "$CompanyAddress";
|
|
//$Exchangerate=$ExchangeRate;
|
|
|
|
|
|
$index = 0;
|
|
$SupId = '';
|
|
$SupName = '';
|
|
$Address = '';
|
|
$PODate = '';
|
|
$Deliverydt ='';
|
|
$DeliveryAddress ='';
|
|
$PONOStatus='';
|
|
$PONO = '';
|
|
$ServiceDescription = '';
|
|
$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;
|
|
$Cur='';
|
|
$Currency_Type='';
|
|
$PayableAT='';
|
|
//$ExchangeRate
|
|
$ExchangeRateCalculatedon='';
|
|
$StatusName='';
|
|
$Import_DispatchDetails='';
|
|
$Import_PlaceofOrgin='';
|
|
$DeliveryOption='';
|
|
|
|
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');
|
|
|
|
$Ddt = new DateTime($Req->DeliveryDate);
|
|
$Deliverydt = $Ddt->format('Y-m-d');
|
|
|
|
$DeliveryAddress =$Req->DeliveryAddress;
|
|
$PONOStatus = $Req->StatusCode;
|
|
$PONO = $Req->PONO;
|
|
$ServiceDescription = $Req->ServiceDescription;
|
|
$ExchangeRate=number_format(($Req->ExchangeRate),2);
|
|
//echo "$ExchangeRate";
|
|
$ExchangeRateCalculatedon=$Req->ExchangeRateCalculatedon;
|
|
$PaymentTerms=$Req->PaymentTerms;
|
|
$PayableAT=$Req->PayableAT;
|
|
$PaymentDays=$Req->PaymentDays;
|
|
$StatusName=$Req->StatusName;
|
|
$Currency_Type=$Req->CurrencyType;
|
|
$parentPO =$Req->ParentPO;
|
|
$DeliverySchedule=$Req->DeliverySchedule;
|
|
$Import_DispatchDetails=$Req->Import_DispatchDetails;
|
|
$Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
|
|
$PaymentTerms=$Req->PaymentTerms;
|
|
$DeliveryOption=$Req->DeliveryOption;
|
|
$ServiceDescription=$Req->ServiceDescription;
|
|
}
|
|
}
|
|
//echo $DeliveryOption;
|
|
//echo $PaymentTerms;
|
|
|
|
|
|
if(!empty($RequistionDetails))
|
|
{
|
|
|
|
foreach ($RequistionDetails as $ReqDet)
|
|
{
|
|
// $Reqon=$ReqDet->ReqDate;
|
|
$Reqonn=new DateTime($ReqDet->ReqDate);
|
|
$Reqon=$Reqonn->format('Y-m-d');
|
|
$Requestedby=$ReqDet->Requestedby;
|
|
$RequesterName=$ReqDet->FirstName;
|
|
//$Status=$ReqDet->Status;
|
|
}
|
|
}
|
|
|
|
?>
|
|
|
|
<style>
|
|
.modal
|
|
{
|
|
padding-right:25% ! important;
|
|
}
|
|
.dataTables_paginate
|
|
{
|
|
margin-top: -5%;
|
|
}
|
|
.dataTables_wrapper {
|
|
padding-bottom: 0px;
|
|
}
|
|
|
|
|
|
.content {
|
|
Padding:0% ! important;
|
|
}
|
|
body {
|
|
background-color: #ecf0f5;
|
|
}
|
|
.pagination {
|
|
margin :0px ! important;
|
|
}
|
|
.box-body {
|
|
padding:0px ! important;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript">
|
|
|
|
</script>
|
|
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
tinymce.init({
|
|
selector: "textarea#txtSpcialInstruction",
|
|
menubar: false,
|
|
statusbar: false,
|
|
toolbar: false
|
|
});
|
|
//Initialize Select2 Elements
|
|
//$("#drpSupplier").select2();
|
|
var POMaxDate = '<?php echo $MaxPoDate;?>';
|
|
var d = new Date(POMaxDate);
|
|
|
|
var t='<?php echo $CurrentDate;?>';
|
|
var m=new Date(t);
|
|
|
|
$("#PODate").datepicker({
|
|
minDate : d,
|
|
maxDate : 'now',
|
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
|
});
|
|
|
|
// $("#PayableAT").datepicker({
|
|
// minDate : m,
|
|
// //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'
|
|
// });
|
|
|
|
$("#Requeston").datepicker({
|
|
//minDate : d,
|
|
maxDate : 'now',
|
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
|
});
|
|
|
|
$("#Exchangerateon").datepicker({
|
|
minDate : m,
|
|
//maxDate : 'now',
|
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<div class="content-wrapper">
|
|
|
|
<section class="content">
|
|
<div id="content"></div>
|
|
<?php
|
|
$attributes = array('class' => 'form-label-left ImportPO ','name' => 'ImportPO','id' => 'ImportPO');
|
|
|
|
echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
|
|
|
|
|
|
<!-- <section class="content"> -->
|
|
|
|
<div style="border:2px solid #333">
|
|
<div class="col-md-12">
|
|
<div class="col-md-11">
|
|
<?php if ($parentPO == '') { ?>
|
|
<center><b><h2>Siddharth Industries - Edit Import Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
|
<?php } else {?>
|
|
<center><b><h2>Siddharth Industries - Amended Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
|
<?php } ?>
|
|
</div>
|
|
<!--<div class="col-md-1"><br/>
|
|
<a class="btn btn-info" href="<?php echo base_url(); ?>purchaseorder/CreateimportPOPrint" 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 ;
|
|
// print_r($SID->ReqNo);
|
|
// $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqBy;
|
|
//$ReqType = $SID->ReqType;
|
|
endforeach;
|
|
}
|
|
//echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"');
|
|
echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
|
|
|
|
?>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-md-12">
|
|
<label>Currency Type</label>
|
|
|
|
<?php
|
|
|
|
|
|
if(!empty($Currency))
|
|
{
|
|
|
|
foreach ($Currency as $Cur):
|
|
if($Currency_Type==$Cur->Currency_Code){
|
|
$options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency;
|
|
|
|
}
|
|
|
|
endforeach;
|
|
|
|
|
|
foreach ($Currency as $Cur):
|
|
if($Currency_Type!=$Cur->Currency_Code){
|
|
$options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency;
|
|
|
|
}
|
|
|
|
endforeach;
|
|
}
|
|
|
|
echo form_dropdown('currencytype', $options1,set_value('currencytype',$Currency_Type),'id="currencytype"','class="form-control select2"' , 'required="true"');
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<!-- <div class="col-md-12">
|
|
Basic Price in US $ per Ton :
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'BasicUSPrice','value' => set_value('BasicUSPrice'),'id'=>'BasicUSPrice', 'class' => 'form-control' ,'placeholder '=>'basic price','onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div> -->
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-md-9">
|
|
<div class="col-md-4">
|
|
<div class="col-md-12">
|
|
<label>Supplier</label>
|
|
|
|
<?php
|
|
$options = array("0"=>'Select Supplier');
|
|
//print_r( $options);
|
|
if(!empty($Suplist))
|
|
{
|
|
foreach ($Suplist as $SID):
|
|
|
|
|
|
$options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
|
|
|
|
endforeach;
|
|
}
|
|
|
|
//echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
|
|
|
|
echo form_dropdown('drpSupplier', $options,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',IMPORT),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div> -->
|
|
<div class="col-md-12" style="padding: 0px;">
|
|
<div class="col-md-6">
|
|
<label>PO Type</label>
|
|
<div class="form-group">
|
|
|
|
<?php
|
|
$data = array('name' => 'POType','value' => set_value('POType',IMPORT),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label>PO Date</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</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 class="col-md-12">
|
|
Basic value in INR :
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'INRBasicvalues','value' => set_value('INRBasicvalues'),'id'=>'INRBasicvalues', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($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('Dispatch instruction', 'Dispatch instruction') ." ". form_radio(array("name"=>"DateRange", "id"=>"Date", "value"=>"0", 'checked'=>'checked')); ?> </td>
|
|
<td>
|
|
<?php echo form_label('Schedule', 'Schedule') ." ". form_radio(array("name"=>"DateRange", "id"=>"Schedule", "value"=>"1")); ?>
|
|
|
|
</td>
|
|
</tr>
|
|
</div>
|
|
|
|
<div class="col-md-12" id="Schedulediv" style="display:none;"><br/>
|
|
<label >Schedule </label>
|
|
|
|
<?php
|
|
$data = array('name' => 'Scheduleby','value' => set_value('Scheduleby',$DeliverySchedule),'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>
|
|
|
|
<?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-12">
|
|
<div class="col-md-3">
|
|
<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">
|
|
<label>Exchange Rate On</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Exchangerateon','value' => set_value('Exchangerateon',$CurrentDate),'id'=>'Exchangerateon', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<!-- <label>Exchange Rate </label> -->
|
|
|
|
<p id=label1><b><?php echo "Exchange Rate in $Currencycode ($Value)"?></p>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ExchangeRate','value' => set_value('ExchangeRate',$ExchangeRate),'id'=>'ExchangeRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()');
|
|
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>
|
|
<div class="col-md-12">
|
|
|
|
<legend>Payment Details</legend>
|
|
<!-- Text input-->
|
|
<div class="col-md-3">
|
|
|
|
<span for="payablefrom">Payable Terms</span>
|
|
<!-- <select class="form-control required" id="PaymentTerms" name="PaymentTerms">
|
|
<option value="" > --><!-- <?php echo $Terms;?> --></option>
|
|
<!-- <option value=<?php echo $Deatail?> > Payment method</option> -->
|
|
<?php
|
|
|
|
|
|
foreach ($Payment as $Pay):
|
|
if($PaymentTerms==$Pay->PaymentTerms){
|
|
$options2[$Pay->PaymentTerms] = $Pay->PaymentTerms;
|
|
|
|
}
|
|
|
|
endforeach;
|
|
|
|
if(!empty($Payment))
|
|
{
|
|
foreach ($Payment as $Pay1):
|
|
if($PaymentTerms!=$Pay1->PaymentTerms){
|
|
$options2[$Pay1->PaymentTerms] = $Pay1->PaymentTerms;
|
|
|
|
}
|
|
|
|
endforeach;
|
|
}
|
|
|
|
// echo form_dropdown('currencytype', $options1,set_value('currencytype',$Currency_Type),'id="currencytype"','class="form-control select2"' , 'required="true"');
|
|
echo form_dropdown('PaymentTerms', $options2,set_value('PaymentTerms',$PaymentTerms),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2');
|
|
|
|
|
|
?>
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<!--<div class="col-md-3">
|
|
<span for="PayableAT">Payable AT</span>
|
|
<input type="text" class="form-control required" id="PayableAT" name="PayableAT">
|
|
</div>
|
|
|
|
<div class="col-md-3"><span>Payment Date</span><br/>
|
|
<label class="radio-inline"><input type="radio" name="Payment" value="Before">Before</label>
|
|
<label class="radio-inline"><input type="radio" name="Payment" value="After">After</label>
|
|
</div> -->
|
|
<!-- <div class="col-md-3">
|
|
<span>Payable AT</span>
|
|
|
|
<?php
|
|
$data = array('name' => 'PayableAT','value' => set_value('PayableAT',$PayableAT),'id'=>'PayableAT', 'class' => 'form-control' ,'required' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
|
|
</div> -->
|
|
|
|
<!-- <div class="col-md-6">
|
|
Payment Date <br/>
|
|
<tr>
|
|
<td>
|
|
<?php echo form_label('Before', 'Before') ." ". form_radio(array("name"=>"Payment", "id"=>"Before", "value"=>"0", 'checked'=>set_radio('Payment', '0', TRUE))); ?> </td>
|
|
<td>
|
|
<?php echo form_label('After', 'After') ." ". form_radio(array("name"=>"Payment", "id"=>"After", "value"=>"1", 'checked'=>set_radio('Payment', '1', FALSE))); ?>
|
|
|
|
</td>
|
|
</tr>
|
|
</div> -->
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="">
|
|
<table class="table table-bordered" style="border:1px solid #333">
|
|
<div align="right" style="padding-right:10px">
|
|
<div align="right">
|
|
<?php
|
|
|
|
if($PONOStatus == PO_RELEASED)
|
|
{?>
|
|
<!-- <a data-toggle="modal" data-target="#importpomodel" class="btn btn-primary" data-dismiss="modal" onclick="myFunction();" >Add Line Item </a> -->
|
|
<?php
|
|
} else {?>
|
|
<a data-toggle="modal" data-target="#importpomodel" class="btn btn-primary" data-dismiss="modal" onclick="myFunction();" >Add Line Item </a><?php
|
|
}?>
|
|
|
|
|
|
<!--<a data-toggle="modal"><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a>-->
|
|
|
|
|
|
<!-- <div class="modal fade" id="importpomodel" role="dialog">-->
|
|
|
|
<div id="importpomodel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<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>Add Import Purchase Order Item </h4></center>
|
|
</div>
|
|
<div align="left">
|
|
|
|
<div class="col-md-12">
|
|
<div class="col-md-3">
|
|
<label>Req No</label>
|
|
<div>
|
|
<?php
|
|
$options = array("0"=>'Req No');
|
|
//echo form_dropdown('ImportMaterialCode', $options,set_value('ImportMaterialCode'),'id="ImportMaterialCode"' ,'class="form-control required"');
|
|
$RL = array("0"=>'Select Req No');
|
|
if(!empty($RequistionDetails))
|
|
{
|
|
foreach ($RequistionDetails as $SID):
|
|
$RL[$SID->ReqNo] = $SID->ReqNo.' '.' - '.' '.$SID->DepartmentName;
|
|
endforeach;
|
|
}
|
|
|
|
echo form_dropdown('ReqNo', $RL,set_value('ReqNo'),'id="ReqNo"' ,'class="form-control"');
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<label>Department Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
//$data = array('name' => 'ImportDepartmentName','value' => set_value('ImportDepartmentName'),'id'=>'ImportDepartmentName', 'class' => 'form-control' ,'readonly' => 'true');
|
|
$data = array('name' => 'deptName','value' => set_value('deptName'),'id'=>'deptName', 'class' => 'form-control','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>Cost Center Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
//$options = array("0"=>'Select Cost Center');
|
|
|
|
//echo form_dropdown('CostCenter', $options,set_value('CostCenter'),'id="CostCenter"' ,'class="form-control"');
|
|
|
|
$data = array('name' => 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>Available Budget Amount (<?php echo $INR?>)</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AvlBudAmt','value' => set_value('AvlBudAmt'),'id'=>'AvlBudAmt', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-2">
|
|
<label>Item Code</label>
|
|
|
|
<!--In this item code the value should come from DB , so it getting error , so i am disabling this div , once get the data from DB uncommand this div-->
|
|
<div>
|
|
<?php
|
|
// $options = array("0"=>'Item Code');
|
|
|
|
//if(!empty($MaterialList))
|
|
//{
|
|
// foreach ($MaterialList as $SID):
|
|
|
|
|
|
// $options[$SID->MaterialCode] = $SID->MaterialCode.' '.' - '.' '.$SID->MaterialName;
|
|
|
|
//endforeach;
|
|
//}
|
|
|
|
//echo form_dropdown('ImportMaterialCode', $options,set_value('ImportMaterialCode'),'id="ImportMaterialCode"' ,'class="form-control"');
|
|
|
|
$options = array("0"=>'Item Code');
|
|
//print_r( $options);
|
|
|
|
|
|
|
|
echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control"');
|
|
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
|
<label>Item Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ItemName','value' => set_value('ItemName'),'id'=>'ItemName', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label>UOM</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'UOM','value' => set_value('UOM'),'id'=>'UOM', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label>Quantity</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange()');
|
|
echo form_input($data);
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<!-- <label>Rate </label>
|
|
-->
|
|
|
|
<!-- <P id=labelRate> --> <label id=labelRate><?php echo "Rate in $Currencycode ($Value)";?> </label><!-- </P> -->
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Rate','value' => set_value('Rate'),'id'=>'Rate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'Ratechange()' );
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<!-- <label>Basic Amount </label>-->
|
|
<!-- <p id=labelBasicvalue><label><?php echo "Basic Value In $Currencycode ($Value)";?></label></p>
|
|
-->
|
|
|
|
<!-- <p id=label2> --> <label id=label2><?php echo "Basic Value In $Currencycode";?></label><!-- </p> -->
|
|
<div class="form-group">
|
|
<?php
|
|
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
|
|
|
|
$data = array('name' => 'txtBasicValue','value' => set_value('txtBasicValue'),'id'=>'txtBasicValue', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-3">
|
|
|
|
<!-- Basic Price in US $ per Ton : -->
|
|
<!-- <p id=labelBasicpriceus><b><?php echo "Basic Value in $Currencycode ($Value)"?></p> -->
|
|
<label id=labelBasicpriceus><?php echo "Basic Value in $Currencycode ($Value)"?></label>
|
|
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'imBasicPrice','value' => set_value('imBasicPrice'),'id'=>'imBasicPrice', 'class' => 'form-control' ,'placeholder '=>'basic price','onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<!-- Exchange Rate : -->
|
|
|
|
<!-- <p id=label1><b><?php echo "Exchange Rate"?></p> -->
|
|
<label id=label1>Exchange Rate</label>
|
|
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ExchangeRt','value' => set_value('ExchangeRt'),'id'=>'ExchangeRt', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<!-- Basic value in INR : -->
|
|
<label id=labelBasicINR><?php echo "Basic value in INR";?> </label>
|
|
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'INRBasicvalue','value' => set_value('INRBasicvalue'),'id'=>'INRBasicvalue', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<!--<div class="col-md-3">
|
|
<a href="http://www.xe.com/" target="_blank"><u>Click nere to check Today's Foreign Exchange value</u></a>
|
|
</div>-->
|
|
|
|
<div class="col-md-12" style="border:1px solid #000;padding:0px;">
|
|
<br/>
|
|
<div class="col-md-6" style="padding:0px;">
|
|
<div class="col-md-12">
|
|
<div class="col-md-4" >
|
|
<!-- Basic Price: -->
|
|
<label><?php echo "Basic Price In ($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group" style="display:none;">
|
|
<?php
|
|
$data = array('name' => 'BasicPriceTax','value' => set_value('BasicPriceTax'),'id'=>'BasicPriceTax', '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' => 'AfterBasicPriceTax','value' => set_value('AfterBasicPriceTax'),'id'=>'AfterBasicPriceTax', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
<!-- Landing charge -->
|
|
<label><?php echo "Landing Charge ($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'LandingCharge','value' => set_value('LandingCharge'),'id'=>'LandingCharge', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Calculateloadingcharge()');
|
|
echo form_input($data);
|
|
|
|
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterLandingCharge','value' => set_value('AfterLandingCharge'),'id'=>'AfterLandingCharge', '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 -->
|
|
<label><?php echo "High seas sales charge ($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Highseas ','value' => set_value('Highseas'),'id'=>'Highseas', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateHighseassalescharge()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterHighseas','value' => set_value('AfterHighseas'),'id'=>'AfterHighseas', '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) -->
|
|
<label><?php echo "Custom duty : (a)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Customduty','value' => set_value('Customduty'),'id'=>'Customduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateCustomduty()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterCustomduty','value' => set_value('AfterCustomduty'),'id'=>'AfterCustomduty', '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) -->
|
|
<label><?php echo "Excise duty : (b)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ExcisedutyTax','value' => set_value('ExcisedutyTax'),'id'=>'ExcisedutyTax', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateExciseDuty()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterExcisedutyTax','value' => set_value('AfterExcisedutyTax'),'id'=>'AfterExcisedutyTax', '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) -->
|
|
<label><?php echo "Excise duty ED_cess : (C)($INR)"?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ExcisedutyEDcess','value' => set_value('ExcisedutyEDcess'),'id'=>'ExcisedutyEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateExciseED1()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterExcisedutyEDcess','value' => set_value('AfterExcisedutyEDcess'),'id'=>'AfterExcisedutyEDcess', '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) -->
|
|
|
|
<label><?php echo "Excise duty S & H cess :(d)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ExcisedutySHcess','value' => set_value('ExcisedutySHcess'),'id'=>'ExcisedutySHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateexciseSHcess()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterExcisedutySHcess','value' => set_value('AfterExcisedutySHcess'),'id'=>'AfterExcisedutySHcess', '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) -->
|
|
<label><?php echo "Custom ED_cess : (e)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'CustomEDcess','value' => set_value('CustomEDcess'),'id'=>'CustomEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateCustomEdcess()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterCustomEDcess','value' => set_value('AfterCustomEDcess'),'id'=>'AfterCustomEDcess', '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) -->
|
|
<label><?php echo "Custom S & H cess : (f)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'CustomSHcess','value' => set_value('CustomSHcess'),'id'=>'CustomSHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateCustomSHcess()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterCustomSHcess','value' => set_value('AfterCustomSHcess'),'id'=>'AfterCustomSHcess', '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) -->
|
|
<label><?php echo "Additional Excise duty : (g)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AdditionalExciseduty ','value' => set_value('AdditionalExciseduty'),'id'=>'AdditionalExciseduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateaddlExciseDuty(),CalculateAvlModvat(),CalculateGrossExpense()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AfterAdditionalExciseduty','value' => set_value('AfterAdditionalExciseduty'),'id'=>'AfterAdditionalExciseduty', '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 -->
|
|
<label><?php echo "Gross duty payable($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Grossdutypayable ','value' => set_value('Grossdutypayable'),'id'=>'Grossdutypayable', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateAvlModvat()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-8">
|
|
<!-- Available Modvat set-off on import : -->
|
|
<label><?php echo "Available Modvat set-off on import :($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AvailableModvat','value' => set_value('AvailableModvat'),'id'=>'AvailableModvat', '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: -->
|
|
<label><?php echo "Gross expenses due to custom duty:($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Grossexpenses','value' => set_value('Grossexpenses'),'id'=>'Grossexpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-12">
|
|
<center> <label>Cost of the product Per UOM</label></center>
|
|
<hr/>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
<label>purchase rate [Basic]/UOM</label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'purchaserate','value' => set_value('purchaserate'),'id'=>'purchaserate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','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' => 'PurQuantity','value' => set_value('PurQuantity'),'id'=>'PurQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'CalculateCtable()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-4">
|
|
<!-- Custom Duty Expenses -->
|
|
<label><?php echo "Custom Duty Expenses($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'CustomDutyExpenses ','value' => set_value('CustomDutyExpenses'),'id'=>'CustomDutyExpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
<!-- RMC Including Customers -->
|
|
<label><?php echo "RMC Including Customers($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'RMCIncludingCustomers','value' => set_value('RMCIncludingCustomers'),'id'=>'RMCIncludingCustomers', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4" style="display:none;">
|
|
<!-- Total Amount: -->
|
|
<label id=labelTotalAmount>Total Amount</label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group" style="display:none;">
|
|
<?php
|
|
$data = array('name' => 'TotalExp','value' => set_value('TotalExp'),'id'=>'TotalExp', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a class="btn btn-info font AddImport" ID="AddImport" ><i class="fa fa-plus"></i> <span class="bold">Add Import</span></a>
|
|
<!--<a class="btn btn-primary font AddService" ID="AddService" ><i class="fa fa-plus"></i> <span class="bold">Add Service</span></a>-->
|
|
|
|
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!--Edit modal body-->
|
|
|
|
<div id="editimportpomodel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<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 Import Purchase Order Item </h4></center>
|
|
</div>
|
|
<div align="left">
|
|
|
|
<div class="col-md-12">
|
|
<div class="col-md-3">
|
|
<label>Req No</label>
|
|
<div>
|
|
<?php
|
|
|
|
$data = array('name' => 'EditReqNo','value' => set_value('EditReqNo'),'id'=>'EditReqNo', 'class' => 'form-control','readonly'=>'true');
|
|
echo form_input($data);?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<label>Department Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditdeptName','value' => set_value('EditdeptName'),'id'=>'EditdeptName', 'class' => 'form-control','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>Cost Center Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$options = array("0"=>'Select Cost Center');
|
|
|
|
//echo form_dropdown('EditCostCenter', $options,set_value('EditCostCenter'),'id="EditCostCenter"' ,'class="form-control"');
|
|
|
|
$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-3">
|
|
<label>Available Budget Amount (<?php echo $INR?>)</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditAvlBudAmt','value' => set_value('EditAvlBudAmt'),'id'=>'EditAvlBudAmt', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-2">
|
|
<label>Item Code</label>
|
|
|
|
<!--In this item code the value should come from DB , so it getting error , so i am disabling this div , once get the data from DB uncommand this div-->
|
|
<div>
|
|
<?php
|
|
// $options = array("0"=>'Item Code');
|
|
|
|
//if(!empty($MaterialList))
|
|
//{
|
|
// foreach ($MaterialList as $SID):
|
|
|
|
|
|
// $options[$SID->MaterialCode] = $SID->MaterialCode.' '.' - '.' '.$SID->MaterialName;
|
|
|
|
//endforeach;
|
|
//}
|
|
|
|
//echo form_dropdown('ImportMaterialCode', $options,set_value('ImportMaterialCode'),'id="ImportMaterialCode"' ,'class="form-control"');
|
|
|
|
$options = array("0"=>'Item Code');
|
|
//print_r( $options);
|
|
|
|
|
|
|
|
echo form_dropdown('EditMaterialCode', $options,set_value('EditMaterialCode'),'id="EditMaterialCode"' ,'class="form-control"');
|
|
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
|
<label>Item Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditItemName','value' => set_value('EditItemName'),'id'=>'EditItemName', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label>UOM</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditUOM','value' => set_value('EditUOM'),'id'=>'EditUOM', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label>Quantity</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditQuantity','value' => set_value('EditQuantity'),'id'=>'EditQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange(),ExceedEditQuantityCheck()');
|
|
echo form_input($data);
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<!-- <label>Rate </label> -->
|
|
|
|
<!-- <P id=labelEditRate> --> <label id=labelEditRate><?php echo "Rate in $Currencycode ($Value)";?>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditRate','value' => set_value('EditRate'),'id'=>'EditRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange(),validateEditExceedLimit()' );
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<!-- <label><?php echo "Basic Value In";?></label>-->
|
|
<!-- <p id=label3> --><label id=label3><?php echo "Basic Value In $Currencycode ($Value)";?></label><!-- </p> -->
|
|
<div class="form-group">
|
|
<?php
|
|
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
|
|
|
|
$data = array('name' => 'EdittxtBasicValue','value' => set_value('EdittxtBasicValue'),'id'=>'EdittxtBasicValue', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-3">
|
|
|
|
<!-- Basic Price in US $ per Ton : -->
|
|
|
|
<!-- <p id=labelEditBasicPriceUs><b><?php echo "Basic Value in $Currencycode ($Value)"?></p> -->
|
|
<label id=labelEditBasicPriceUs><?php echo "Basic Value in $Currencycode ($Value)"?> </label>
|
|
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditimBasicPrice','value' => set_value('EditimBasicPrice'),'id'=>'EditimBasicPrice', 'class' => 'form-control' ,'placeholder '=>'basic price','onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
|
|
<label>Exchange Rate :</label>
|
|
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditExchangeRt','value' => set_value('EditExchangeRt'),'id'=>'EditExchangeRt', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<!-- Basic value in INR : -->
|
|
|
|
<!-- <p id=labelEditBasicINR> --><label id=labelEditBasicINR><?php echo "Basic value in INR :";?></label><!-- </p> -->
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'EditINRBasicvalue','value' => set_value('EditINRBasicvalue'),'id'=>'EditINRBasicvalue', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<!--<div class="col-md-3">
|
|
<a href="http://www.xe.com/" target="_blank"><u>Click nere to check Today's Foreign Exchange value</u></a>
|
|
</div>-->
|
|
|
|
<div class="col-md-12" style="border:1px solid #000;padding:0px;">
|
|
<br/>
|
|
<div class="col-md-6" style="padding:0px;">
|
|
<div class="col-md-12">
|
|
<div class="col-md-4" >
|
|
<!-- Basic Price: -->
|
|
<label><?php echo "Basic Price In ($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group" style="display:none;">
|
|
<?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 -->
|
|
<label><?php echo "Landing Charge ($INR)";?></label>
|
|
</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'=>'EditCalculateloadingcharge()');
|
|
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 -->
|
|
<label><?php echo "High seas sales charge ($INR)";?></label>
|
|
</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'=>'EditCalculateHighseassalescharge()');
|
|
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) -->
|
|
<label><?php echo "Custom duty : (a)($INR)";?></label>
|
|
</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'=>'EditCalculateCustomduty()');
|
|
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) -->
|
|
|
|
<label><?php echo "Excise duty : (b)($INR)";?></label>
|
|
</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'=>'EditCalculateExciseDuty()');
|
|
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) -->
|
|
<label><?php echo "Excise duty ED_cess : (C)($INR)"?></label>
|
|
</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'=>'EditCalculateExciseED1()');
|
|
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) -->
|
|
|
|
<label><?php echo "Excise duty S & H cess :(d)($INR)";?></label>
|
|
</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'=>'EditCalculateexciseSHcess()');
|
|
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) -->
|
|
<label><?php echo "Custom ED_cess : (e)";?></label>
|
|
</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'=>'EditCalculateCustomEdcess()');
|
|
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) -->
|
|
<label><?php echo "Custom S & H cess : (f)($INR)";?></label>
|
|
</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'=>'EditCalculateCustomSHcess()');
|
|
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) -->
|
|
|
|
|
|
<label><?php echo "Additional Excise duty : (g)($INR)";?></label>
|
|
</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'=>'EditCalculateaddlExciseDuty(),EditCalculateAvlModvat(),EditCalculateGrossExpense()');
|
|
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 -->
|
|
|
|
<label><?php echo "Gross duty payable($INR)";?></label>
|
|
</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);');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-8">
|
|
<!-- Available Modvat set-off on import : -->
|
|
<label><?php echo "Available Modvat set-off on import :($INR)";?></label>
|
|
</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: -->
|
|
<label><?php echo "Gross expenses due to custom duty:($INR)";?></label>
|
|
</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);');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-12">
|
|
<center> <label>Cost of the product Per UOM</label></center>
|
|
<hr/>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
<label>purchase rate [Basic]/UOM</label>
|
|
</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);','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'=>'EditCalculateCtable()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-4">
|
|
<!-- Custom Duty Expenses -->
|
|
<label><?php echo "Custom Duty Expenses($INR)";?></label>
|
|
</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);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
<!-- RMC Including Customers -->
|
|
<label><?php echo "RMC Including Customers($INR)" ?></label>
|
|
</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);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4" style="display:none;">
|
|
<!-- Total Amount: -->
|
|
<label id=labelEditTotalAmount>Total Amount</label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group" style="display:none;">
|
|
<?php
|
|
$data = array('name' => 'EditTotalExp','value' => set_value('EditTotalExp'),'id'=>'EditTotalExp', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a class="btn btn-info font EditImport" ID="EditImport" ><i class="fa fa-plus" ></i> <span class="bold">Edit Import</span></a>
|
|
<!--<a class="btn btn-primary font AddService" ID="AddService" ><i class="fa fa-plus"></i> <span class="bold">Add Service</span></a>-->
|
|
|
|
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- view model body -->
|
|
<div id="viewimportmodal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<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>View Import Purchase Order Item </h4></center>
|
|
</div>
|
|
<div align="left">
|
|
|
|
<div class="col-md-12">
|
|
<div class="col-md-3">
|
|
<label>Req No</label>
|
|
<div>
|
|
<?php
|
|
|
|
$data = array('name' => 'ViewReqNo','value' => set_value('ViewReqNo'),'id'=>'ViewReqNo', 'class' => 'form-control','readonly'=>'true');
|
|
echo form_input($data);?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<label>Department Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewdeptName','value' => set_value('ViewdeptName'),'id'=>'ViewdeptName', 'class' => 'form-control','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>Cost Center Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$options = array("0"=>'Select Cost Center');
|
|
|
|
//echo form_dropdown('EditCostCenter', $options,set_value('EditCostCenter'),'id="EditCostCenter"' ,'class="form-control"');
|
|
|
|
$data = array('name' => 'ViewCostCenter','value' => set_value('ViewCostCenter'),'id'=>'ViewCostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label>Available Budget Amount</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAvlBudAmt','value' => set_value('ViewAvlBudAmt'),'id'=>'ViewAvlBudAmt', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-2">
|
|
<label>Item Code</label>
|
|
|
|
<!--In this item code the value should come from DB , so it getting error , so i am disabling this div , once get the data from DB uncommand this div-->
|
|
<div>
|
|
<?php
|
|
// $options = array("0"=>'Item Code');
|
|
|
|
//if(!empty($MaterialList))
|
|
//{
|
|
// foreach ($MaterialList as $SID):
|
|
|
|
|
|
// $options[$SID->MaterialCode] = $SID->MaterialCode.' '.' - '.' '.$SID->MaterialName;
|
|
|
|
//endforeach;
|
|
//}
|
|
|
|
//echo form_dropdown('ImportMaterialCode', $options,set_value('ImportMaterialCode'),'id="ImportMaterialCode"' ,'class="form-control"');
|
|
|
|
$options = array("0"=>'Item Code');
|
|
//print_r( $options);
|
|
|
|
|
|
|
|
echo form_dropdown('ViewMaterialCode', $options,set_value('ViewMaterialCode'),'id="ViewMaterialCode"' ,'class="form-control"');
|
|
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
|
<label>Item Name</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewItemName','value' => set_value('ViewItemName'),'id'=>'ViewItemName', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label>UOM</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewUOM','value' => set_value('ViewUOM'),'id'=>'ViewUOM', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label>Quantity</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewQuantity','value' => set_value('ViewQuantity'),'id'=>'ViewQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange(),ExceedEditQuantityCheck()');
|
|
echo form_input($data);
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<!-- <label>Rate </label> -->
|
|
|
|
<!-- <P id=labelEditRate> --> <label id=labelEditRate><?php echo "Rate in $Currencycode ($Value)";?>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewRate','value' => set_value('ViewRate'),'id'=>'ViewRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange()' );
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<!-- <label><?php echo "Basic Value In";?></label>-->
|
|
<!-- <p id=label3> --><label id=label3><?php echo "Basic Value In $Currencycode ($Value)";?></label><!-- </p> -->
|
|
<div class="form-group">
|
|
<?php
|
|
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
|
|
|
|
$data = array('name' => 'ViewtxtBasicValue','value' => set_value('ViewtxtBasicValue'),'id'=>'ViewtxtBasicValue', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-3">
|
|
|
|
<!-- Basic Price in US $ per Ton : -->
|
|
|
|
<p id=labelEditBasicPriceUs><b><?php echo "Basic Price in $Currencycode ($Value)"?></p>
|
|
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewimBasicPrice','value' => set_value('ViewimBasicPrice'),'id'=>'ViewimBasicPrice', 'class' => 'form-control' ,'placeholder '=>'basic price','onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
Exchange Rate :
|
|
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewExchangeRt','value' => set_value('ViewExchangeRt',$ExchangeRate),'id'=>'ViewExchangeRt', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<!-- Basic value in INR : -->
|
|
|
|
<p id=labelEditBasicINR><label><?php echo "Basic value in INR :";?></label></p>
|
|
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewINRBasicvalue','value' => set_value('ViewINRBasicvalue'),'id'=>'ViewINRBasicvalue', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<!--<div class="col-md-3">
|
|
<a href="http://www.xe.com/" target="_blank"><u>Click nere to check Today's Foreign Exchange value</u></a>
|
|
</div>-->
|
|
|
|
<div class="col-md-12" style="border:1px solid #000;padding:0px;">
|
|
<br/>
|
|
<div class="col-md-6" style="padding:0px;">
|
|
<div class="col-md-12">
|
|
<div class="col-md-4" >
|
|
Basic Price:
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewBasicPriceTax','value' => set_value('ViewBasicPriceTax'),'id'=>'ViewBasicPriceTax', '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' => 'ViewAfterBasicPriceTax','value' => set_value('ViewAfterBasicPriceTax'),'id'=>'ViewAfterBasicPriceTax', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
<!-- Landing charge -->
|
|
<label><?php echo "Landing Charge ($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewLandingCharge','value' => set_value('ViewLandingCharge'),'id'=>'ViewLandingCharge', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateloadingcharge()');
|
|
echo form_input($data);
|
|
|
|
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterLandingCharge','value' => set_value('ViewAfterLandingCharge'),'id'=>'ViewAfterLandingCharge', '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 -->
|
|
<label><?php echo "High seas sales charge ($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewHighseas ','value' => set_value('ViewHighseas'),'id'=>'ViewHighseas', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateHighseassalescharge()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterHighseas','value' => set_value('ViewAfterHighseas'),'id'=>'ViewAfterHighseas', '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) -->
|
|
<label><?php echo "Custom duty : (a)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewCustomduty','value' => set_value('ViewCustomduty'),'id'=>'ViewCustomduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateCustomduty()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterCustomduty','value' => set_value('ViewAfterCustomduty'),'id'=>'ViewAfterCustomduty', '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) -->
|
|
<label><?php echo "Excise duty : (b)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewExcisedutyTax','value' => set_value('ViewExcisedutyTax'),'id'=>'ViewExcisedutyTax', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateExciseDuty()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterExcisedutyTax','value' => set_value('ViewAfterExcisedutyTax'),'id'=>'ViewAfterExcisedutyTax', '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) -->
|
|
<label><?php echo "Excise duty ED_cess : (C)($INR)"?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewExcisedutyEDcess','value' => set_value('ViewExcisedutyEDcess'),'id'=>'ViewExcisedutyEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateExciseED1()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterExcisedutyEDcess','value' => set_value('ViewAfterExcisedutyEDcess'),'id'=>'ViewAfterExcisedutyEDcess', '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) -->
|
|
|
|
<label><?php echo "Excise duty S & H cess :(d)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewExcisedutySHcess','value' => set_value('ViewExcisedutySHcess'),'id'=>'ViewExcisedutySHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateexciseSHcess()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterExcisedutySHcess','value' => set_value('ViewAfterExcisedutySHcess'),'id'=>'ViewAfterExcisedutySHcess', '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) -->
|
|
<label><?php echo "Custom ED_cess : (e)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewCustomEDcess','value' => set_value('ViewCustomEDcess'),'id'=>'ViewCustomEDcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateCustomEdcess()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterCustomEDcess','value' => set_value('ViewAfterCustomEDcess'),'id'=>'ViewAfterCustomEDcess', '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) -->
|
|
<label><?php echo "Custom S & H cess : (f)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewCustomSHcess','value' => set_value('ViewCustomSHcess'),'id'=>'ViewCustomSHcess', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateCustomSHcess()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterCustomSHcess','value' => set_value('ViewAfterCustomSHcess'),'id'=>'ViewAfterCustomSHcess', '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) -->
|
|
<label><?php echo "Additional Excise duty : (g)($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAdditionalExciseduty ','value' => set_value('ViewAdditionalExciseduty'),'id'=>'ViewAdditionalExciseduty', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateaddlExciseDuty(),EditCalculateAvlModvat(),EditCalculateGrossExpense()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAfterAdditionalExciseduty','value' => set_value('ViewAfterAdditionalExciseduty'),'id'=>'ViewAfterAdditionalExciseduty', '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 -->
|
|
<label><?php echo "Gross duty payable($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewGrossdutypayable ','value' => set_value('ViewGrossdutypayable'),'id'=>'ViewGrossdutypayable', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-8">
|
|
<!-- Available Modvat set-off on import : -->
|
|
<label><?php echo "Available Modvat set-off on import :($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewAvailableModvat','value' => set_value('ViewAvailableModvat'),'id'=>'ViewAvailableModvat', '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: -->
|
|
<label><?php echo "Gross expenses due to custom duty:($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewGrossexpenses','value' => set_value('ViewGrossexpenses'),'id'=>'ViewGrossexpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
|
|
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]/UOM
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'Viewpurchaserate','value' => set_value('Viewpurchaserate'),'id'=>'Viewpurchaserate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','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' => 'ViewPurQuantity','value' => set_value('ViewPurQuantity'),'id'=>'ViewPurQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditCalculateCtable()');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-4">
|
|
<!-- Custom Duty Expenses -->
|
|
<label><?php echo "Custom Duty Expenses($INR)"?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewCustomDutyExpenses ','value' => set_value('ViewCustomDutyExpenses'),'id'=>'ViewCustomDutyExpenses', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
<!-- RMC Including Customers -->
|
|
<label><?php echo "RMC Including Customers($INR)";?></label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewRMCIncludingCustomers','value' => set_value('ViewRMCIncludingCustomers'),'id'=>'ViewRMCIncludingCustomers', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<!-- Total Amount: -->
|
|
<label id=labelViewTotalAmount>Total Amount</label>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'ViewTotalExp','value' => set_value('ViewTotalExp'),'id'=>'ViewTotalExp', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<!-- <a class="btn btn-info font EditImport" ID="EditImport" ><i class="fa fa-plus" ></i> <span class="bold">Edit Import</span></a> -->
|
|
<!--<a class="btn btn-primary font AddService" ID="AddService" ><i class="fa fa-plus"></i> <span class="bold">Add Service</span></a>-->
|
|
|
|
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
<div class="box-body" style="margin-top: -3%;">
|
|
<table id="ImportTax" 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>Material Code</th>
|
|
<th>Description</th>
|
|
<th>Quantity</th>
|
|
<th>UOM</th>
|
|
<th>Rate</th>
|
|
<th>Basic Amount</th>
|
|
<th>Received Qty</th>
|
|
<th>Rejected Qty</th>
|
|
<th>Pending Qty</th>
|
|
<!-- <th>Tax Amount</th>
|
|
<th>Total Order Amount</th> -->
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody id='ImportAppend'>
|
|
<?php
|
|
if(!empty($POItem))
|
|
{
|
|
|
|
|
|
|
|
foreach($POItem as $record)
|
|
{
|
|
$index = $index + 1;
|
|
//echo $record->Rate;
|
|
|
|
?>
|
|
<tr id="<?php echo $index ; ?>">
|
|
<td align="left"><?php echo $index ; ?></td>
|
|
<td><?php echo $record->ReqNo ?></td>
|
|
<td><?php echo $record->MaterialCode ?></td>
|
|
<td><?php echo $record->MaterialName?></td>
|
|
<td><?php echo $record->Quantity ?></td>
|
|
<td><?php echo $record->UOM ?></td>
|
|
<td><?php echo $record->Rate ?></td>
|
|
<td><?php echo $record->BasicValue ?></td>
|
|
<td><?php echo $record->ReceivedQuantity ?></td>
|
|
<td><?php echo $record->QuantityRejected ?></td>
|
|
<td><?php echo $record->PendingQty?></td>
|
|
<!-- <td><?php echo $record->Taxamount?></td>
|
|
<td><?php echo $record->TotalOrderValue?></td> -->
|
|
|
|
<input type="hidden" name="<?php echo 'Reqnumber'.$index ?>" id="<?php echo 'Reqnumber'.$index ?>" value="<?php echo $record->ReqNo ; ?>" />
|
|
<input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->DepartmentName ; ?>" />
|
|
|
|
<!--<input type="hidden" name="<?php echo 'AvlBudAmt'.$index ?>" id="<?php echo 'AvlBudAmt'.$index ?>" value="<?php echo $record->AvlBudAmt ; ?>" /> -->
|
|
<input type="hidden" name="<?php echo 'AvlBudAmt'.$index ?>" id="<?php echo 'AvlBudAmt'.$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 'costCode'.$index ?>" id="<?php echo 'costCode'.$index ?>" value="<?php echo $record->CostCenterCode ; ?>" />
|
|
<input type="hidden" name="<?php echo 'materialCode'.$index ?>" id="<?php echo 'materialCode'.$index ?>" value="<?php echo $record->MaterialCode ; ?>" />
|
|
<input type="hidden" name="<?php echo 'materialName'.$index ?>" id="<?php echo 'materialName'.$index ?>" value="<?php echo $record->MaterialName ; ?>" />
|
|
<input type="hidden" name="<?php echo 'uom'.$index ?>" id="<?php echo 'uom'.$index ?>" value="<?php echo $record->UOM ; ?>" />
|
|
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
|
<input type="hidden" name="<?php echo 'itemRate'.$index ?>" id="<?php echo 'itemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
|
<input type="hidden" name="<?php echo 'LandingCharge'.$index ?>" id="<?php echo 'LandingCharge'.$index ?>" value="<?php echo $record->LandingCharge; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterLandingCharge'.$index ?>" id="<?php echo 'AfterLandingCharge'.$index ?>" value="<?php echo $record->AfterLandingCharge; ?>" />
|
|
<input type="hidden" name="<?php echo 'HighSeasSalesCharge'.$index ?>" id="<?php echo 'HighSeasSalesCharge'.$index ?>" value="<?php echo $record->HighSeasSalesCharge ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterHighSeasSalesCharge'.$index ?>" id="<?php echo 'AfterHighSeasSalesCharge'.$index ?>" value="<?php echo $record->AfterHighSeasSalesCharge ; ?>" />
|
|
<input type="hidden" name="<?php echo 'CustomDuty'.$index ?>" id="<?php echo 'CustomDuty'.$index ?>" value="<?php echo $record->CustomDuty ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterCustomDuty'.$index ?>" id="<?php echo 'AfterCustomDuty'.$index ?>" value="<?php echo $record->AfterCustomDuty ; ?>" />
|
|
<input type="hidden" name="<?php echo 'ExciseDuty'.$index ?>" id="<?php echo 'ExciseDuty'.$index ?>" value="<?php echo $record->ExciseDuty ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterExciseDuty'.$index ?>" id="<?php echo 'AfterExciseDuty'.$index ?>" value="<?php echo $record->AfterExciseDuty ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'ExciseDutyEdCess'.$index ?>" id="<?php echo 'ExciseDutyEdCess'.$index ?>" value="<?php echo $record->ExciseDutyEdCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterExciseDutyEdCess'.$index ?>" id="<?php echo 'AfterExciseDutyEdCess'.$index ?>" value="<?php echo $record->AfterExciseDutyEdCess ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'CustomEdCess'.$index ?>" id="<?php echo 'CustomEdCess'.$index ?>" value="<?php echo $record->CustomEdCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterCustomEdCess'.$index ?>" id="<?php echo 'AfterCustomEdCess'.$index ?>" value="<?php echo $record->AfterCustomEdCess ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'ExchangeRate'.$index ?>" id="<?php echo 'ExchangeRate'.$index ?>" value="<?php echo $record->ExchangeRate ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'AddlExciseDuty'.$index ?>" id="<?php echo 'AddlExciseDuty'.$index ?>" value="<?php echo $record->AddlExciseDuty ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterAddlExciseDuty'.$index ?>" id="<?php echo 'AfterAddlExciseDuty'.$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 'Grossexpensesduetocustomduty'.$index ?>" id="<?php echo 'Grossexpensesduetocustomduty'.$index ?>" value="<?php echo $record->Grossexpensesduetocustomduty; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'purchaseratePerKG'.$index ?>" id="<?php echo 'purchaseratePerKG'.$index ?>" value="<?php echo $record->purchaseratePerKG; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'CustomDutyExpensesPerKG'.$index ?>" id="<?php echo 'CustomDutyExpensesPerKG'.$index ?>" value="<?php echo $record->CustomDutyExpensesPerKG; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'RMCIncludingCustomersPerKG'.$index ?>" id="<?php echo 'RMCIncludingCustomersPerKG'.$index ?>" value="<?php echo $record->RMCIncludingCustomersPerKG; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'QuantityKG'.$index ?>" id="<?php echo 'QuantityKG'.$index ?>" value="<?php echo $record->QuantityKG; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'BasicPriceInMTon'.$index ?>" id="<?php echo 'BasicPriceInMTon'.$index ?>" value="<?php echo $record->BasicPriceInMTon ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'ProductPrice'.$index ?>" id="<?php echo 'ProductPrice'.$index ?>" value="<?php echo $record->ProductPrice ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'ExciseDutySHCess'.$index ?>" id="<?php echo 'ExciseDutySHCess'.$index ?>" value="<?php echo $record->ExciseDutySHCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterExciseDutySHCess'.$index ?>" id="<?php echo 'AfterExciseDutySHCess'.$index ?>" value="<?php echo $record->AfterExciseDutySHCess ; ?>" />
|
|
|
|
|
|
<input type="hidden" name="<?php echo 'CustomSHCess'.$index ?>" id="<?php echo 'CustomSHCess'.$index ?>" value="<?php echo $record->CustomSHCess ; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterCustomSHCess'.$index ?>" id="<?php echo 'AfterCustomSHCess'.$index ?>" value="<?php echo $record->AfterCustomSHCess; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'Grossdutypayable'.$index ?>" id="<?php echo 'Grossdutypayable'.$index ?>" value="<?php echo $record->Grossdutypayable ; ?>" />
|
|
<input type="hidden" name="<?php echo 'QuantityKG'.$index ?>" id="<?php echo 'QuantityKG'.$index ?>" value="<?php echo $record->QuantityKG ; ?>" />
|
|
<input type="hidden" name="<?php echo 'purchaseratePerKG'.$index ?>" id="<?php echo 'purchaseratePerKG'.$index ?>" value="<?php echo $record->purchaseratePerKG ; ?>" />
|
|
<input type="hidden" name="<?php echo 'RMCIncludingCustomersPerKG'.$index ?>" id="<?php echo 'RMCIncludingCustomersPerKG'.$index ?>" value="<?php echo $record->RMCIncludingCustomersPerKG ; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'BasicPriceInMTon'.$index ?>" id="<?php echo 'BasicPriceInMTonG'.$index ?>" value="<?php echo $record->BasicPriceInMTon ; ?>" />
|
|
<input type="hidden" name="<?php echo 'ProductPrice'.$index ?>" id="<?php echo 'ProductPrice'.$index ?>" value="<?php echo $record->ProductPrice; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'CustomEdCess'.$index ?>" id="<?php echo 'CustomEdCess'.$index ?>" value="<?php echo $record->CustomEdCess; ?>" />
|
|
<input type="hidden" name="<?php echo 'AfterCustomEdCess'.$index ?>" id="<?php echo 'AfterCustomEdCess'.$index ?>" value="<?php echo $record->AfterCustomEdCess; ?>" />
|
|
<input type="hidden" name="<?php echo 'ExciseDutySHCess'.$index ?>" id="<?php echo 'ExciseDutySHCess'.$index ?>" value="<?php echo $record->ExciseDutySHCess; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'AfterExciseDutySHCess'.$index ?>" id="<?php echo 'AfterExciseDutySHCess'.$index ?>" value="<?php echo $record->AfterExciseDutySHCess; ?>" />
|
|
|
|
<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 'Grossexpensesduetocustomduty'.$index ?>" id="<?php echo 'Grossexpensesduetocustomduty'.$index ?>" value="<?php echo $record->Grossexpensesduetocustomduty; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'Grossexpensesduetocustomduty'.$index ?>" id="<?php echo 'Grossexpensesduetocustomduty'.$index ?>" value="<?php echo $record->Grossexpensesduetocustomduty; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'BasicINRValue'.$index ?>" id="<?php echo 'BasicINRValue'.$index ?>" value="<?php echo $record->BasicINRValue; ?>" />
|
|
|
|
<input type="hidden" name="<?php echo 'TotalValue'.$index ?>" id="<?php echo 'TotalValue'.$index ?>" value="<?php echo $record->ProductPrice; ?>" />
|
|
<input type="hidden" name="<?php echo 'ExchangeRate'.$index ?>" id="<?php echo 'ExchangeRate'.$index ?>" value="<?php echo $record->ExchangeRate; ?>" />
|
|
|
|
|
|
|
|
<?php
|
|
|
|
if($PONOStatus != PO_RELEASED)
|
|
{?>
|
|
<td> <a data-target='#editimportpomodel' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#editimportpomodel"><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>
|
|
<?php
|
|
} else {?>
|
|
<td> <a data-target='#viewimportmodal' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#viewimportmodal"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo ; ?>Click here to view Requisition details"></i> </a> </td>
|
|
<?php
|
|
}?>
|
|
</tr> <?php
|
|
|
|
|
|
//echo $record->AfterLandingCharge + $TotalLanding;
|
|
$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;
|
|
//$totgrossduty=$totgrossduty+$record->Grossdutypayable;
|
|
$totavlmodvat=$totavlmodvat+$record->AvailableModvat;
|
|
$totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty;
|
|
$ExchangeRate=$record->ExchangeRate;
|
|
//$totorder=$totorder+$record->ProductPrice;
|
|
$totorder=$totorder+$record->ProductPrice;
|
|
//$ServiceDescription=$record->ServiceDescription;
|
|
|
|
//alert($totorder);
|
|
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>" >
|
|
|
|
|
|
|
|
<?php
|
|
$totalhidden=$totorder;
|
|
$totorder=number_format($totorder);
|
|
|
|
//echo $to;
|
|
$TotalLanding=number_format( $TotalLanding,2);
|
|
$tothighseas=number_format($tothighseas ,2);
|
|
$totcustom=number_format($totcustom,2);
|
|
$totexciseduty=number_format($totexciseduty,2);
|
|
$totexcisedutyED=number_format($totexcisedutyED,2);
|
|
$totexciseSH =number_format($totexciseSH ,2);
|
|
$totcustomED=number_format($totcustomED,2);
|
|
$totcustomSH=number_format($totcustomSH,2);
|
|
$totaddtnlexcise=number_format($totaddtnlexcise,2);
|
|
$totgrossduty=number_format($totgrossduty,2);
|
|
$totavlmodvat=number_format($totavlmodvat,2);
|
|
$totgrossexpense=number_format($totgrossexpense,2);
|
|
|
|
|
|
|
|
}
|
|
?>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="col-md-12" style="border: 1px solid;">
|
|
|
|
<div class="col-md-12">
|
|
<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-4">
|
|
<label>Total Order Value:<?php echo "($Value)"?></label> <?php
|
|
$data = array('name' => 'txtToatlOrder','value' => set_value('txtToatlOrder',$totorder),'id'=>'txtToatlOrder', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true','style'=>'text-align:right;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
<!-- <input type="text" name="txttot" id="txtPONO" value=<?php echo "$totalhidden";?>> -->
|
|
</div>
|
|
<input type="hidden" name="txttot" id="txttot" value=<?php echo $totalhidden;?>
|
|
|
|
|
|
<div class="col-md-12">
|
|
<div class="col-md-12">
|
|
<label>Special Instructions :</label> <?php
|
|
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
|
|
echo form_textarea($data);
|
|
?>
|
|
</div>
|
|
</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="txtRowCount" /> -->
|
|
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow"/>
|
|
<input type="hidden" name="txtRow" id="txtRow" value="<?php echo $index;?>"/>
|
|
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
|
|
|
|
|
<?php if($PONOStatus != PO_RELEASED) {?>
|
|
<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">
|
|
<?php }else {?>
|
|
<!-- <input type="reset" class="btn btn-primary" value = "OK"> -->
|
|
<a class="btn btn-primary" href="<?php echo base_url(); ?>purchaseorderListing">OK</a>
|
|
<?php } ?>
|
|
|
|
</div>
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="col-md-4">
|
|
<span>Request On</span>
|
|
<?php
|
|
$data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'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',$RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<span>Status</span>
|
|
<?php
|
|
// $options = array("0"=>$PONOStatus);
|
|
// echo form_dropdown('Status', $options,set_value('Status',$POStatus),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
|
|
|
$data = array('name' => 'Status','value' => set_value('Status',$StatusName),'id'=>'Status', 'class' => 'form-control' ,'readonly' => 'true');
|
|
echo form_input($data);
|
|
?>
|
|
</div><br/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<script type="text/html" id="ImportList">
|
|
<tr id="<%=index%>">
|
|
<td align="left"><%=index%></td>
|
|
<td align="left"><%=ReqNo%></td>
|
|
<td align="left"><%=MaterialCode%></td>
|
|
|
|
<td align="left"><%=Description%></td>
|
|
<td align="left"><%=Quantity%></td>
|
|
<td align="left"><%=UOM%></td>
|
|
<td align="left"><%=Rate%></td>
|
|
<td align="left"><%=BasicAmount%></td>
|
|
<td align="left"><%=ReceivedQty%></td>
|
|
<td align="left"><%=RejectedQty%></td>
|
|
<td align="left"><%=PendingQty%></td>
|
|
<!-- <td align="left"><%=index%></td>
|
|
<td align="left"><%=ReqNo%></td>
|
|
|
|
<td align="left"><%=ItemName%></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='#editimportpomodel' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#editimportpomodel"><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 type="text/javascript">
|
|
|
|
|
|
$(document).ready(function () {
|
|
$('#Date').click(function () {
|
|
//for Date range selection
|
|
$('#Schedulediv').hide();
|
|
$('#Deliverydtdiv').show();
|
|
});
|
|
$('#Schedule').click(function () {
|
|
//for schedule range selection
|
|
$('#Deliverydtdiv').hide();
|
|
$('#Schedulediv').show();
|
|
});
|
|
});
|
|
|
|
var viewAvlBudAmt='<?php echo $AvlAmount?>';
|
|
$('#ViewAvlBudAmt').val(viewAvlBudAmt);
|
|
|
|
var SelectedMaterialCode = [];
|
|
var RequistQuantity = '';
|
|
var AvilBudAmt = '';
|
|
var CollIndex = 0;
|
|
|
|
//var index='';
|
|
var index= '<?php echo $index; ?>';
|
|
//alert(index);
|
|
// var index=$('#txtRowCount').val();
|
|
var userid = '';
|
|
var NilType = '<?php echo NILTYPE;?>';
|
|
var PercentageType = '<?php echo PERCENTAGE;?>';
|
|
var IsEdit = '0';
|
|
var SelectedMaterialList = {
|
|
Mat: []
|
|
};
|
|
|
|
|
|
var delivery=<?php echo json_encode($DeliveryOption,JSON_PRETTY_PRINT)?>;
|
|
if(delivery==1)
|
|
{
|
|
document.getElementById("Schedule").checked = true;
|
|
$('#Deliverydtdiv').hide();
|
|
$('#Schedulediv').show();
|
|
}
|
|
else
|
|
{
|
|
document.getElementById("Date").checked = true;
|
|
$('#Deliverydtdiv').show();
|
|
$('#Schedulediv').hide();
|
|
}
|
|
// var paymentday=<?php echo json_encode($PaymentDays,JSON_PRETTY_PRINT)?>
|
|
// if (paymentday=="After")
|
|
// {
|
|
// //alert();
|
|
// document.getElementById("After").checked = true;
|
|
// }
|
|
// else
|
|
// {
|
|
// document.getElementById("Before").checked = true;
|
|
// }
|
|
|
|
// $('#ExchangeRate').val(<?php echo $ExchangeRate;?>);
|
|
$('#EditAvlBudAmt').val(<?php echo $AvlAmount; ?>);
|
|
|
|
//var a=$('#ExchangeRate').val();
|
|
//alert(a);
|
|
|
|
|
|
|
|
|
|
var txtexchangerate=parseFloat($('#ExchangeRate').val());
|
|
$('#EditExchangeRt').val(txtexchangerate);
|
|
var txtbasics=parseFloat($('#BasicPriceInMTon').val());
|
|
//alert(txtexchangerate);
|
|
//alert(txtbasics);
|
|
var basicpriceinus=parseFloat($('#BasicPriceinUS').val());
|
|
var txtbasic=txtexchangerate*basicpriceinus;
|
|
//alert(txtbasic);
|
|
$('#EditINRBasicvalue').val(txtbasic);
|
|
|
|
|
|
$('#currencytype').change(function()
|
|
{
|
|
//alert();
|
|
var id = $('#currencytype').val();
|
|
//alert(id);
|
|
var symbol=<?php echo json_encode($Currency,JSON_PRETTY_PRINT)?>;
|
|
//alert(symbol);
|
|
//alert(JSON.stringify(symbol));
|
|
$.each(symbol,function(idx,obj)
|
|
{
|
|
//alert(JSON.stringify(symbol[i]));
|
|
//console.log(obj);
|
|
if(obj.Currency_Code==id)
|
|
{
|
|
var sign=obj.FontCode2000;
|
|
var code=obj.Currency_Code;
|
|
|
|
document.getElementById("label1").innerHTML ='Exchange Rate in '+code+'('+sign+')';
|
|
document.getElementById("label2").innerHTML ='Basic Value in '+code+'('+sign+')';
|
|
document.getElementById("label3").innerHTML ='Basic Value in '+code+'('+sign+')';
|
|
document.getElementById("labelRate").innerHTML ='Rate in '+code+'('+sign+')';
|
|
document.getElementById("labelBasicpriceus").innerHTML ='Basic Value In '+code+'('+sign+')'+' per UOM';
|
|
document.getElementById("labelBasicINR").innerHTML ='Basic Price in INR:'+code+'('+sign+')';
|
|
document.getElementById("labelEditRate").innerHTML ='Rate in '+sign;
|
|
document.getElementById("labelEditBasicPriceUs").innerHTML ='Basic Value In '+code+'('+sign+')'+' per UOM';
|
|
document.getElementById("labelEditBasicINR").innerHTML ='Basic Price in INR:'+code+'('+sign+')';
|
|
|
|
|
|
document.getElementById("labelTotalAmount").innerHTML ='Total Amount '+code+'('+sign+')';
|
|
document.getElementById("labelEditTotalAmount").innerHTML ='Total Amount '+code+'('+sign+')';
|
|
document.getElementById("labelViewTotalAmount").innerHTML ='Total Amount '+code+'('+sign+')';
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
$('#drpSupplier').change(function() {
|
|
|
|
var id = $('#drpSupplier').val();
|
|
|
|
$("#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);
|
|
$("#PayableAT").val(obj.PayableAT);
|
|
var a=obj.PaymentDays;
|
|
// console.log(a);
|
|
if (a=="After")
|
|
{
|
|
//alert();
|
|
document.getElementById("After").checked = true;
|
|
|
|
}
|
|
else
|
|
document.getElementById("Before").checked = true;
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
else
|
|
{
|
|
alert('Please select the SupplierID');
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#currencytype').change(function(){
|
|
$('#ExchangeRate').val('');
|
|
});
|
|
|
|
|
|
$('#ReqNo').change(function() {
|
|
|
|
var id = $('#ReqNo').val();
|
|
$("#AvlBudAmt").val('');
|
|
$("#CostCenter").empty();
|
|
$("#MaterialCode").empty();
|
|
$("#deptName").val('');
|
|
$("#UOM").val('');
|
|
$("#Quantity").val('');
|
|
$("#ItemName").val('');
|
|
$("#Rate").val('');
|
|
$("#txtBasicValue").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) ?>;
|
|
// console.log(Material);
|
|
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
|
//alert(JSON.stringify(Material));
|
|
|
|
|
|
// For Binding DepartmentName
|
|
$.each(y, function(idx, obj) {
|
|
if(obj.ReqNo === id)
|
|
{
|
|
$("#deptName").val(obj.DepartmentName);
|
|
$("#CostCenter").val(obj.CostCenterCode);
|
|
|
|
}
|
|
});
|
|
$("#AvlBudAmt").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) {
|
|
//alert();
|
|
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();
|
|
$("#ItemName").val('');
|
|
$("#UOM").val('');
|
|
$("#Quantity").val('');
|
|
$("#ItemName").val('');
|
|
$("#Rate").val('');
|
|
$("#txtBasicValue").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)
|
|
{
|
|
$("#ItemName").val(obj.MaterialName);
|
|
$("#UOM").val(obj.UOM);
|
|
$("#Quantity").val(obj.Quantity);
|
|
RequistQuantity = obj.Quantity;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
else
|
|
{
|
|
alert('Please select the MaterialCode');
|
|
return false;
|
|
}
|
|
|
|
});
|
|
|
|
function USRate()
|
|
{
|
|
|
|
//if($('#imBasicPrice').val() != '' && $('#ExchangeRate').val() != '')
|
|
//{
|
|
var txtbasics=parseFloat($('#imBasicPrice').val());
|
|
var txtexchangerate=parseFloat($('#ExchangeRate').val());
|
|
$('#ExchangeRt').val(txtexchangerate);
|
|
var txtINRvalue=txtbasics*txtexchangerate;
|
|
$('#INRBasicvalues').val(txtINRvalue)
|
|
$('#INRBasicvalue').val(txtINRvalue);
|
|
$('#BasicPriceTax').val(txtINRvalue);
|
|
//txtINR = Math.ceil(txtINR*10)/10;
|
|
txtINR = Math.round(txtINRvalue);
|
|
//alert(txtINR);BasicPriceTax
|
|
|
|
$('#AfterBasicPriceTax').val(txtINR);
|
|
$('#imBasicPrice').val(txtbasics);
|
|
$('#ExchangeRt').val(txtexchangerate);
|
|
$('#EditAfterBasicPriceTax').val(txtINR);
|
|
$('#EditimBasicPrice').val(txtbasics);
|
|
$('#EditExchangeRt').val(txtexchangerate);
|
|
$('#EditINRBasicvalue').val(txtINRvalue);
|
|
|
|
|
|
//}
|
|
}
|
|
|
|
function EditRatechange()
|
|
{
|
|
var txteditQuantity=parseFloat($('#EditQuantity').val());
|
|
var txteditUnitPrice=parseFloat($('#EditRate').val());
|
|
var editTot=txteditQuantity*txteditUnitPrice
|
|
$('#EdittxtBasicValue').val(editTot);
|
|
$(EditimBasicPrice).val(editTot);
|
|
var exchangerate=parseFloat($('#EditExchangeRt').val());
|
|
var txtINR=editTot*exchangerate;
|
|
$('#EditINRBasicvalue').val(txtINR);
|
|
$('#EditBasicPriceTax').val(txtINR);
|
|
$('#EditAfterBasicPriceTax').val(txtINR);
|
|
EditCalculateloadingcharge();
|
|
}
|
|
|
|
|
|
|
|
function Ratechange(){
|
|
//alert();
|
|
if($('#ReqNo').val() == "0")
|
|
{
|
|
alert('Please select the Requisition Number');
|
|
$('#ReqNo').focus();
|
|
return false;
|
|
}
|
|
else if($('#MaterialCode').val() == "0")
|
|
{
|
|
alert('Please select the Material Code');
|
|
$('#MaterialCode').focus();
|
|
return false;
|
|
}
|
|
else if($('#CostCenter').val() == "0")
|
|
{
|
|
alert('Please select the CostCenterCode');
|
|
$('#CostCenter').focus();
|
|
return false;
|
|
}
|
|
|
|
//ExceedQuantityCheck();
|
|
|
|
if($('#Quantity').val() != '' && $('#Rate').val() != '')
|
|
{
|
|
var txtQuantity = parseFloat( $('#Quantity').val());
|
|
var txtUnitPrice = parseFloat($('#Rate').val());
|
|
var Tot = txtQuantity * txtUnitPrice
|
|
$('#txtBasicValue').val(Tot);
|
|
|
|
|
|
$('#imBasicPrice').val(Math.round(Tot));
|
|
|
|
|
|
var txtbasics=parseFloat($('#imBasicPrice').val());
|
|
var txtexchangerate=parseFloat($('#ExchangeRate').val());
|
|
$('#ExchangeRt').val(txtexchangerate);
|
|
var txtINRvalue=txtbasics*txtexchangerate;
|
|
$('#INRBasicvalues').val(txtINRvalue)
|
|
$('#INRBasicvalue').val(Math.round(txtINRvalue));
|
|
$('#BasicPriceTax').val(txtINRvalue);
|
|
//txtINR = Math.ceil(txtINR*10)/10;
|
|
txtINR = Math.round(txtINRvalue);
|
|
//alert(txtINR);BasicPriceTax
|
|
|
|
$('#AfterBasicPriceTax').val(txtINR);
|
|
$('#imBasicPrice').val(txtbasics);
|
|
$('#ExchangeRt').val(txtexchangerate);
|
|
$('#EditAfterBasicPriceTax').val(txtINR);
|
|
$('#EditimBasicPrice').val(txtbasics);
|
|
$('#EditExchangeRt').val(txtexchangerate);
|
|
$('#EditINRBasicvalue').val(txtINRvalue);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function Calculateloadingcharge()
|
|
{
|
|
//alert();
|
|
$('#AfterHighseas').val('');
|
|
$('#AfterCustomduty').val('');
|
|
$('#AfterExcisedutyTax').val('');
|
|
$('#AfterExcisedutyEDcess').val('');
|
|
$('#AfterExcisedutySHcess').val('');
|
|
$('#AfterCustomEDcess').val('');
|
|
$('#AfterCustomSHcess').val('');
|
|
$('#AfterAdditionalExciseduty').val('');
|
|
$('#Grossdutypayable').val('');
|
|
$('#AvailableModvat').val('');
|
|
$('#Grossexpenses').val('');
|
|
$('#purchaserate').val('');
|
|
$('#CustomDutyExpenses').val('');
|
|
$('#RMCIncludingCustomers').val('');
|
|
$('#TotalExp').val('');
|
|
|
|
var txtlanding=0;
|
|
var txtbasicprice=0;
|
|
txtlanding=parseFloat($('#LandingCharge').val());
|
|
txtbasicprice=parseFloat($('#AfterBasicPriceTax').val());
|
|
|
|
//var result=(txtlanding*txtbasicprice/100);
|
|
var result= <?php echo LOADING_CHARGE;?>;
|
|
|
|
$('#AfterLandingCharge').val(parseFloat(Math.round(result)));
|
|
CalculateHighseassalescharge();
|
|
|
|
//alert();
|
|
}
|
|
|
|
|
|
|
|
function EditCalculateloadingcharge()
|
|
{
|
|
//alert();
|
|
var txtlanding=0;
|
|
var txtbasicprice=0;
|
|
|
|
|
|
txtlanding=parseFloat($('#EditLandingCharge').val());
|
|
txtbasicprice=parseFloat($('#EditAfterBasicPriceTax').val());
|
|
//var result=(txtlanding*txtbasicprice/100);
|
|
var result= <?php echo LOADING_CHARGE;?>;
|
|
$('#EditAfterLandingCharge').val(parseFloat(Math.round(result)));
|
|
EditCalculateHighseassalescharge();
|
|
//alert();
|
|
}
|
|
|
|
|
|
function CalculateHighseassalescharge()
|
|
{
|
|
|
|
//alert();
|
|
var txtbasicprice=0;
|
|
var txtlandingcharge=0;
|
|
var totalhighsess=0;
|
|
var highsesspercentage=0;
|
|
txtbasicprice=parseFloat($('#AfterBasicPriceTax').val());
|
|
txtlandingcharge=parseFloat($('#AfterLandingCharge').val());
|
|
// alert(txtlandingcharge);
|
|
totalhighsess=txtbasicprice+txtlandingcharge;
|
|
highsesspercentage=parseFloat($('#Highseas').val());
|
|
|
|
|
|
//var txthighsess=(totalhighsess*highsesspercentage)/100;
|
|
var txtAfterhighsess=<?php echo HIGHSEAS_SALES;?>;
|
|
if(isNaN(txtAfterhighsess))
|
|
{
|
|
$('#AfterHighseas').val('');
|
|
}
|
|
else{
|
|
$('#AfterHighseas').val(parseFloat(Math.round(txtAfterhighsess)));
|
|
}
|
|
|
|
CalculateCustomduty();
|
|
}
|
|
|
|
|
|
|
|
function EditCalculateHighseassalescharge()
|
|
{
|
|
|
|
//alert();
|
|
var txtbasicprice=0;
|
|
var txtlandingcharge=0;
|
|
var totalhighsess=0;
|
|
var highsesspercentage=0;
|
|
var txthighsess=0;
|
|
txtbasicprice=parseFloat($('#EditAfterBasicPriceTax').val());
|
|
txtlandingcharge=parseFloat($('#EditAfterLandingCharge').val());
|
|
totalhighsess=txtbasicprice+txtlandingcharge;
|
|
highsesspercentage=parseFloat($('#EditHighseas').val());
|
|
//var txthighsess=(totalhighsess*highsesspercentage)/100;
|
|
txthighsess=<?php echo HIGHSEAS_SALES;?>;
|
|
if(isNaN(txthighsess))
|
|
{
|
|
$('#EditAfterHighseas').val('');
|
|
}
|
|
else{
|
|
$('#EditAfterHighseas').val(parseFloat(Math.round(txthighsess)));
|
|
}
|
|
EditCalculateCustomduty();
|
|
}
|
|
function CalculateCustomduty()
|
|
{
|
|
var txtbasic=0;
|
|
var txtcustompercentage=0;
|
|
var txthighse=0;
|
|
var txtlandingch=0;
|
|
var sumcustom=0;
|
|
var txtcustomduty=0;
|
|
txtbasic=parseFloat($('#AfterBasicPriceTax').val());
|
|
txtcustompercentage=parseFloat($('#Customduty').val());
|
|
txthighse=parseFloat($('#AfterHighseas').val());
|
|
txtlandingch=parseFloat($('#AfterLandingCharge').val());
|
|
sumcustom=txthighse+txtlandingch+txtbasic;
|
|
//var txtcustomduty=(txtbasic*txtcustompercentage)/100;
|
|
txtcustomduty=<?php echo CUSTOM_DUTY;?>;
|
|
if(isNaN(txtcustomduty))
|
|
{
|
|
$('#AfterCustomduty').val('');
|
|
}
|
|
else{
|
|
$('#AfterCustomduty').val(parseFloat(Math.round(txtcustomduty)));
|
|
}
|
|
CalculateExciseDuty() ;
|
|
|
|
}
|
|
|
|
|
|
|
|
function ExceedEditQuantityCheck()
|
|
{
|
|
// RequistQuantity
|
|
var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val());
|
|
var ReqQuantity = parseFloat(RequistQuantity);
|
|
if(EnterQuantity > ReqQuantity)
|
|
{
|
|
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
|
$('#EditQuantity').focus();
|
|
return false;
|
|
}
|
|
else{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
function EditCalculateCustomduty()
|
|
{
|
|
var txtbasic=0;
|
|
var txtcustompercentage=0;
|
|
var txthighse=0;
|
|
var txtlandingch=0;
|
|
var sumcustom=0;
|
|
var txtcustomduty=0;
|
|
txtbasic=parseFloat($('#EditAfterBasicPriceTax').val());
|
|
txtcustompercentage=parseFloat($('#EditCustomduty').val());
|
|
txthighse=parseFloat($('#EditAfterHighseas').val());
|
|
txtlandingch=parseFloat($('#EditAfterLandingCharge').val());
|
|
sumcustom=txthighse+txtlandingch+txtbasic;
|
|
//var txtcustomduty=(txtbasic*txtcustompercentage)/100;
|
|
txtcustomduty=<?php echo CUSTOM_DUTY;?>;
|
|
if(isNaN(txtcustomduty))
|
|
{
|
|
$('#EditAfterCustomduty').val('');
|
|
}
|
|
else{
|
|
$('#EditAfterCustomduty').val(parseFloat(Math.round(txtcustomduty)));
|
|
}
|
|
EditCalculateExciseDuty() ;
|
|
|
|
}
|
|
|
|
|
|
function CalculateExciseDuty()
|
|
{
|
|
|
|
var txtcustomduty=0;
|
|
var txthighsess=0;
|
|
var txtaftrlanding=0;
|
|
var txtbasicc=0;
|
|
var txtpercentage=0;
|
|
var txtexcisesum=0;
|
|
var totalexcise=0;
|
|
txtcustomduty=parseFloat($('#AfterCustomduty').val());
|
|
txthighsess=parseFloat($('#AfterHighseas').val());
|
|
txtaftrlanding=parseFloat($('#AfterLandingCharge').val());
|
|
txtbasicc=parseFloat($('#AfterBasicPriceTax').val());
|
|
|
|
txtpercentage=parseFloat($('#ExcisedutyTax').val());
|
|
txtexcisesum=txtcustomduty+txthighsess+txtaftrlanding+txtbasicc;
|
|
//var Exciseduty=(txtexcisesum*txtpercentage)/100;
|
|
totalexcise=<?php echo EXCISE_DUTY;?>;
|
|
if(isNaN(totalexcise))
|
|
{
|
|
$('#AfterExcisedutyTax').val('');
|
|
}
|
|
//var totalexcise=txtcustomduty+Exciseduty;
|
|
else{
|
|
$('#AfterExcisedutyTax').val(parseFloat(Math.round(totalexcise)));
|
|
}
|
|
CalculateExciseED1();
|
|
}
|
|
|
|
|
|
|
|
function EditCalculateExciseDuty()
|
|
{ //alert('edit');
|
|
var txtcustomduty=0;
|
|
var txthighsess=0;
|
|
var txtaftrlanding=0;
|
|
var txtbasicc=0;
|
|
var txtpercentage=0;
|
|
var txtexcisesum=0;
|
|
var totalexcise=0;
|
|
txtcustomduty=parseFloat($('#EditAfterCustomduty').val());
|
|
txthighsess=parseFloat($('#EditAfterHighseas').val());
|
|
txtaftrlanding=parseFloat($('#EditAfterLandingCharge').val());
|
|
txtbasicc=parseFloat($('#EditAfterBasicPriceTax').val());
|
|
|
|
txtpercentage=parseFloat($('#EditExcisedutyTax').val());
|
|
txtexcisesum=txtcustomduty+txthighsess+txtaftrlanding+txtbasicc;
|
|
//var Exciseduty=(txtexcisesum*txtpercentage)/100;
|
|
totalexcise=<?php echo EXCISE_DUTY;?>;
|
|
if(isNaN(totalexcise))
|
|
{
|
|
$('#EditAfterExcisedutyTax').val('');
|
|
}
|
|
else
|
|
{
|
|
//var totalexcise=txtcustomduty+Exciseduty;
|
|
$('#EditAfterExcisedutyTax').val(parseFloat(Math.round(totalexcise)));
|
|
}
|
|
EditCalculateExciseED1();
|
|
}
|
|
|
|
|
|
|
|
function CalculateExciseED1()
|
|
{
|
|
var txtexcise=0;
|
|
var txtexcisepercentage=0;
|
|
var txtexcisetot=0;
|
|
txtexcise=parseFloat($('#AfterExcisedutyTax').val());
|
|
txtexcisepercentage=parseFloat($('#ExcisedutyEDcess').val());
|
|
//var txtexcisetot=(txtexcise*txtexcisepercentage)/100;
|
|
txtexcisetot=<?php echo EXCISE_ED;?>;
|
|
if(isNaN(txtexcisetot))
|
|
{
|
|
$('#AfterExcisedutyEDcess').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#AfterExcisedutyEDcess').val(parseFloat(Math.round(txtexcisetot)));
|
|
}
|
|
|
|
CalculateexciseSHcess();
|
|
|
|
//AfterExcisedutyEDcess
|
|
}
|
|
|
|
|
|
function EditCalculateExciseED1()
|
|
{
|
|
var txtexcise=0;
|
|
var txtexcisepercentage=0;
|
|
var txtexcisetot=0;
|
|
txtexcise=parseFloat($('#EditAfterExcisedutyTax').val());
|
|
txtexcisepercentage=parseFloat($('#EditExcisedutyEDcess').val());
|
|
//var txtexcisetot=(txtexcise*txtexcisepercentage)/100;
|
|
txtexcisetot=<?php echo EXCISE_ED;?>;
|
|
if(isNaN(txtexcisetot))
|
|
{
|
|
$('#EditAfterExcisedutyEDcess').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#EditAfterExcisedutyEDcess').val(parseFloat(Math.round(txtexcisetot)));
|
|
}
|
|
EditCalculateexciseSHcess();
|
|
|
|
//AfterExcisedutyEDcess
|
|
}
|
|
|
|
function CalculateexciseSHcess()
|
|
{
|
|
var excisetxt=0;
|
|
var exciseshcess=0;
|
|
var exciseshcesstot=0;
|
|
excisetxt=parseFloat($('#AfterExcisedutyTax').val());
|
|
exciseshcess=parseFloat($('#ExcisedutySHcess').val());
|
|
//var exciseshcesstot=(excisetxt*exciseshcess)/100;
|
|
exciseshcesstot=<?php echo EXCISE_SH;?>;
|
|
if(isNaN(exciseshcesstot))
|
|
{
|
|
$('#AfterExcisedutySHcess').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#AfterExcisedutySHcess').val(parseFloat(Math.round(exciseshcesstot)));
|
|
//$('#AfterExcisedutySHcess').val('');
|
|
}
|
|
CalculateCustomEdcess();
|
|
|
|
}
|
|
|
|
function EditCalculateexciseSHcess()
|
|
{
|
|
//alert();
|
|
var excisetxt=0;
|
|
var exciseshcess=0;
|
|
//var exciseshcesstot=(excisetxt*exciseshcess)/100;
|
|
var exciseshcesstot=0;
|
|
|
|
excisetxt=parseFloat($('#EditAfterExcisedutyTax').val());
|
|
exciseshcess=parseFloat($('#EditExcisedutySHcess').val());
|
|
//var exciseshcesstot=(excisetxt*exciseshcess)/100;
|
|
exciseshcesstot=<?php echo EXCISE_SH;?>;
|
|
if(isNaN(exciseshcesstot))
|
|
{
|
|
$('#EditAfterExcisedutySHcess').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#EditAfterExcisedutySHcess').val(parseFloat(Math.round(exciseshcesstot)));
|
|
}
|
|
EditCalculateCustomEdcess();
|
|
|
|
}
|
|
|
|
|
|
function CalculateCustomEdcess()
|
|
{
|
|
|
|
var txtloading=0;
|
|
var txthighses=0;
|
|
var txtcustomduty1=0;
|
|
var txtexciseduty=0;
|
|
var txtedexciseduty=0;
|
|
var txtshexcisesess=0;
|
|
var totalval=0;
|
|
var txtedcesspercentage=0;
|
|
//var txtcustomedsess=(totalval*txtedcesspercentage)/100;
|
|
var txtcustomedsess=0;
|
|
|
|
|
|
|
|
|
|
txtloading=parseFloat($('#AfterLandingCharge').val());
|
|
txthighses=parseFloat($('#AfterHighseas').val());
|
|
txtcustomduty1=parseFloat($('#AfterCustomduty').val());
|
|
txtexciseduty=parseFloat($('#AfterExcisedutyTax').val());
|
|
txtedexciseduty=parseFloat($('#AfterExcisedutyEDcess').val());
|
|
txtshexcisesess=parseFloat($('#AfterExcisedutySHcess').val());
|
|
totalval=txtloading+txtcustomduty1+txtexciseduty+ txtedexciseduty+txthighses+txtshexcisesess;
|
|
txtedcesspercentage=parseFloat($('#CustomEDcess').val());
|
|
//var txtcustomedsess=(totalval*txtedcesspercentage)/100;
|
|
txtcustomedsess=<?php echo CUSTOM_ED;?>;
|
|
if(isNaN(txtcustomedsess))
|
|
{
|
|
|
|
$('#AfterCustomEDcess').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#AfterCustomEDcess').val(parseFloat(Math.round(txtcustomedsess)));
|
|
}
|
|
CalculateCustomSHcess();
|
|
|
|
}
|
|
|
|
|
|
|
|
function EditCalculateCustomEdcess()
|
|
{
|
|
var txtloading=0;
|
|
var txthighses=0;
|
|
var txtcustomduty1=0;
|
|
var txtexciseduty=0;
|
|
var txtedexciseduty=0;
|
|
var txtshexcisesess=0;
|
|
var totalval=0;
|
|
var txtedcesspercentage=0;
|
|
//var txtcustomedsess=(totalval*txtedcesspercentage)/100;
|
|
var txtcustomedsess=0;
|
|
|
|
txtloading=parseFloat($('#EditAfterLandingCharge').val());
|
|
txthighses=parseFloat($('#EditAfterHighseas').val());
|
|
txtcustomduty1=parseFloat($('#EditAfterCustomduty').val());
|
|
txtexciseduty=parseFloat($('#EditAfterExcisedutyTax').val());
|
|
txtedexciseduty=parseFloat($('#EditAfterExcisedutyEDcess').val());
|
|
txtshexcisesess=parseFloat($('#EditAfterExcisedutySHcess').val());
|
|
totalval=txtloading+txtcustomduty1+txtexciseduty+ txtedexciseduty+txthighses+txtshexcisesess;
|
|
txtedcesspercentage=parseFloat($('#EditCustomEDcess').val());
|
|
//var txtcustomedsess=(totalval*txtedcesspercentage)/100;
|
|
txtcustomedsess=<?php echo CUSTOM_ED;?>;
|
|
if(isNaN(txtcustomedsess))
|
|
{
|
|
$('#EditAfterCustomEDcess').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#EditAfterCustomEDcess').val(parseFloat(Math.round(txtcustomedsess)));
|
|
}
|
|
EditCalculateCustomSHcess();
|
|
|
|
}
|
|
|
|
|
|
function CalculateCustomSHcess()
|
|
{//alert();
|
|
|
|
var landingch=0;
|
|
var highsesssalles=0;
|
|
var customch=0;
|
|
var excisech=0;
|
|
var exciseedch=0;
|
|
var exciseshch=0;
|
|
var totcustomsh=0;
|
|
|
|
var txtshpercentage=0;
|
|
//var totresult=(totcustomsh*txtshpercentage)/100;
|
|
var totresult=0;
|
|
|
|
|
|
|
|
landingch=parseFloat($('#AfterLandingCharge').val());
|
|
highsesssalles=parseFloat($('#AfterHighseas').val());
|
|
customch=parseFloat($('#AfterCustomduty').val());
|
|
excisech=parseFloat($('#AfterExcisedutyTax').val());
|
|
exciseedch=parseFloat($('#AfterExcisedutyEDcess').val());
|
|
exciseshch=parseFloat($('#AfterExcisedutySHcess').val());
|
|
totcustomsh=landingch+highsesssalles+customch+excisech+exciseedch+exciseshch;
|
|
|
|
txtshpercentage=parseFloat($('#CustomSHcess').val());
|
|
//var totresult=(totcustomsh*txtshpercentage)/100;
|
|
totresult=<?php echo CUSTOM_SH;?>;
|
|
if(isNaN(totresult))
|
|
{
|
|
$('#AfterCustomSHcess').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#AfterCustomSHcess').val(parseFloat(Math.round(totresult)));
|
|
}
|
|
CalculateaddlExciseDuty();
|
|
|
|
}
|
|
|
|
|
|
function EditCalculateCustomSHcess()
|
|
{//alert();
|
|
|
|
var landingch=0;
|
|
var highsesssalles=0;
|
|
var customch=0;
|
|
var excisech=0;
|
|
var exciseedch=0;
|
|
var exciseshch=0;
|
|
var totcustomsh=0;
|
|
|
|
var txtshpercentage=0;
|
|
//var totresult=(totcustomsh*txtshpercentage)/100;
|
|
var totresult=0;
|
|
|
|
landingch=parseFloat($('#EditAfterLandingCharge').val());
|
|
highsesssalles=parseFloat($('#EditAfterHighseas').val());
|
|
customch=parseFloat($('#EditAfterCustomduty').val());
|
|
excisech=parseFloat($('#EditAfterExcisedutyTax').val());
|
|
exciseedch=parseFloat($('#EditAfterExcisedutyEDcess').val());
|
|
exciseshch=parseFloat($('#EditAfterExcisedutySHcess').val());
|
|
totcustomsh=landingch+highsesssalles+customch+excisech+exciseedch+exciseshch;
|
|
|
|
txtshpercentage=parseFloat($('#EditCustomSHcess').val());
|
|
//var totresult=(totcustomsh*txtshpercentage)/100;
|
|
var totresult=<?php echo CUSTOM_SH;?>;
|
|
if(isNaN(totresult))
|
|
{
|
|
$('#EditAfterCustomSHcess').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#EditAfterCustomSHcess').val(parseFloat(Math.round(totresult)));
|
|
}
|
|
EditCalculateaddlExciseDuty();
|
|
|
|
}
|
|
|
|
function CalculateaddlExciseDuty()
|
|
{
|
|
|
|
var basic=0;
|
|
var landingcha=0;
|
|
var highsesssalless=0;
|
|
var customcha=0;
|
|
var excisecha=0;
|
|
var exciseedcha=0;
|
|
var exciseshcha=0;
|
|
var customed=0;
|
|
var customsh=0;
|
|
var totaddtnlexcise=0;
|
|
var addtnpercentage=0;
|
|
// var txtaddtnexciseduty=(totaddtnlexcise*addtnpercentage)/100;
|
|
var txtaddtnexciseduty=0;
|
|
var txtgrossduty=0;
|
|
|
|
basic=parseFloat($('#AfterBasicPriceTax').val());
|
|
landingcha=parseFloat($('#AfterLandingCharge').val());
|
|
highsesssalless=parseFloat($('#AfterHighseas').val());
|
|
customcha=parseFloat($('#AfterCustomduty').val());
|
|
excisecha=parseFloat($('#AfterExcisedutyTax').val());
|
|
exciseedcha=parseFloat($('#AfterExcisedutyEDcess').val());
|
|
exciseshcha=parseFloat($('#AfterExcisedutySHcess').val());
|
|
customed=parseFloat($('#AfterCustomEDcess').val());
|
|
customsh=parseFloat($('#AfterCustomSHcess').val());
|
|
totaddtnlexcise=basic+landingcha+highsesssalless+customcha+excisecha+exciseedcha+exciseshcha+customed+customsh;
|
|
addtnpercentage=parseFloat($('#AdditionalExciseduty').val());
|
|
// var txtaddtnexciseduty=(totaddtnlexcise*addtnpercentage)/100;
|
|
txtaddtnexciseduty=<?php echo ADDTNL_EXCISEDUTY;?>;
|
|
if(isNaN(txtaddtnexciseduty))
|
|
{
|
|
$('#AfterAdditionalExciseduty').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#AfterAdditionalExciseduty').val(parseFloat(Math.round(txtaddtnexciseduty)));
|
|
}
|
|
//var txtgrossduty=landingcha+highsesssalless+customcha+excisecha+exciseedcha+exciseshcha+customed+customsh+txtaddtnexciseduty;
|
|
|
|
txtgrossduty=<?php echo GROSS_DUTY;?>;
|
|
if(isNaN(txtgrossduty))
|
|
{
|
|
$('#Grossdutypayable').val('');
|
|
}
|
|
else{
|
|
$('#Grossdutypayable').val(parseFloat(Math.round(txtgrossduty)));
|
|
}
|
|
CalculateAvlModvat();
|
|
|
|
}
|
|
|
|
|
|
function EditCalculateaddlExciseDuty()
|
|
{
|
|
|
|
var basic=0;
|
|
var landingcha=0;
|
|
var highsesssalless=0;
|
|
var customcha=0;
|
|
var excisecha=0;
|
|
var exciseedcha=0;
|
|
var exciseshcha=0;
|
|
var customed=0;
|
|
var customsh=0;
|
|
var totaddtnlexcise=0;
|
|
var addtnpercentage=0;
|
|
// var txtaddtnexciseduty=(totaddtnlexcise*addtnpercentage)/100;
|
|
var txtaddtnexciseduty=0;
|
|
var txtgrossduty=0;
|
|
|
|
|
|
basic=parseFloat($('#EditAfterBasicPriceTax').val());
|
|
landingcha=parseFloat($('#EditAfterLandingCharge').val());
|
|
highsesssalless=parseFloat($('#EditAfterHighseas').val());
|
|
customcha=parseFloat($('#EditAfterCustomduty').val());
|
|
excisecha=parseFloat($('#EditAfterExcisedutyTax').val());
|
|
exciseedcha=parseFloat($('#EditAfterExcisedutyEDcess').val());
|
|
exciseshcha=parseFloat($('#EditAfterExcisedutySHcess').val());
|
|
customed=parseFloat($('#EditAfterCustomEDcess').val());
|
|
customsh=parseFloat($('#EditAfterCustomSHcess').val());
|
|
totaddtnlexcise=basic+landingcha+highsesssalless+customcha+excisecha+exciseedcha+exciseshcha+customed+customsh;
|
|
addtnpercentage=parseFloat($('#EditAdditionalExciseduty').val());
|
|
// var txtaddtnexciseduty=(totaddtnlexcise*addtnpercentage)/100;
|
|
txtaddtnexciseduty=<?php echo ADDTNL_EXCISEDUTY;?>;
|
|
if(isNaN(txtaddtnexciseduty))
|
|
{
|
|
$('#EditAfterAdditionalExciseduty').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#EditAfterAdditionalExciseduty').val(Math.round(txtaddtnexciseduty));
|
|
}
|
|
//var txtgrossduty=landingcha+highsesssalless+customcha+excisecha+exciseedcha+exciseshcha+customed+customsh+txtaddtnexciseduty;
|
|
|
|
txtgrossduty=<?php echo GROSS_DUTY;?>;
|
|
if(isNaN(txtgrossduty))
|
|
{
|
|
$('#EditGrossdutypayable').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#EditGrossdutypayable').val(parseFloat(Math.round(txtgrossduty)));
|
|
}
|
|
EditCalculateAvlModvat();
|
|
|
|
}
|
|
|
|
function CalculateAvlModvat()
|
|
{
|
|
|
|
var txtexciseduty1=0;
|
|
var txtexciseedcess=0;
|
|
var txtexciseshcess=0;
|
|
var txtaddtnlexcise=0;
|
|
//var totavlmodvat=txtexciseduty1+txtexciseedcess+txtexciseshcess+txtaddtnlexcise;
|
|
var totavlmodvat=0;
|
|
|
|
txtexciseduty1=parseFloat($('#AfterExcisedutyTax').val());
|
|
txtexciseedcess=parseFloat($('#AfterExcisedutyEDcess').val());
|
|
txtexciseshcess=parseFloat($('#AfterExcisedutySHcess').val());
|
|
txtaddtnlexcise=parseFloat($('#AfterAdditionalExciseduty').val());
|
|
//var totavlmodvat=txtexciseduty1+txtexciseedcess+txtexciseshcess+txtaddtnlexcise;
|
|
totavlmodvat=<?php echo AVL_MODVAT;?>;
|
|
if(isNaN(totavlmodvat))
|
|
{
|
|
$('#AvailableModvat').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#AvailableModvat').val(parseFloat(Math.round(totavlmodvat)));
|
|
}
|
|
CalculateGrossExpense();
|
|
|
|
}
|
|
|
|
|
|
function EditCalculateAvlModvat()
|
|
{
|
|
|
|
|
|
var txtexciseduty1=0;
|
|
var txtexciseedcess=0;
|
|
var txtexciseshcess=0;
|
|
var txtaddtnlexcise=0;
|
|
//var totavlmodvat=txtexciseduty1+txtexciseedcess+txtexciseshcess+txtaddtnlexcise;
|
|
var totavlmodvat=0;
|
|
|
|
|
|
txtexciseduty1=parseFloat($('#EditAfterExcisedutyTax').val());
|
|
txtexciseedcess=parseFloat($('#EditAfterExcisedutyEDcess').val());
|
|
txtexciseshcess=parseFloat($('#EditAfterExcisedutySHcess').val());
|
|
txtaddtnlexcise=parseFloat($('#EditAfterAdditionalExciseduty').val());
|
|
//var totavlmodvat=txtexciseduty1+txtexciseedcess+txtexciseshcess+txtaddtnlexcise;
|
|
totavlmodvat=<?php echo AVL_MODVAT;?>;
|
|
if(isNaN(totavlmodvat))
|
|
{
|
|
$('#EditAvailableModvat').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#EditAvailableModvat').val(parseFloat(Math.round(totavlmodvat)));
|
|
}
|
|
EditCalculateGrossExpense();
|
|
}
|
|
|
|
|
|
function CalculateGrossExpense()
|
|
{
|
|
|
|
var txtgrossdutypayable=0;
|
|
var txtmodvat=0;
|
|
//var grossexp=(txtgrossdutypayable-txtmodvat);
|
|
var grossexp=0;
|
|
|
|
|
|
txtgrossdutypayable=parseFloat($('#Grossdutypayable').val());
|
|
txtmodvat=parseFloat($('#AvailableModvat').val());
|
|
//var grossexp=(txtgrossdutypayable-txtmodvat);
|
|
grossexp=<?php echo GROSS_EXP;?>;
|
|
if(isNaN(grossexp))
|
|
{
|
|
$('#Grossexpenses').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#Grossexpenses').val(parseFloat(Math.round(grossexp)));
|
|
}
|
|
CalculateCtable();
|
|
|
|
}
|
|
|
|
|
|
function EditCalculateGrossExpense()
|
|
{
|
|
|
|
|
|
var txtgrossdutypayable=0;
|
|
var txtmodvat=0;
|
|
//var grossexp=(txtgrossdutypayable-txtmodvat);
|
|
var grossexp=0;
|
|
|
|
|
|
txtgrossdutypayable=parseFloat($('#EditGrossdutypayable').val());
|
|
txtmodvat=parseFloat($('#EditAvailableModvat').val());
|
|
//var grossexp=(txtgrossdutypayable-txtmodvat);
|
|
grossexp=<?php echo GROSS_EXP;?>;
|
|
if(isNaN(grossexp))
|
|
{
|
|
$('#EditGrossexpenses').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#EditGrossexpenses').val(parseFloat(Math.round(grossexp)));
|
|
}
|
|
EditCalculateCtable()
|
|
|
|
}
|
|
|
|
function CalculateCtable()
|
|
{
|
|
//alert();
|
|
//purchaserate
|
|
|
|
var quantity=0;
|
|
var txtbasicinrprice=0;
|
|
var txtpurchaserate=0;
|
|
var txtgrossexp=0;
|
|
var txtcustomdutyexp=0;
|
|
var txtrmc=0;
|
|
var total=0;
|
|
var basicamt=0;
|
|
basicprice=parseFloat($('#txtBasicValue').val());
|
|
// console.log(basicprice);
|
|
quantity=parseFloat($('#PurQuantity').val());
|
|
txtbasicinrprice=parseFloat($('#AfterBasicPriceTax').val());
|
|
//txtpurchaserate=txtbasicinrprice/txtCtablequantity;
|
|
txtpurchaserate=<?php echo PURCHASE_RATE;?>;
|
|
//console.log(txtpurchaserate);
|
|
if(isNaN(txtpurchaserate))
|
|
{
|
|
$('#purchaserate').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#purchaserate').val(txtpurchaserate);
|
|
}
|
|
//CustomDutyExpenses
|
|
//RMCIncludingCustomers
|
|
txtgrossexp=parseFloat($('#Grossexpenses').val());
|
|
//txtcustomdutyexp=txtgrossexp/txtCtablequantity;
|
|
txtcustomdutyexp=<?php echo CUSTOMDUTY_EXP;?>;
|
|
if(isNaN(txtcustomdutyexp))
|
|
{
|
|
$('#CustomDutyExpenses').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#CustomDutyExpenses').val(Math.round(txtcustomdutyexp));
|
|
}
|
|
//txtrmc=txtpurchaserate+txtcustomdutyexp;
|
|
txtrmc=<?php echo RMC_CAL;?>;
|
|
if(isNaN(txtrmc))
|
|
{
|
|
$('#RMCIncludingCustomers').val('');
|
|
}
|
|
else
|
|
{
|
|
$('#RMCIncludingCustomers').val(Math.round(txtrmc));
|
|
}
|
|
//total=<?php echo CALCULATE_TOTAL;?>;
|
|
|
|
$('#TotalExp').val(Math.round(basicprice));
|
|
// $('#TotalExp').val(Math.round(basicprice));
|
|
|
|
|
|
}
|
|
|
|
|
|
function EditCalculateCtable()
|
|
{
|
|
//alert();
|
|
//purchaserate
|
|
var txtCtablequantity=0;
|
|
var txtbasicinrprice=0;
|
|
var txtpurchaserate=0;
|
|
var txtgrossexp=0;
|
|
var txtcustomdutyexp=0;
|
|
var txtrmc=0;
|
|
var total=0;
|
|
var basicprice=0;
|
|
basicprice=parseFloat($('#EdittxtBasicValue').val());
|
|
$('#EditTotalExp').val(basicprice);
|
|
var a=parseFloat($('#EditTotalExp').val());
|
|
//console.log(a);
|
|
//alert(basicamt);
|
|
quantity=parseFloat($('#EditPurQuantity').val());
|
|
txtbasicinrprice=parseFloat($('#EditAfterBasicPriceTax').val());
|
|
//txtpurchaserate=txtbasicinrprice/txtCtablequantity;
|
|
txtpurchaserate=<?php echo PURCHASE_RATE;?>;
|
|
$('#Editpurchaserate').val(txtpurchaserate);
|
|
//CustomDutyExpenses
|
|
//RMCIncludingCustomers
|
|
txtgrossexp=parseFloat($('#EditGrossexpenses').val());
|
|
//txtcustomdutyexp=txtgrossexp/txtCtablequantity;
|
|
txtcustomdutyexp=<?php echo CUSTOMDUTY_EXP;?>;
|
|
$('#EditCustomDutyExpenses').val(txtcustomdutyexp);
|
|
//txtrmc=txtpurchaserate+txtcustomdutyexp;
|
|
txtrmc=<?php echo RMC_CAL;?>;
|
|
$('#EditRMCIncludingCustomers').val(txtrmc);
|
|
total=<?php echo CALCULATE_TOTAL;?>;
|
|
$('#EditTotalExp').val(basicprice);
|
|
|
|
}
|
|
|
|
|
|
//index = parseInt(index)+1;
|
|
|
|
function ExceedQuantityCheck()
|
|
{
|
|
// RequistQuantity
|
|
var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val());
|
|
var ReqQuantity = parseFloat(RequistQuantity);
|
|
if(EnterQuantity > ReqQuantity)
|
|
{
|
|
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
|
//$('#Quantity').val(RequistQuantity);
|
|
$('#Quantity').focus();
|
|
return false;
|
|
}
|
|
else{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
var avalbudAmte= <?php echo json_encode($AvlAmount, JSON_PRETTY_PRINT) ?>;
|
|
function validateEditExceedLimit()
|
|
{
|
|
//var avalbudAmt = parseFloat($('#EditAvlBudAmt').val());
|
|
var basicAmountRate = parseFloat($('#EdittxtBasicValue').val());
|
|
var totalAmount = parseFloat($('#EditTotalExp').val());
|
|
var exchangerate=parseFloat($('#EditExchangeRt').val());
|
|
var exp=0;
|
|
exp=basicAmountRate*exchangerate;
|
|
//console.log(exp);
|
|
|
|
if(exp > avalbudAmte || totalAmount > avalbudAmte)
|
|
{
|
|
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
|
$('#EditRate').focus();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var avalbudAmt= <?php echo json_encode($AvlAmount, JSON_PRETTY_PRINT) ?>;
|
|
function validateExceedLimit()
|
|
{
|
|
|
|
//alert('ddf');
|
|
//avalbudAmt = parseFloat($('#AvlBudAmt').val());
|
|
|
|
var basicAmountRate = parseFloat($('#txtBasicValue').val());
|
|
var totalAmount = parseFloat($('#TotalExp').val());
|
|
var exchangerate=parseFloat($('#ExchangeRt').val());
|
|
var exp=0;
|
|
exp=basicAmountRate*exchangerate;
|
|
//console.log(exp);
|
|
|
|
if(exp > avalbudAmt || totalAmount > avalbudAmt)
|
|
{
|
|
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
|
$('#Rate').focus();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$('.AddImport').click(function()
|
|
{
|
|
|
|
//alert('out');
|
|
// if(validateImport())
|
|
if(validateImport()&&ExceedQuantityCheck()&&validateExceedLimit())
|
|
{
|
|
//alert('in');
|
|
index = parseInt(index)+1;
|
|
|
|
var temp = index;
|
|
//alert(temp);
|
|
var Reqnumber = $('#ReqNo').val();
|
|
//alert(JSON.strigify(Reqnumber));
|
|
var departmentName =$('#deptName').val();
|
|
var AvilBudget = $('#AvlBudAmt').val();
|
|
var costCode = $('#CostCenter').val();
|
|
var materialCode =$('#MaterialCode').val();
|
|
var materialName = $("#ItemName").val();
|
|
var uom = $("#UOM").val();
|
|
var quantity = $("#Quantity").val();
|
|
var itemRate = $("#Rate").val();
|
|
var BasicAmt=parseFloat($("#txtBasicValue").val());
|
|
var taxamt=parseFloat($("#RMCIncludingCustomers").val());
|
|
var totalexp=parseFloat($("#TotalExp").val());
|
|
var Exchangerate=parseFloat($("#ExchangeRt").val());
|
|
var Basicpriceinus=parseFloat($("#imBasicPrice").val());
|
|
|
|
var BasicPrice=$("#BasicPriceTax").val();
|
|
var AfterBasicPrice=parseFloat($("#AfterBasicPriceTax").val());
|
|
var LandingChargee=$("#LandingCharge").val();
|
|
var AfterLandingChargee=$("#AfterLandingCharge").val();
|
|
var Highseass=$("#Highseas").val();
|
|
var AfterHighseass=$("#AfterHighseas").val();
|
|
//var AfterHighseass=($"#AfterHighseas").val();
|
|
var CustomDutyy=$("#Customduty").val();
|
|
var AfterCustomDutyy=$("#AfterCustomduty").val();
|
|
|
|
var ExciseDutyy=$("#ExcisedutyTax").val();
|
|
var AfterExciseDutyy=$("#AfterExcisedutyTax").val();
|
|
var ExciseDutyEd=$("#ExcisedutyEDcess").val();
|
|
var AfterExciseDutyEd=$("#AfterExcisedutyEDcess").val();
|
|
var ExciseDutySH=$("#ExcisedutySHcess").val();
|
|
var AfterExciseDutySH=$("#AfterExcisedutySHcess").val();
|
|
var CustomED=$("#CustomEDcess").val();
|
|
var AfterCustomED=$("#AfterCustomEDcess").val();
|
|
var CustomSH=$("#CustomSHcess").val();
|
|
var AfterCustomSH=$("#AfterCustomSHcess").val();
|
|
var AdditnlExcise=$("#AdditionalExciseduty").val();
|
|
var AfterAdditnlExcise=$("#AfterAdditionalExciseduty").val();
|
|
var GrossDuty=$("#Grossdutypayable").val();
|
|
var Avlmodvat=$("#AvailableModvat").val();
|
|
var Grossexpenseduetocustom=$("#Grossexpenses").val();
|
|
var PurchaseQuantity=$("#PurQuantity").val();
|
|
var purate=$("#purchaserate").val();
|
|
var CustomDutyExpense=$("#CustomDutyExpenses").val();
|
|
var RMCIncluderate=$("#RMCIncludingCustomers").val();
|
|
var receivedqty='';
|
|
var rejectedqty='';
|
|
var pendingqty='';
|
|
//console.log(AfterCustomED);
|
|
$('#MaterialCode option[value='+materialCode+']').remove();
|
|
|
|
|
|
$('#MaterialCode option[value='+materialCode+']').remove();
|
|
SelectedMaterialCode[CollIndex] = materialCode;
|
|
CollIndex = CollIndex + 1;
|
|
|
|
SelectedMaterialList.Mat.push({
|
|
"materialCode" : materialCode,
|
|
"ReqNo" : Reqnumber,
|
|
|
|
});
|
|
|
|
//index = parseInt(index)+1;
|
|
|
|
// populateValueMainFormForImportTax();
|
|
|
|
|
|
//alert('in');
|
|
var template = jQuery("#ImportList").html();
|
|
$('#ImportAppend').append(_.template(template,{index:temp,ReqNo:Reqnumber,Description:materialName,Quantity:quantity,UOM:uom,Rate:itemRate,BasicAmount:BasicAmt,Taxvalue:taxamt,TotalValue:totalexp,ReceivedQty:receivedqty,RejectedQty:rejectedqty,PendingQty:pendingqty}));
|
|
//alert(JSON.strigify(BasicAmt));
|
|
|
|
|
|
//$('#ImportAppend').append(_.template(template,{index:temp,ReqNo:Reqnumber,ItemName:materialName,Quantity:quantity,UOM:uom,Rate:itemRate,BasicAmount:BasicAmt,Taxvalue:taxamt,TotalValue:totalexp}));
|
|
//clearTaxField();
|
|
|
|
//from above defined variables
|
|
|
|
var theForm = $(".ImportPO");
|
|
|
|
addHidden(theForm,"Reqnumber"+temp,Reqnumber );
|
|
addHidden(theForm,"departmentName"+temp,departmentName );
|
|
addHidden(theForm,"AvlBudAmt"+temp,AvilBudget );
|
|
addHidden(theForm,"costCode"+temp,costCode );
|
|
addHidden(theForm,"materialCode"+temp,materialCode );
|
|
addHidden(theForm,"materialName"+temp,materialName );
|
|
addHidden(theForm,"uom"+temp,uom);
|
|
addHidden(theForm,"quantity"+temp,quantity);
|
|
addHidden(theForm,"itemRate"+temp,itemRate);
|
|
addHidden(theForm,"BasicAmt"+temp,BasicAmt);
|
|
addHidden(theForm,"taxamt"+temp,taxamt);
|
|
addHidden(theForm,"ExchangeRate"+temp,Exchangerate);
|
|
addHidden(theForm,"BasicPriceTax"+temp,BasicPriceTax);
|
|
addHidden(theForm,"BasicPriceinUS"+temp,Basicpriceinus);
|
|
addHidden(theForm,"AfterBasicPriceTax"+temp,AfterBasicPrice);
|
|
addHidden(theForm,"LandingCharge"+temp,LandingChargee);
|
|
addHidden(theForm,"AfterLandingCharge"+temp,AfterLandingChargee);
|
|
addHidden(theForm,"HighSeasSalesCharge"+temp,Highseass);
|
|
addHidden(theForm,"AfterHighSeasSalesCharge"+temp,AfterHighseass);
|
|
addHidden(theForm,"CustomDuty"+temp,CustomDutyy);
|
|
addHidden(theForm,"AfterCustomDuty"+temp,AfterCustomDutyy);
|
|
addHidden(theForm,"ExciseDuty"+temp,ExciseDutyy);
|
|
addHidden(theForm,"AfterExciseDuty"+temp,AfterExciseDutyy);
|
|
addHidden(theForm,"ExciseDutyEdCess"+temp,ExciseDutyEd);
|
|
addHidden(theForm,"AfterExciseDutyEdCess"+temp,AfterExciseDutyEd);
|
|
addHidden(theForm,"ExciseDutySHCess"+temp,ExciseDutySH);
|
|
addHidden(theForm,"AfterExciseDutySHCess"+temp,AfterExciseDutySH);
|
|
addHidden(theForm,"CustomEDcess"+temp,CustomED);
|
|
addHidden(theForm,"AfterCustomEDcess"+temp,AfterCustomED);
|
|
addHidden(theForm,"CustomSHCess"+temp,CustomSH);
|
|
addHidden(theForm,"AfterCustomSHCess"+temp,AfterCustomSH);
|
|
addHidden(theForm,"AddlExciseDuty"+temp,AdditnlExcise);
|
|
addHidden(theForm,"AfterAddlExciseDuty"+temp,AfterAdditnlExcise);
|
|
addHidden(theForm,"Grossdutypayable"+temp,GrossDuty);
|
|
addHidden(theForm,"Grossexpensesduetocustomduty"+temp,Grossexpenseduetocustom);
|
|
addHidden(theForm,"QuantityKG"+temp,PurchaseQuantity);
|
|
addHidden(theForm,"purchaseratePerKG"+temp,purate);
|
|
addHidden(theForm,"CustomDutyExpensesPerKG"+temp,CustomDutyExpense);
|
|
addHidden(theForm,"RMCIncludingCustomersPerKG"+temp,RMCIncluderate);
|
|
addHidden(theForm,"AvailableModvat"+temp,Avlmodvat);
|
|
addHidden(theForm,"TotalValue"+temp,totalexp);
|
|
|
|
//var a=parseFloat($('#CustomEDcess').val());
|
|
//console.log(a);
|
|
|
|
|
|
|
|
//addHidden(theForm,"TotalitemExp"+temp,TotalValue);
|
|
// alert(JSON.stringify(totalexp));
|
|
|
|
|
|
|
|
|
|
// addHidden(theForm,"AfterBasicPriceTax"+temp,AfterBasicPriceTax);
|
|
//addHidden(theForm,"AfterBasicPriceTax"+temp,AfterBasicPriceTax);
|
|
$('#txtRow').val(index);
|
|
var a=parseFloat($('#txtRow').val());
|
|
//alert(a)
|
|
populateValueMainFormForImportTax();
|
|
clearTaxField();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#viewimportmodal").on("shown.bs.modal", function(e) {
|
|
|
|
// alert();
|
|
userid = $(e.relatedTarget).data('userid');
|
|
//alert(userid);
|
|
//alert('inadd');
|
|
|
|
var tr= document.getElementById(userid);
|
|
//alert(tr);
|
|
var cellval = tr.cells;
|
|
//alert(cellval);
|
|
var id= $('#Reqnumber'+userid).val();
|
|
//alert(id);
|
|
//var a=$('#Reqnumber'+userid).val();
|
|
//alert(a)
|
|
$('#ViewReqNo').val($('#Reqnumber'+userid).val());
|
|
|
|
$('#ViewdeptName').val($('#departmentName'+userid).val());
|
|
$("#ViewCostCenter").val($('#costCode'+userid).val());
|
|
// $('#EditAvlBudAmt').val($('#AvilBudget'+userid).val());
|
|
|
|
$('#ViewItemName').val($('#materialName'+userid).val());
|
|
$('#ViewUOM').val($('#uom'+userid).val());
|
|
$('#ViewQuantity').val($('#quantity'+userid).val());
|
|
//$('#ViewExchangeRt').val($('#'))
|
|
//RequistQuantity = $('#quantity'+userid).val();
|
|
$('#ViewRate').val($('#itemRate'+userid).val());
|
|
$('#ViewtxtBasicValue').val($('#ProductPrice'+userid).val());
|
|
$('#ViewBasicPrice').val($("#BasicINRValue"+userid).val());
|
|
$('#ViewimBasicPrice').val($("#BasicPriceInMTon"+userid).val());
|
|
$('#ViewLandingCharge').val($("#LandingCharge"+userid).val());
|
|
$('#ViewAfterLandingCharge').val($("#AfterLandingCharge"+userid).val());
|
|
$('#ViewHighseas').val($("#HighSeasSalesCharge"+userid).val());
|
|
$('#ViewAfterHighseas').val($("#AfterHighSeasSalesCharge"+userid).val());
|
|
$('#ViewCustomduty').val($("#CustomDuty"+userid).val());
|
|
$('#ViewAfterCustomduty').val($("#AfterCustomDuty"+userid).val());
|
|
$('#ViewExcisedutyTax').val($("#ExciseDuty"+userid).val());
|
|
$('#ViewAfterExcisedutyTax').val($("#AfterExciseDuty"+userid).val());
|
|
$('#ViewExcisedutyEDcess').val($("#ExciseDutyEdCess"+userid).val());
|
|
$('#ViewAfterExcisedutyEDcess').val($("#AfterExciseDutyEdCess"+userid).val());
|
|
$('#ViewExcisedutySHcess').val($("#ExciseDutySHCess"+userid).val());
|
|
$('#ViewAfterExcisedutySHcess').val($("#AfterExciseDutySHCess"+userid).val());
|
|
|
|
$('#ViewCustomEDcess').val($("#CustomEdCess"+userid).val());
|
|
|
|
$('#ViewAfterCustomEDcess').val($("#AfterCustomEdCess"+userid).val());
|
|
$('#ViewCustomSHcess').val($("#CustomSHCess"+userid).val());
|
|
$('#ViewAfterCustomSHcess').val($("#AfterCustomSHCess"+userid).val());
|
|
$('#ViewAdditionalExciseduty').val($("#AddlExciseDuty"+userid).val());
|
|
$('#ViewAfterAdditionalExciseduty').val($("#AfterAddlExciseDuty"+userid).val());
|
|
$('#ViewGrossdutypayable').val($("#Grossdutypayable"+userid).val());
|
|
$('#ViewGrossexpenses').val($("#Grossexpensesduetocustomduty"+userid).val());
|
|
$('#ViewPurQuantity').val($("#QuantityKG"+userid).val());
|
|
$('#Viewpurchaserate').val($("#purchaseratePerKG"+userid).val());
|
|
$('#ViewCustomDutyExpenses').val($("#CustomDutyExpensesPerKG"+userid).val());
|
|
$('#ViewRMCIncludingCustomers').val($("#RMCIncludingCustomersPerKG"+userid).val());
|
|
$('#ViewAfterBasicPriceTax').val($("#BasicINRValue"+userid).val());
|
|
$('#ViewAvailableModvat').val($("#AvailableModvat"+userid).val());
|
|
$('#ViewTotalExp').val($("#TotalValue"+userid).val());
|
|
$('#ViewINRBasicvalue').val($("#BasicINRValue"+userid).val());
|
|
|
|
$('#ViewTotalOrderValue').val(cellval[6].innerHTML);
|
|
$("#ViewMaterialCode").empty();
|
|
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
|
$("#ViewMaterialCode").append( $('<option></option>').val($('#materialCode'+userid).val()).html($('#materialCode'+userid).val() + "-" + $('#materialName'+userid).val() ) );
|
|
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")
|
|
{
|
|
|
|
$("#EditMaterialCode").append( $('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
});
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
function validateImport()
|
|
{
|
|
//alert();
|
|
if($('#ReqNo').val() == "0")
|
|
{
|
|
alert('Please select the Requisition Number');
|
|
$('#ReqNo').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($('#Quantity').val() == '')
|
|
{
|
|
alert('Please Enter the Quantity value');
|
|
$('#Quantity').focus();
|
|
return false;
|
|
}
|
|
else if($('#Rate').val() == '')
|
|
{
|
|
alert('Please Enter the Rate of the Item');
|
|
$('#Rate').focus();
|
|
return false;
|
|
}
|
|
else if($('#imBasicPrice').val()=='')
|
|
{
|
|
alert('Please Enter Basic Price In Us');
|
|
$('#imBasicPrice').focus();
|
|
return false;
|
|
}
|
|
/* else if(ExceedQuantityCheck() == false)
|
|
{
|
|
return false;
|
|
}*/
|
|
else
|
|
return true;
|
|
}
|
|
|
|
|
|
function addHidden(theForm, key, value) {
|
|
// Create a hidden input element, and append it to the form:
|
|
var input = document.createElement('input');
|
|
input.type = 'hidden';
|
|
input.name = key;'name-as-seen-at-the-server';
|
|
input.id = key;'name-as-seen-at-the-server';
|
|
input.value = value;
|
|
theForm.append(input);
|
|
}
|
|
|
|
|
|
|
|
function populateValueMainFormForImportTax()
|
|
{
|
|
|
|
//$('#txtToatlOrder').val(parseFloat(TotalOrderValue)).toFixed(2);
|
|
//var Aft=$('#AfterLandingCharge').val();
|
|
//console.log(Aft);
|
|
var AfterLandingCharge= $('#AfterLandingCharge').val() == '' ? '0.00' : $('#AfterLandingCharge').val();
|
|
|
|
//console.log(AfterLandingCharge);
|
|
var AfterHighseas=$('#AfterHighseas').val()==''?'0.00':$('#AfterHighseas').val();
|
|
var AfterCustomduty=$('#AfterCustomduty').val()==''?'0.00':$('#AfterCustomduty').val();
|
|
var AfterExcisedutyTax=$('#AfterExcisedutyTax').val()==''?'0.00':$('#AfterExcisedutyTax').val();
|
|
var AfterExcisedutyEDcess=$('#AfterExcisedutyEDcess').val()==''?'0.00':$('#AfterExcisedutyEDcess').val();
|
|
var AfterExciseDutySH=$("#AfterExcisedutySHcess").val()==''?'0.00':$('#AfterExcisedutySHcess').val();
|
|
var AfterCustomEDcess=$('#AfterCustomEDcess').val()==''?'0.00':$('#AfterCustomEDcess').val();
|
|
var AfterCustomSHcess=$('#AfterCustomSHcess').val()==''?'0.00':$('#AfterCustomSHcess').val();
|
|
var AfterAdditionalExciseduty=$('#AfterAdditionalExciseduty').val()==''?'0.00':$('#AfterAdditionalExciseduty').val();
|
|
var Grossdutypayable=$('#Grossdutypayable').val()==''?'0.00':$('#Grossdutypayable').val();
|
|
var AvailableModvat=$('#AvailableModvat').val()==''?'0.00':$('#AvailableModvat').val();
|
|
var Grossexpenses=$('#Grossexpenses').val()==''?'0.00':$('#Grossexpenses').val();
|
|
var totalexp=$('#TotalExp').val()==''?'0.00':$('#TotalExp').val();
|
|
//var TotalLanding=$('#txttotallanding').val()==''?'0.00':$('#txttotallanding').val();
|
|
var TotalLanding=parseFloat($('#txttotallanding').val());
|
|
//alert(TotalLanding);
|
|
//console.log(TotalLanding);
|
|
var TotalHighseas=$('#txttotalhighseas').val()==''?'0.00':$('#txttotalhighseas').val();
|
|
var TotalCustom=$('#txttotalcustom').val()==''?'0.00':$('#txttotalcustom').val();
|
|
var TotalExcise=$('#txttotalexcise').val()==''?'0.00':$('#txttotalexcise').val();
|
|
var TotalExciseED=$('#txttotalexciseED').val()==''?'0.00':$('#txttotalexciseED').val();
|
|
var TotalExciseSH=$('#txttotalexciseSH').val()==''?'0.00':$('#txttotalexciseSH').val();
|
|
var TotalCustomED=$('#txttotalcustomED').val()==''?'0.00':$('#txttotalcustomED').val();
|
|
var TotalCustomSH=$('#txttotalcustomSH').val()==''?'0.00':$('#txttotalcustomSH').val();
|
|
var TotalAdditionalExcise=$('#txttotalAdditionalExciseduty').val()==''?'0.00':$('#txttotalAdditionalExciseduty').val();
|
|
var TotalGrossDuty=$('#txttotalgrossduty').val()==''?'0.00':$('#txttotalgrossduty').val();
|
|
var TotalAvlmodvat=$('#txttotalavlmodvat').val()==''?'0.00':$('#txttotalavlmodvat').val();
|
|
var TotalGrossExpense=$('#txttotalgrossexpense').val()==''?'0.00':$('#txttotalgrossexpense').val();
|
|
var TotalOrder=$('#txtToatlOrder').val()==''?'0.00':$('#txtToatlOrder').val();
|
|
|
|
|
|
$('#txttotallanding').val((parseFloat(AfterLandingCharge) + parseFloat(TotalLanding)).toFixed(2) );
|
|
$('#txttotalhighseas').val((parseFloat(TotalHighseas) + parseFloat(AfterHighseas)).toFixed(2) );
|
|
$('#txttotalcustom').val((parseFloat(TotalCustom) + parseFloat(AfterCustomduty)).toFixed(2) );
|
|
$('#txttotalexcise').val((parseFloat(TotalExcise) + parseFloat(AfterExcisedutyTax)).toFixed(2) );
|
|
$('#txttotalexciseED').val((parseFloat(TotalExciseED) + parseFloat(AfterExcisedutyEDcess)).toFixed(2) );
|
|
$('#txttotalexciseSH').val((parseFloat(TotalExciseSH) + parseFloat(AfterExciseDutySH)).toFixed(2) );
|
|
$('#txttotalcustomED').val((parseFloat(TotalCustomED) + parseFloat(AfterCustomEDcess)).toFixed(2) );
|
|
$('#txttotalcustomSH').val((parseFloat(TotalCustomSH) + parseFloat(AfterCustomSHcess)).toFixed(2) );
|
|
$('#txttotalAdditionalExciseduty').val((parseFloat(TotalAdditionalExcise) + parseFloat(AfterAdditionalExciseduty)).toFixed(2) );
|
|
$('#txttotalgrossduty').val((parseFloat(TotalGrossDuty) + parseFloat(Grossdutypayable)).toFixed(2) );
|
|
$('#txttotalavlmodvat').val((parseFloat(TotalAvlmodvat) + parseFloat(AvailableModvat)).toFixed(2) );
|
|
$('#txttotalgrossexpense').val((parseFloat(TotalGrossExpense) + parseFloat(Grossexpenses)).toFixed(2) );
|
|
$('#txtToatlOrder').val((parseFloat(TotalOrder) + parseFloat(totalexp)).toFixed(2) );
|
|
//var r=parseFloat($('#txtToatlOrder').val());
|
|
//console.log(r);
|
|
//var x=parseFloat($('#txttotalcustomED').val());
|
|
//console.log(x);
|
|
//alert(TotalOrder);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
function clearTaxField()
|
|
{
|
|
//$('#AfterBasicPriceTax').val('');
|
|
$('#AfterLandingCharge').val('');
|
|
$('#LandingCharge').val('');
|
|
$('#AfterHighseas').val('');
|
|
$('#Highseas').val('');
|
|
$('#AfterCustomduty').val('');
|
|
$('#Customduty').val('');
|
|
$('#AfterExcisedutyTax').val('');
|
|
$('#ExcisedutyTax').val('');
|
|
$('#AfterExcisedutyEDcess').val('');
|
|
$('#ExcisedutyEDcess').val('');
|
|
$('#AfterExcisedutySHcess').val('');
|
|
$('#ExcisedutySHcess').val('');
|
|
$('#AfterCustomEDcess').val('');
|
|
$('#CustomEDcess').val('');
|
|
$('#AfterCustomSHcess').val('')
|
|
$('#CustomSHcess').val('');
|
|
$('#AfterCustomSHcess').val('');
|
|
$('#AfterAdditionalExciseduty').val('');
|
|
$('#AdditionalExciseduty').val('');
|
|
$('#Grossdutypayable').val('');
|
|
$('#AvailableModvat').val('');
|
|
$('#Grossexpenses').val('');
|
|
$('#PurQuantity').val('');
|
|
$('#purchaserate').val('');
|
|
$('#CustomDutyExpenses').val('');
|
|
$('#RMCIncludingCustomers').val('');
|
|
}
|
|
|
|
|
|
$("#editimportpomodel").on("shown.bs.modal", function(e) {
|
|
userid = $(e.relatedTarget).data('userid');
|
|
//alert(userid);
|
|
//alert('inadd');
|
|
|
|
var tr= document.getElementById(userid);
|
|
//alert(tr);
|
|
var cellval = tr.cells;
|
|
//alert(cellval);
|
|
var id= $('#Reqnumber'+userid).val();
|
|
//alert(id);
|
|
$('#EditReqNo').val($('#Reqnumber'+userid).val());
|
|
|
|
//alert($('#Reqnumber'+userid).val());
|
|
$('#EditdeptName').val($('#departmentName'+userid).val());
|
|
$("#EditCostCenter").val($('#costCode'+userid).val());
|
|
// $('#EditAvlBudAmt').val($('#AvilBudget'+userid).val());
|
|
|
|
$('#EditItemName').val($('#materialName'+userid).val());
|
|
$('#EditUOM').val($('#uom'+userid).val());
|
|
$('#EditQuantity').val($('#quantity'+userid).val());
|
|
|
|
//var uom=parseFloat($('#uom'+userid).val());
|
|
//console.log(uom);
|
|
//RequistQuantity = $('#quantity'+userid).val();
|
|
$('#EditRate').val($('#itemRate'+userid).val());
|
|
$('#EdittxtBasicValue').val($('#ProductPrice'+userid).val());
|
|
$('#EditBasicPrice').val($("#BasicINRValue"+userid).val());
|
|
$('#EditimBasicPrice').val($("#BasicPriceInMTon"+userid).val());
|
|
$('#EditLandingCharge').val($("#LandingCharge"+userid).val());
|
|
$('#EditAfterLandingCharge').val($("#AfterLandingCharge"+userid).val());
|
|
$('#EditHighseas').val($("#HighSeasSalesCharge"+userid).val());
|
|
$('#EditAfterHighseas').val($("#AfterHighSeasSalesCharge"+userid).val());
|
|
$('#EditCustomduty').val($("#CustomDuty"+userid).val());
|
|
$('#EditAfterCustomduty').val($("#AfterCustomDuty"+userid).val());
|
|
$('#EditExcisedutyTax').val($("#ExciseDuty"+userid).val());
|
|
$('#EditAfterExcisedutyTax').val($("#AfterExciseDuty"+userid).val());
|
|
$('#EditExcisedutyEDcess').val($("#ExciseDutyEdCess"+userid).val());
|
|
$('#EditAfterExcisedutyEDcess').val($("#AfterExciseDutyEdCess"+userid).val());
|
|
$('#EditExcisedutySHcess').val($("#ExciseDutySHCess"+userid).val());
|
|
$('#EditAfterExcisedutySHcess').val($("#AfterExciseDutySHCess"+userid).val());
|
|
|
|
$('#EditCustomEDcess').val($("#CustomEdCess"+userid).val());
|
|
//var x=parseFloat($('#EditCustomEDcess').val());
|
|
//console.log(x);
|
|
$('#EditAfterCustomEDcess').val($("#AfterCustomEdCess"+userid).val());
|
|
$('#EditCustomSHcess').val($("#CustomSHCess"+userid).val());
|
|
$('#EditAfterCustomSHcess').val($("#AfterCustomSHCess"+userid).val());
|
|
$('#EditAdditionalExciseduty').val($("#AddlExciseDuty"+userid).val());
|
|
$('#EditAfterAdditionalExciseduty').val($("#AfterAddlExciseDuty"+userid).val());
|
|
$('#EditGrossdutypayable').val($("#Grossdutypayable"+userid).val());
|
|
$('#EditGrossexpenses').val($("#Grossexpensesduetocustomduty"+userid).val());
|
|
$('#EditPurQuantity').val($("#QuantityKG"+userid).val());
|
|
$('#Editpurchaserate').val($("#purchaseratePerKG"+userid).val());
|
|
$('#EditCustomDutyExpenses').val($("#CustomDutyExpensesPerKG"+userid).val());
|
|
$('#EditRMCIncludingCustomers').val($("#RMCIncludingCustomersPerKG"+userid).val());
|
|
$('#EditAfterBasicPriceTax').val($("#BasicINRValue"+userid).val());
|
|
$('#EditAvailableModvat').val($("#AvailableModvat"+userid).val());
|
|
$('#EditTotalExp').val($("#TotalValue"+userid).val());
|
|
$('#EditINRBasicvalue').val($("#BasicINRValue"+userid).val());
|
|
|
|
$('#EditTotalOrderValue').val(cellval[6].innerHTML);
|
|
$("#EditMaterialCode").empty();
|
|
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
|
|
$("#EditMaterialCode").append( $('<option></option>').val($('#materialCode'+userid).val()).html($('#materialCode'+userid).val() + "-" + $('#materialName'+userid).val() ) );
|
|
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")
|
|
{
|
|
|
|
$("#EditMaterialCode").append( $('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
});
|
|
}
|
|
|
|
});
|
|
|
|
|
|
$('.EditImport').click(function(){
|
|
//alert('inside edit');
|
|
if(validateEditExceedLimit() && ExceedEditQuantityCheck())
|
|
{
|
|
var CostCode = $("#EditCostCenter").val();
|
|
var AvilBudget = $('#EditAvlBudAmt').val();
|
|
var editMaterialCode = $("#EditMaterialCode").val();
|
|
var edititemname = $("#EditItemName").val();
|
|
var editUOM = $('#EditUOM').val();
|
|
var editQuantity = $('#EditQuantity').val();
|
|
var itemRate = $("#EditRate").val();
|
|
var BasicValue=$("#EdittxtBasicValue").val();
|
|
var BasicUSPrice=$("#EditimBasicPrice").val();
|
|
var basicinr=$('#EditINRBasicvalue').val();
|
|
//console.log(basicinr);
|
|
//var BasicValue=$("#EdittxtBasicValue").val();
|
|
var BasicPrice=$("#EditBasicPriceTax").val();
|
|
var AfterBasicPrice=$("#EditAfterBasicPriceTax").val();
|
|
var Landingcharge=$("#EditLandingCharge").val();
|
|
var AfterLanding=$("#EditAfterLandingCharge").val();
|
|
var Highseass=$("#EditHighseas").val();
|
|
var AfterHighseas=$("#EditAfterHighseas").val();
|
|
var CustomDuty=$("#EditCustomduty").val();
|
|
var AfterCustomDuty=$("#EditAfterCustomduty").val();
|
|
var ExciseDuty=$("#EditExcisedutyTax").val();
|
|
var AfterExciseDuty=$("#EditAfterExcisedutyTax").val();
|
|
var ExciseEd=$("#EditExcisedutyEDcess").val();
|
|
var AfterExciseEd=$("#EditAfterExcisedutyEDcess").val();
|
|
var ExciseDutySH=$("#EditExcisedutySHcess").val();
|
|
var AfterExciseDutySH=$("#EditAfterExcisedutySHcess").val();
|
|
var CustomED=$("#EditCustomEDcess").val();
|
|
var AfterCustomED=$("#EditAfterCustomEDcess").val();
|
|
var CustomSH=$("#EditCustomSHcess").val();
|
|
var AfterCustomSH=$("#EditAfterCustomSHcess").val();
|
|
var AdditionalExciseduty=$("#EditAdditionalExciseduty ").val();
|
|
var AfterAdditionalExciseduty=$("#EditAfterAdditionalExciseduty").val();
|
|
var GrossDuty=$("#EditGrossdutypayable").val();
|
|
var AvailaleModvat=$("#EditAvailableModvat").val();
|
|
var GrossExpense=$("#EditGrossexpenses").val();
|
|
var PurchaseRate=$("#Editpurchaserate").val();
|
|
var Quantity=$("#EditPurQuantity").val();
|
|
var CustomDutyExpense=$("#EditCustomDutyExpenses").val();
|
|
var RMC=$("#EditRMCIncludingCustomers").val();
|
|
var TotalExp=$('#EdittxtBasicValue').val();
|
|
//alert(itemRate);
|
|
//console.log(GrossDuty);
|
|
|
|
|
|
var tr= document.getElementById(userid);
|
|
var cellval = tr.cells;
|
|
|
|
|
|
cellval[4].innerHTML = editQuantity;
|
|
cellval[5].innerHTML =editUOM;
|
|
cellval[6].innerHTML =itemRate;
|
|
cellval[7].innerHTML =BasicValue;
|
|
|
|
$('#materialCode'+userid).val(editMaterialCode);
|
|
$('#materialName'+userid).val(edititemname);
|
|
$('#uom'+userid).val(editUOM);
|
|
$('#quantity'+userid).val(editQuantity);
|
|
$('#itemRate'+userid).val(itemRate);
|
|
$('#ProductPrice'+userid).val(BasicValue);
|
|
$('#BasicAmt'+userid).val(BasicValue);
|
|
$('#BasicPriceInMTon'+userid).val(BasicUSPrice);
|
|
$('#BasicINRValue'+userid).val(basicinr);
|
|
|
|
$('#BasicPriceTax'+userid).val(BasicPrice);
|
|
$('#AfterBasicPriceTax'+userid).val(AfterBasicPrice);
|
|
$('#LandingCharge'+userid).val(Landingcharge);
|
|
$('#AfterLandingCharge'+userid).val(AfterLanding);
|
|
$('#HighSeasSalesCharge'+userid).val(Highseass);
|
|
$('#AfterHighSeasSalesCharge'+userid).val(AfterHighseas);
|
|
$('#CustomDuty'+userid).val(CustomDuty);
|
|
$('#AfterCustomDuty'+userid).val(AfterCustomDuty);
|
|
$('#ExciseDuty'+userid).val(ExciseDuty);
|
|
$('#AfterExciseDuty'+userid).val(AfterExciseDuty);
|
|
$('#ExciseDutyEdCess'+userid).val(ExciseEd);
|
|
$('#AfterExciseDutyEdCess'+userid).val(AfterExciseEd);
|
|
$('#ExciseDutySHCess'+userid).val(ExciseDutySH);
|
|
$('#AfterExciseDutySHCess'+userid).val(AfterExciseDutySH);
|
|
$('#CustomEdCess'+userid).val(CustomED);
|
|
$('#AfterCustomEdCess'+userid).val(AfterCustomED);
|
|
$('#CustomSHCess'+userid).val(CustomSH);
|
|
$('#AfterCustomSHCess'+userid).val(AfterCustomSH);
|
|
$('#AddlExciseDuty'+userid).val(AdditionalExciseduty);
|
|
$('#AfterAddlExciseDuty'+userid).val(AfterAdditionalExciseduty);
|
|
$('#Grossdutypayable'+userid).val(GrossDuty);
|
|
$('#Grossexpensesduetocustomduty'+userid).val(GrossExpense);
|
|
$('#purchaseratePerKG'+userid).val(PurchaseRate);
|
|
$('#QuantityKG'+userid).val(Quantity);
|
|
$('#CustomDutyExpensesPerKG'+userid).val(CustomDutyExpense);
|
|
$('#RMCIncludingCustomersPerKG'+userid).val(RMC);
|
|
$('#TotalValue'+userid).val(TotalExp);
|
|
$('#AvailableModvat'+userid).val(AvailaleModvat);
|
|
// var a=parseFloat($('#ProductPrice'+userid).val());
|
|
// console.log(a);
|
|
populateValueMainFormForEditImportTax();
|
|
}
|
|
|
|
|
|
|
|
} );
|
|
|
|
function populateValueMainFormForEditImportTax()
|
|
{
|
|
var rows =document.getElementById('ImportTax').rows.length;
|
|
var TotalLanding=0;
|
|
var TotalHighseas=0;
|
|
var TotalCustom=0;
|
|
var TotalExcise=0;
|
|
var TotalExciseED=0;
|
|
var TotalExciseSH=0;
|
|
var TotalCustomED=0;
|
|
var TotalCustomSH=0;
|
|
var TotalAdditionalExcise=0;
|
|
var TotalGrossDuty=0;
|
|
var TotalAvlmodvat=0;
|
|
var TotalGrossExpense=0;
|
|
var Totalvalue=0;
|
|
var TotalOrdervalue=0;
|
|
var i = 0;
|
|
var TotalRMC=0;
|
|
do{
|
|
i += 1;
|
|
var tr= document.getElementById(i);
|
|
if(tr != null)
|
|
{
|
|
cells = tr.getElementsByTagName('td');
|
|
var rowid = cells[0].innerHTML;
|
|
|
|
var AfterLandingCharge= $('#AfterLandingCharge'+rowid).val() == '' ? '0.00' : $('#AfterLandingCharge'+rowid).val();
|
|
//console.log(AfterLandingCharge);
|
|
var AfterHighseas=$('#AfterHighSeasSalesCharge'+rowid).val()==''?'0.00':$('#AfterHighSeasSalesCharge'+rowid).val();
|
|
var AfterCustomduty=$('#AfterCustomDuty'+rowid).val()==''?'0.00':$('#AfterCustomDuty'+rowid).val();
|
|
var AfterExcisedutyTax=$('#AfterExciseDuty'+rowid).val()==''?'0.00':$('#AfterExciseDuty'+rowid).val();
|
|
var AfterExcisedutyEDcess=$('#AfterExciseDutyEdCess'+rowid).val()==''?'0.00':$('#AfterExciseDutyEdCess'+rowid).val();
|
|
var AfterExciseDutySH=$('#AfterExciseDutySHCess'+rowid).val()==''?'0.00':$('#AfterExciseDutySHCess'+rowid).val();
|
|
var AfterAdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
|
|
var AfterCustomEDcess=$('#AfterCustomEdCess'+rowid).val()==''?'0.00':$('#AfterCustomEdCess'+rowid).val();
|
|
var AfterCustomSHcess=$('#AfterCustomSHCess'+rowid).val()==''?'0.00':$('#AfterCustomSHCess'+rowid).val();
|
|
//var AdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
|
|
var Grossdutypayable=$('#Grossdutypayable'+rowid).val()==''?'0.00':$('#Grossdutypayable'+rowid).val();
|
|
var AvailableModvat=$('#AvailableModvat'+rowid).val()==''?'0.00':$('#AvailableModvat'+rowid).val();
|
|
var Grossexpenses=$('#Grossexpensesduetocustomduty'+rowid).val()==''?'0.00':$('#Grossexpensesduetocustomduty'+rowid).val();
|
|
var Totalvalue=$('#TotalValue'+rowid).val()==''?'0.00':$('#TotalValue'+rowid).val();
|
|
//var RMC=$('#RMCIncludingCustomers'+rowid).val()==''?'0.00':$('#RMCIncludingCustomers'+rowid).val();
|
|
|
|
//console.log(Totalvalue);
|
|
// console.log(AfterHighseas);
|
|
// console.log(AfterCustomduty);
|
|
// console.log(AfterExcisedutyTax);
|
|
// console.log(AfterExcisedutyEDcess);
|
|
// console.log(AfterExciseDutySH);
|
|
// console.log(AfterAdditionalExciseduty);
|
|
// console.log(AfterCustomEDcess);
|
|
// console.log(AfterCustomSHcess);
|
|
//console.log(AfterAdditionalExciseduty);
|
|
// console.log(Grossdutypayable);
|
|
// console.log(AvailableModvat);
|
|
// console.log(Grossexpenses);
|
|
TotalLanding = parseFloat(TotalLanding) + parseFloat(AfterLandingCharge);
|
|
TotalHighseas = parseFloat(TotalHighseas) + parseFloat(AfterHighseas);
|
|
TotalCustom = parseFloat(TotalCustom) + parseFloat(AfterCustomduty);
|
|
TotalExcise = parseFloat(TotalExcise) + parseFloat(AfterExcisedutyTax);
|
|
TotalExciseED = parseFloat(TotalExciseED ) + parseFloat(AfterExcisedutyEDcess);
|
|
TotalExciseSH = parseFloat(TotalExciseSH) + parseFloat(AfterExciseDutySH);
|
|
TotalCustomED = parseFloat(TotalCustomED) + parseFloat(AfterCustomEDcess);
|
|
TotalCustomSH = parseFloat(TotalCustomSH ) + parseFloat(AfterCustomSHcess);
|
|
TotalAdditionalExcise = parseFloat(TotalAdditionalExcise ) + parseFloat(AfterAdditionalExciseduty);
|
|
TotalGrossDuty = parseFloat(TotalGrossDuty) + parseFloat(Grossdutypayable);
|
|
TotalAvlmodvat = parseFloat(TotalAvlmodvat ) + parseFloat(AvailableModvat);
|
|
TotalGrossExpense = parseFloat(TotalGrossExpense ) + parseFloat(Grossexpenses);
|
|
TotalOrdervalue=parseFloat(TotalOrdervalue)+parseFloat(Totalvalue);
|
|
|
|
|
|
//TotalRMC=parseFloat(TotalRMC)+parseFloat(RMC);
|
|
|
|
//console.log(Totalvalue);
|
|
|
|
}
|
|
|
|
|
|
}while (i < rows);
|
|
|
|
$('#txttotallanding').val(parseFloat(TotalLanding).toFixed(2));
|
|
$('#txttotalhighseas').val(parseFloat(TotalHighseas).toFixed(2));
|
|
$('#txttotalcustom').val(parseFloat(TotalCustom).toFixed(2));
|
|
$('#txttotalexcise').val(parseFloat(TotalExcise).toFixed(2));
|
|
$('#txttotalexciseED').val(parseFloat(TotalExciseED).toFixed(2));
|
|
$('#txttotalexciseSH').val(parseFloat(TotalExciseSH).toFixed(2));
|
|
$('#txttotalcustomED').val(parseFloat(TotalCustomED).toFixed(2));
|
|
$('#txttotalcustomSH').val(parseFloat(TotalCustomSH).toFixed(2));
|
|
$('#txttotalAdditionalExciseduty').val(parseFloat(TotalAdditionalExcise).toFixed(2));
|
|
$('#txttotalgrossduty').val(parseFloat(TotalGrossDuty).toFixed(2));
|
|
$('#txttotalavlmodvat').val(parseFloat(TotalAvlmodvat).toFixed(2));
|
|
$('#txttotalgrossexpense').val(parseFloat(TotalGrossExpense).toFixed(2));
|
|
$('#txtToatlOrder').val(parseFloat(TotalOrdervalue).toFixed(2));
|
|
$('#txttot').val(parseFloat(TotalOrdervalue).toFixed(2));
|
|
//var a=parseFloat($('#txttotallanding').val());
|
|
//console.log(a);
|
|
|
|
|
|
//$('#txttotallanding').val(parseFloat(TotalLanding).toFixed(2));
|
|
}
|
|
|
|
|
|
|
|
function DeleteRow(rowid)
|
|
{ //alert('Delete');
|
|
var DelRows = $('#txtDeletedRow').val();
|
|
var answer = confirm(" Do you want to delete the Item from the List?")
|
|
if (answer)
|
|
{
|
|
//alert('Confirm');
|
|
var td = document.getElementById(rowid);
|
|
td.parentNode.removeChild(td);
|
|
|
|
var removeItem = $('#materialCode'+rowid).val();
|
|
|
|
|
|
|
|
SelectedMaterialCode.splice( SelectedMaterialCode.indexOf('removeItem'), 1 );
|
|
$.each(SelectedMaterialList.Mat, function(i, el){
|
|
|
|
if (this.materialCode == removeItem){//Type = '';
|
|
SelectedMaterialList.Mat.splice(i, 1);
|
|
}
|
|
});
|
|
// alert(SelectedMaterialCode);
|
|
if(DelRows != '')
|
|
{
|
|
DelRows = DelRows + ":" + rowid;
|
|
}
|
|
else
|
|
{
|
|
DelRows= "0" + ":" + rowid;
|
|
}
|
|
$('#txtDeletedRow').val(DelRows);
|
|
populateValueMainFormForDeleteItem(rowid);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function populateValueMainFormForDeleteItem(rowid)
|
|
{
|
|
var TotalLanding=$('#txttotallanding').val();
|
|
var TotalHighseas=$('#txttotalhighseas').val();
|
|
var TotalCustom=$('#txttotalcustom').val();
|
|
var TotalExcise=$('#txttotalexcise').val();
|
|
var TotalExciseED=$('#txttotalexciseED').val();
|
|
var TotalExciseSH=$('#txttotalexciseSH').val();
|
|
var TotalCustomED=$('#txttotalcustomED').val();
|
|
var TotalCustomSH=$('#txttotalcustomSH').val();
|
|
var TotalAdditionalExcise=$('#txttotalAdditionalExciseduty').val();
|
|
var TotalGrossDuty=$('#txttotalgrossduty').val();
|
|
var TotalAvlmodvat=$('#txttotalavlmodvat').val();
|
|
var TotalGrossExpense=$('#txttotalgrossexpense').val();
|
|
var TotalOrderValue=$('#txtToatlOrder').val();
|
|
|
|
//console.log(TotalCustomED);
|
|
//die();
|
|
|
|
var AfterLandingCharge= $('#AfterLandingCharge'+rowid).val() == '' ? '0.00' : $('#AfterLandingCharge'+rowid).val();
|
|
var AfterHighseas=$('#AfterHighSeasSalesCharge'+rowid).val()==''?'0.00':$('#AfterHighSeasSalesCharge'+rowid).val();
|
|
var AfterCustomduty=$('#AfterCustomDuty'+rowid).val()==''?'0.00':$('#AfterCustomDuty'+rowid).val();
|
|
var AfterExcisedutyTax=$('#AfterExciseDuty'+rowid).val()==''?'0.00':$('#AfterExciseDuty'+rowid).val();
|
|
var AfterExcisedutyEDcess=$('#AfterExciseDutyEdCess'+rowid).val()==''?'0.00':$('#AfterExciseDutyEdCess'+rowid).val();
|
|
var AfterExciseDutySH=$('#AfterExciseDutySHCess'+rowid).val()==''?'0.00':$('#AfterExciseDutySHCess'+rowid).val();
|
|
var AfterAdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
|
|
var AfterCustomEDcess=$('#AfterCustomEdCess'+rowid).val()==''?'0.00':$('#AfterCustomEdCess'+rowid).val();
|
|
var AfterCustomSHcess=$('#AfterCustomSHCess'+rowid).val()==''?'0.00':$('#AfterCustomSHCess'+rowid).val();
|
|
var AdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
|
|
var Grossdutypayable=$('#Grossdutypayable'+rowid).val()==''?'0.00':$('#Grossdutypayable'+rowid).val();
|
|
var AvailableModvat=$('#AvailableModvat'+rowid).val()==''?'0.00':$('#AvailableModvat'+rowid).val();
|
|
var Grossexpenses=$('#Grossexpensesduetocustomduty'+rowid).val()==''?'0.00':$('#Grossexpensesduetocustomduty'+rowid).val();
|
|
//var =$('#TotalExp'+rowid).val()==''?'0.00':$('#TotalExp'+rowid).val();
|
|
|
|
//console.log(AfterCustomEDcess);
|
|
var totalExp=$('#TotalValue'+rowid).val()==''?'0.00':$('#TotalValue'+rowid).val();
|
|
|
|
TotalLanding = parseFloat(TotalLanding) - parseFloat(AfterLandingCharge);
|
|
TotalHighseas = parseFloat(TotalHighseas) - parseFloat(AfterHighseas);
|
|
TotalCustom = parseFloat(TotalCustom) - parseFloat(AfterCustomduty);
|
|
TotalExcise = parseFloat(TotalExcise) - parseFloat(AfterExcisedutyTax);
|
|
TotalExciseED = parseFloat(TotalExciseED ) - parseFloat(AfterExcisedutyEDcess);
|
|
TotalExciseSH = parseFloat(TotalExciseSH) - parseFloat(AfterExciseDutySH);
|
|
TotalCustomED = parseFloat(TotalCustomED) - parseFloat(AfterCustomEDcess);
|
|
TotalCustomSH = parseFloat(TotalCustomSH ) - parseFloat(AfterCustomSHcess);
|
|
TotalAdditionalExcise = parseFloat(TotalAdditionalExcise ) - parseFloat(AdditionalExciseduty);
|
|
TotalGrossDuty = parseFloat(TotalGrossDuty) - parseFloat(Grossdutypayable);
|
|
TotalAvlmodvat = parseFloat(TotalAvlmodvat ) - parseFloat(AvailableModvat);
|
|
TotalGrossExpense = parseFloat(TotalGrossExpense ) - parseFloat(Grossexpenses);
|
|
TotalOrderValue=parseFloat(TotalOrderValue)-parseFloat(totalExp);
|
|
|
|
$('#txttotallanding').val(parseFloat(TotalLanding).toFixed(2));
|
|
$('#txttotalhighseas').val(parseFloat(TotalHighseas).toFixed(2));
|
|
$('#txttotalcustom').val(parseFloat(TotalCustom).toFixed(2));
|
|
$('#txttotalexcise').val(parseFloat(TotalExcise).toFixed(2));
|
|
$('#txttotalexciseED').val(parseFloat(TotalExciseED).toFixed(2));
|
|
$('#txttotalexciseSH').val(parseFloat(TotalExciseSH).toFixed(2));
|
|
$('#txttotalcustomED').val(parseFloat(TotalCustomED).toFixed(2));
|
|
$('#txttotalcustomSH').val(parseFloat(TotalCustomSH).toFixed(2));
|
|
$('#txttotalAdditionalExciseduty').val(parseFloat(TotalAdditionalExcise).toFixed(2));
|
|
$('#txttotalgrossduty').val(parseFloat(TotalGrossDuty).toFixed(2));
|
|
$('#txttotalavlmodvat').val(parseFloat(TotalAvlmodvat).toFixed(2));
|
|
$('#txttotalgrossexpense').val(parseFloat(TotalGrossExpense).toFixed(2));
|
|
$('#txtToatlOrder').val(parseFloat(TotalOrderValue).toFixed(2));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Save(status)
|
|
{
|
|
//alert();
|
|
|
|
|
|
if(status == '0')
|
|
{
|
|
stat = '<?php echo PO_DRAFT; ?>';
|
|
}
|
|
else
|
|
{
|
|
stat = '<?php echo PO_CREATED; ?>';
|
|
}
|
|
|
|
$('#txtStatus').val(stat);
|
|
//var txtRowCount = $('#txtRowCount').val();
|
|
//var Row=$('#txtRow').val();
|
|
//alert(Row);
|
|
//exit();
|
|
var Row=$('#txtRow').val();
|
|
//alert(Row);
|
|
|
|
var txtDeletedRow = $('#txtDeletedRow').val();
|
|
//alert(Row);
|
|
//alert(txtRowCount);
|
|
//exit();
|
|
//var TotalOrder=$('#txtToatlOrder').val();
|
|
//alert(TotalOrder);
|
|
//exit();
|
|
if(validate())
|
|
{ //alert();
|
|
if(document.getElementById('ImportTax').rows.length <= 0)
|
|
{
|
|
|
|
alert('Please Select Line item to Create PO');
|
|
$('#Deliverydt').focus();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
//alert();
|
|
$('#content').loader('show');
|
|
$.ajax({
|
|
data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
|
|
|
|
//data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus,
|
|
type:"POST",
|
|
url:"<?php echo base_url() ?>purchaseorder/EditImportPurchaseOrder",
|
|
success:function(data) {
|
|
if(data)
|
|
{
|
|
$('#content').loader('hide');
|
|
alert(data);
|
|
$('#txtRowCount').val('');
|
|
$('#txtDeletedRow').val('');
|
|
//$('#SpcialInstruction').val('');
|
|
//$('#txtDeliveryAddress').val('');
|
|
window.location = "purchaseorderListing";
|
|
|
|
}
|
|
else
|
|
{
|
|
alert("Error");
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
$(function () {
|
|
//$("#revenueTax").DataTable();
|
|
$('#ImportTax').DataTable({
|
|
"paging": false,
|
|
"lengthChange": true,
|
|
"searching": false,
|
|
"ordering": false,
|
|
// "info": true,
|
|
"autoWidth": true
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|