import po changed

This commit is contained in:
venbatechnologies@gmail.com 2017-06-28 18:41:20 +05:30
parent 089671d6b3
commit ecc550ce10
5 changed files with 645 additions and 403 deletions

View File

@ -116,7 +116,9 @@ class purchaseorder extends BaseController
$this->global['pageTitle'] = 'Siddharth : Purchase order' ;
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
//$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
$data['Payment']=$this->purchaseorder_model->getSupplierPayment();
$SelectedReq = json_decode($this->input->post('txtReqNo'));
$Req = $SelectedReq->Req;
@ -237,6 +239,7 @@ class purchaseorder extends BaseController
endforeach;
$data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
$data['Payment']=$this->purchaseorder_model->getSupplierPayment();
/* Cost code from Requisition - Client Review Fix
Start here */
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
@ -266,6 +269,11 @@ class purchaseorder extends BaseController
$exRate=$Exc->ExchangeRate;
}
foreach ($data['POMaster'] as $TER)
{
$PAYTERM=$TER->PaymentTerms;
}
//print_r($exRate);
//$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
$data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate();
@ -300,19 +308,25 @@ class purchaseorder extends BaseController
// print_r($data);
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
$data['Currency']=$this->purchaseorder_model->GetCurrencytype();
// foreach($data['POMaster'] as $CUR)
// {
// //print_r($CUR->CurrencyType);
// $Currency=$CUR->Currency_Code;
// // $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
// }
// $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
// //print_r($data['CurrencyDetail']);
foreach($data['POMaster'] as $CUR)
{
//print_r($CUR->CurrencyType);
$Currency=$CUR->CurrencyType;
}
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
$data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
//print_r($data['PaymentTerms']);
foreach ($data['CurrencyDetail'] as $Detail)
{
$unicode=$Detail->FontCode2000;
}
//print_r($unicode);
$data['unicode']=$unicode;
$this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
$this->loadViews("editimportpo", $this->global, $data, NULL);
}
@ -920,8 +934,7 @@ public function importpoprint($PONO)
function addNewImportPurchaseOrder()
function addNewImportPurchaseOrder()
{//echo ("ggh");
$POdt =$this->input->post('PODate');
@ -961,9 +974,12 @@ public function importpoprint($PONO)
$Exchangerate=$this->input->post('ExchangeRate');
$ExchangeRateCalculatedon=$this->input->post('Exchangerateon');
$CurrencyType=$this->input->post('currencytype');
$PaymentTerms=$this->input->post('PaymentTerms');
$Payableat=$this->input->post('PayableAT');
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType);
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat);
//print_r($POList);
//die();
@ -1117,9 +1133,12 @@ $createddt='';
$comma_separated = explode(':', $DeletedRow);
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$updateddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentTerms');
$Payableat=$this->input->post('PayableAT');
// PO Master
// PO Master
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType );
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat);
//echo $PONO;
//echo $TotalOrder;
//print_r($POList);

View File

@ -439,11 +439,11 @@ function purchaseorderListing()
}
// This Method to get the Service PO Details for Edit the Item
function GetServicePurchaseOrder($PONO = '')
function GetServicePurchaseOrder($PONO = '')
{
$this->db->distinct();
$this->db->select('ReqNo,POMast.PONO,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,Stat.StatusCode,POMast.ExchangeRateCalculatedon,POMast.ExchangeRate,POMast.CurrencyType');
$this->db->select('ReqNo,POMast.PONO,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,Stat.StatusCode,POMast.ExchangeRateCalculatedon,POMast.ExchangeRate,POMast.CurrencyType,POMast.PaymentTerms,POMast.PayableAT');
$this->db->from('T_PurchaseOrder_Master POMast');
$this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID');
$this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status');
@ -563,8 +563,29 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '')
function GetCurrencyDetail($Currency='')
{
$subQuery='SELECT * from T_Currency_Details where CurrencyCode=?';
$subQuery='SELECT Currency_Code,Country_and_Currency,FontCode2000 from T_Currency_Details where Currency_Code=?';
$query=$this->db->query($subQuery,array($Currency));
//print_r($query);
return $query->result();
}
function GetPaymentTerms($PONO='')
{
$subQuery='SELECT PaymentTerms from T_PurchaseOrder_Master where PONO=?';
$query=$this->db->query($subQuery,array($PONO));
//print_r($query);
return $query->result();
}
function getSupplierPayment($Currency='')
{
$subQuery='select distinct PaymentTerms from T_SupplierDetailsN';
$query=$this->db->query($subQuery,array($Currency));
//print_r($this->db->last_query());
return $query->result();
}

View File

@ -3,14 +3,24 @@ $AvlAmount = 0;
$ReqType ='';
$Value='';
$EXCRATE=0;
//$Value="$";
//echo $ExchangeRate;
//echo $Currency;
//echo $unicode;
$Value=$unicode;
//echo $Value;
// foreach ($CurrencyDetail as $Detail)
// {
// $Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency;
// }
foreach ($CurrencyDetail as $Detail)
{
$Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency;
}
foreach ($PaymentTerms as $TER)
{
$Terms=$TER->PaymentTerms;
}
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$CurrentDate = $dt->format('Y-m-d');
@ -30,7 +40,7 @@ if(!empty($AvlBudAmt))
$AvlAmount = $AvlBudAmt;
}
//echo $AvlAmount;
//echo $AvlBudAmt;;
$CompanyAddress = '';
if(!empty($CompanyDetails))
@ -93,7 +103,10 @@ if(!empty($POMaster))
$PONO = $Req->PONO;
$ServiceDescription = $Req->ServiceDescription;
$ExchangeRate=$Req->ExchangeRate;
//echo "$ExchangeRate";
$ExchangeRateCalculatedon=$Req->ExchangeRateCalculatedon;
$PaymentTerms=$Req->PaymentTerms;
$PayableAT=$Req->PayableAT;
}
}
@ -144,7 +157,12 @@ if(!empty($POMaster))
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,
@ -206,8 +224,8 @@ if(!empty($POMaster))
<label>Currency Type</label>
<?php
//$options = array("0"=>$Cur);
$options = array("0"=>'Select Currency');
$options = array("0"=>$Cur);
//$options = array("0"=>'Select Currency');
//print_r( $options);
if(!empty($Currency))
@ -239,10 +257,7 @@ if(!empty($POMaster))
?>
</div>
</div> -->
<div class="col-md-12"><br/>
<a href="http://www.xe.com/" target="_blank"><u>Click here to check Today's Foreign Exchange value</u></a>
</div>
</div>
@ -286,15 +301,7 @@ if(!empty($POMaster))
?>
</div>
</div>
<div class="col-md-12">
<label>Exchange Rate On</label>
<div class="form-group">
<?php
$data = array('name' => 'Exchangerateon','value' => set_value('Exchangerateon',$ExchangeRateCalculatedon),'id'=>'Exchangerateon', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
echo form_input($data);
?>
</div>
</div>
</div>
@ -318,17 +325,7 @@ if(!empty($POMaster))
?>
</div>
</div>
<div class="col-md-12">
<!--<label>Exchange Rate </label>-->
<label><?php echo "Exchange Rate in $Value";?></label>
<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-12">
Basic value in INR :
@ -372,7 +369,37 @@ if(!empty($POMaster))
?>
</div>
<div class="col-md-12"><br/>
</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><?php echo "Exchange Rate $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>Purchase Order Date</label>
<div class="form-group">
<?php
@ -380,36 +407,27 @@ if(!empty($POMaster))
echo form_input($data);
?>
</div>
</div>
</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>
<div class="col-md-3">
<span for="payablefrom">Payable Terms</span>
<select class="form-control required" id="PaymentTerms" name="PaymentTerms">
<option value="Date of invoice" >Select Payment method</option>
<option value="Date of invoice" ><?php echo $Terms;?></option>
<!-- <option value=<?php echo $Deatail?> > Payment method</option> -->
<?php
if(!empty($payment))
{
foreach ($payment as $rl)
{
?>
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
<div class="col-md-3">
<!--<div class="col-md-3">
<span for="PayableAT">Payable AT</span>
<input type="text" class="form-control required" id="PayableAT" name="PayableAT">
</div>
@ -417,7 +435,28 @@ if(!empty($POMaster))
<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> -->
<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') ."&nbsp;&nbsp;". form_radio(array("name"=>"Payment", "id"=>"Before", "value"=>"0", 'checked'=>set_radio('Payment', '0', TRUE))); ?>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<?php echo form_label('After', 'After') ."&nbsp;&nbsp;". form_radio(array("name"=>"Payment", "id"=>"After", "value"=>"1", 'checked'=>set_radio('Payment', '1', FALSE))); ?>
</td>
</tr>
</div>
</div>
</div>
@ -576,7 +615,7 @@ if(!empty($POMaster))
</div>
<div class="col-md-2">
<!-- <label>Basic Amount </label>-->
<label><?php echo "Basic Value In $Value";?></label>
<p id=label2><label><?php echo "Basic Value In $Value";?></label></p>
<div class="form-group">
<?php
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
@ -1112,7 +1151,8 @@ if(!empty($POMaster))
</div>
</div>
<div class="col-md-2">
<label><?php echo "Basic Value In $Value";?></label>
<!-- <label><?php echo "Basic Value In";?></label>-->
<p id=label3><label><?php echo "Basic Value In $Value";?></label></p>
<div class="form-group">
<?php
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
@ -1817,8 +1857,8 @@ if(!empty($POMaster))
<div class="col-md-12">
<div class="col-md-12">
<label>Comments for Special Instructions :</label> <?php
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '3', 'cols' => '40' );
<label>Special Instructions :</label> <?php
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
echo form_textarea($data);
?>
</div>
@ -1845,7 +1885,29 @@ if(!empty($POMaster))
<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'),'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'),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
</div>
<div class="col-md-4">
<span>Status</span>
<?php
$options = array("0"=>'Select Status');
echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
?>
</div><br/>
</div>
</div>
</div>
</section>
@ -1889,7 +1951,7 @@ var NilType = '<?php echo NILTYPE;?>';
Mat: []
};
//$('#ExchangeRate').val(<?php echo $ExchangeRate;?>);
// $('#ExchangeRate').val(<?php echo $ExchangeRate;?>);
$('#EditAvlBudAmt').val(<?php echo $AvlAmount; ?>);
//var a=$('#ExchangeRate').val();
@ -1909,6 +1971,33 @@ var txtbasic=txtexchangerate*basicpriceinus;
$('#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;
document.getElementById("label1").innerHTML ='Exchange Rate in' +sign;
document.getElementById("label2").innerHTML ='Basic Value in '+sign;
document.getElementById("label3").innerHTML ='Basic Value in '+sign;
//alert(sign);
}
});
});
$('#drpSupplier').change(function() {
@ -1925,6 +2014,8 @@ $('#drpSupplier').change(function() {
if(obj.SupplierID === id)
{
$("#SupAddress").val(obj.Address);
$("#PayableAT").val(obj.PayableAT);
}
@ -3710,8 +3801,17 @@ if(validate())
});
});
var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
//console.log(Detail);
$.each(Detail, function (index, value)
{
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
} );
</script>

View File

@ -3,6 +3,7 @@ $AvlAmount = 0;
$ReqType ='';
$CompanyAddress = '';
$Value='';
$Value="&#6107;";
date_default_timezone_set('Australia/Melbourne');
@ -136,6 +137,8 @@ function vaildateBeforeOpenModal()
$('#ExchangeRate').focus();
return false;
}
else
{
return true;
@ -202,12 +205,7 @@ function vaildateBeforeOpenModal()
?>
</div>
<div class="col-md-12"><br/>
<a href="http://www.xe.com/" target="_blank"><u>Click here to check Today's Foreign Exchange value</u></a>
</div>
</div>
<div class="col-md-9">
<div class="col-md-4">
@ -241,17 +239,7 @@ function vaildateBeforeOpenModal()
?>
</div>
</div>
<div class="col-md-12">
<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>
<div class="col-md-4">
<div class="col-md-12">
@ -273,17 +261,7 @@ function vaildateBeforeOpenModal()
?>
</div>
</div>
<div class="col-md-12">
<!--<label>Exchange Rate </label>-->
<label><?php echo "Exchange Rate in $Value";?></label>
<div class="form-group">
<?php
$data = array('name' => 'ExchangeRate','value' => set_value('ExchangeRate'),'id'=>'ExchangeRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()');
echo form_input($data);
?>
</div>
</div>
<!-- <div class="col-md-12">
Basic value in INR :
@ -296,7 +274,7 @@ function vaildateBeforeOpenModal()
</div>-->
</div>
<div class="col-md-4">
<div class="col-md-12">
<div class="col-md-12">
<b><u>Select Delivery By</u></b><br/>
<tr>
@ -313,7 +291,7 @@ function vaildateBeforeOpenModal()
<label >Schedule </label>
<?php
$data = array('name' => 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
$data = array('name' => 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '4', 'cols' => '40');
echo Form_textarea($data);
?>
@ -327,7 +305,33 @@ function vaildateBeforeOpenModal()
?>
</div>
<div class="col-md-12"><br/>
</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">
<p id=label1> <label>Exchange Rate </label></p>
<div class="form-group">
<?php
$data = array('name' => 'ExchangeRate','value' => set_value('ExchangeRate'),'id'=>'ExchangeRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-3">
<label>Purchase Order Date</label>
<div class="form-group">
<?php
@ -335,36 +339,27 @@ function vaildateBeforeOpenModal()
echo form_input($data);
?>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12">
</div>
<div class="col-md-12">
<legend>Payment Details</legend>
<!-- Text input-->
<div class="col-md-3">
<span for="payablefrom">Payable Terms</span>
<div class="col-md-3">
<span for="payablefrom">Payable Terms</span>
<select class="form-control required" id="PaymentTerms" name="PaymentTerms">
<option value="Date of invoice" >Select Payment method</option>
<option value="Date of invoice" > Payment method</option>
<!-- <option value=<?php echo $Deatail?> > Payment method</option> -->
<?php
if(!empty($payment))
{
foreach ($payment as $rl)
{
?>
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
<div class="col-md-3">
<!--<div class="col-md-3">
<span for="PayableAT">Payable AT</span>
<input type="text" class="form-control required" id="PayableAT" name="PayableAT">
</div>
@ -372,7 +367,28 @@ function vaildateBeforeOpenModal()
<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> -->
<div class="col-md-3">
<span>Payable AT</span>
<?php
$data = array('name' => 'PayableAT','value' => set_value('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') ."&nbsp;&nbsp;". form_radio(array("name"=>"Payment", "id"=>"Before", "value"=>"0", 'checked'=>set_radio('Payment', '0', TRUE))); ?>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<?php echo form_label('After', 'After') ."&nbsp;&nbsp;". form_radio(array("name"=>"Payment", "id"=>"After", "value"=>"1", 'checked'=>set_radio('Payment', '1', FALSE))); ?>
</td>
</tr>
</div>
</div>
</div>
@ -516,7 +532,7 @@ function vaildateBeforeOpenModal()
</div>
<div class="col-md-2">
<!--<label>Basic Amount </label>-->
<label><?php echo "Basic Value In $Value";?></label>
<p id=label2> <label><?php echo "Basic Value In";?></label></p>
<div class="form-group">
<?php
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
@ -1052,7 +1068,7 @@ function vaildateBeforeOpenModal()
</div>
</div>
<div class="col-md-2">
<label><?php echo "Basic Value In $Value";?></label>
<p id=label3><label><?php echo "Basic Value In";?></label></p>
<div class="form-group">
<?php
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
@ -1616,7 +1632,7 @@ function vaildateBeforeOpenModal()
<div class="col-md-12">
<div class="col-md-12">
<label>Special Instructions :</label> <?php
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '3', 'cols' => '40' );
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
echo form_textarea($data);
?>
</div>
@ -1636,6 +1652,7 @@ function vaildateBeforeOpenModal()
</div>
<br/>
</div>
</div>
</div>
@ -1667,6 +1684,7 @@ function vaildateBeforeOpenModal()
<script type="text/javascript">
// for delivey date and scheduled
//alert();
$(document).ready(function () {
$('#Date').click(function () {
//for Date range selection
@ -1693,6 +1711,8 @@ var NilType = '<?php echo NILTYPE;?>';
Mat: []
};
$('#drpSupplier').change(function() {
var id = $('#drpSupplier').val();
@ -1708,10 +1728,13 @@ $('#drpSupplier').change(function() {
if(obj.SupplierID === id)
{
$("#SupAddress").val(obj.Address);
$("#PayableAT").val(obj.PayableAT);
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentTerms).html(obj.PaymentTerms) );
}
});
});
}
else
{
@ -1721,6 +1744,11 @@ $('#drpSupplier').change(function() {
});
// $('#PaymentTerms').change(function()
// {
// //alert();
// });
$('#currencytype').change(function(){
$('#ExchangeRate').val('');
@ -1833,7 +1861,7 @@ $("#txtBasicValue").val('');
if(id != '0')
{
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
// alert(Material);
for(i=0;i<Material.length;i++)
{
$.each(Material[i], function(idx, obj) {
@ -1855,6 +1883,26 @@ $("#txtBasicValue").val('');
});
$('#currencytype').change(function()
{//alert();
var id = $('#currencytype').val();
var symbol=<?php echo json_encode($Currency,JSON_PRETTY_PRINT)?>;
$.each(symbol,function(idx,obj)
{
if(obj.Currency_Code==id)
{
var sign=obj.FontCode2000;
//alert(sign);
document.getElementById("label1").innerHTML ='Exchange Rate in '+sign;
document.getElementById("label2").innerHTML ='Basic Value in '+sign;
document.getElementById("label3").innerHTML ='Basic Value in '+sign;
}
});
});
function USRate()
{
@ -2936,7 +2984,7 @@ function validateImport()
}
else if($('#MaterialCode').val() == "0")
{
alert('Please select the Material Code');
('Please select the Material Code');
$('#MaterialCode').focus();
return false;
}
@ -3587,6 +3635,18 @@ if(validate())
});
});
var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
//console.log(Detail);
$.each(Detail, function (index, value)
{
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
} );
</script>

View File

@ -1,265 +1,307 @@
<?php
$PONO = '';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$ServiceDescription = '';
$index=0;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->CompanyName;
$CompanyAddress = $CO->Address;
}
}
if(!empty($POItem))
{
foreach ($POItem as $PO)
{
$PONO = $PO->PONO;
$SuplierName = $PO->SupplierName;
$SuplierAddress = $PO->Address;
$DeliveryAddress = $PO->DeliveryAddress;
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
$Podt = $dt->format('d-m-Y');
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $dtDe->format('d-m-Y');
$ServiceDescription =$PO->ServiceDescription;
}
}
?>
<div><center>
<h2>IMPORT PURCHASE ORDER</h2>
<a style="color:#515151">PO NO:<?php echo $PONO?> </a></center>
</div>
<div align="right"> <?php echo $Podt?> </div>
<p>
<b style="color:#3c8dbc"><?php echo $CompanyName; ?></b><br/> <?php echo $CompanyAddress; ?></p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td>
<p><a style="color:#3c8dbc">Vendor Address : </a> <br/> <?php echo $SuplierName?> <br/><?php echo $SuplierAddress ?></p></td>
<td>
<p><a style="color:#3c8dbc">Delivery To :</a><br/> <?php echo $DeliveryAddress?><p></td></td>
<td><div align="right"> Delivery Date :<?php echo $DeliveryDate?></div></p>
</tr>
</table>
<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr style="background:#000;color:#fff;">
<th>#</th>
<th>Item and Description</th>
<th>Qty</th>
<th>Rate per unit</th>
<th>Basic Price</th>
<th>Landing Charge</th>
<th>High Seas Sales charge</th>
<th>Custom duty (A) </th>
<th>Excise duty (b)</th>
<th>Excise duty ED_cess (C)</th>
<th>Excise duty S & H cess (d) </th>
<th>Custom ED_cess (e)</th>
<th>Custom S & H cess (f)</th>
<th>Additional Excise duty (g)</th>
<th>Gross duty payable</th>
<th>Available Modvat-set-off on import(b + c + d + g)</th>
<th>Gross expenses due to custom duty</th>
<th>purchase rate </th>
<th>Quantity</th>
<th>Custom Duty Expenses</th>
<th>RMC Including Customers</th>
<th>Total Amount</th>
</tr>
<?php
if(!empty($POItem))
{
$BasicValue=0;
$ProductPrice = 0;
$AfterLandingCharge= 0;
$AfterHighSeasSalesCharge= 0;
$AfterCustomDuty = 0;
$AfterCustomEdCess = 0;
$AfterCustomSHCess = 0;
$AfterExciseDuty = 0;
$AfterExciseDutyEdCess = 0;
$ExciseDutySHCess = 0;
$AfterAddlExciseDuty = 0;
$Grossdutypayable = 0;
$AvailableModvat = 0;
$Grossexpensesduetocustomduty = 0;
$purchaseratePerKG=0;
$CustomDutyExpensesPerKG=0;
$RMCIncludingCustomersPerKG=0;
$AfterExciseDutySHCess=0;
$TotalOrderValue=0;
$index=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<tr>
<td><?php echo $index ; ?></td>
<td><?php echo $record->MaterialName ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2) ; ?></td>
<td align="right"><?php echo $record->AfterLandingCharge; ?></td>
<td align="right"><?php echo $record->AfterHighSeasSalesCharge ; ?></td>
<td align="right"><?php echo $record->AfterCustomDuty ; ?></td>
<td align="right"><?php echo $record->AfterExciseDuty ; ?></td>
<td align="right"><?php echo $record->AfterExciseDutyEdCess ; ?></td>
<td align="right"><?php echo $record->AfterExciseDutySHCess ; ?></td>
<td align="right"><?php echo $record->AfterCustomEdCess ; ?></td>
<td align="right"><?php echo $record->AfterCustomSHCess ; ?></td>
<td align="right"><?php echo $record->AfterAddlExciseDuty ; ?></td>
<td align="right"><?php echo $record->Grossdutypayable ; ?></td>
<td align="right"><?php echo $record->AvailableModvat ; ?></td>
<td align="right"><?php echo $record->Grossexpensesduetocustomduty ; ?></td>
<td align="right"><?php echo $record->purchaseratePerKG ; ?></td>
<td align="right"><?php echo $record->CustomDutyExpensesPerKG ; ?></td>
<td align="right"><?php echo $record->RMCIncludingCustomersPerKG ; ?></td>
<td align="right"><?php echo $record->QuantityKG ; ?></td>
<td align="right"><?php echo $record->TotalOrderValue; ?></td>
</tr>
<?php
$AfterLandingCharge= $AfterLandingCharge+$record->AfterLandingCharge;
$AfterHighSeasSalesCharge=$AfterHighSeasSalesCharge+$record->AfterHighSeasSalesCharge ;
$AfterCustomDuty = $AfterCustomDuty+$record->AfterCustomDuty ;
$AfterCustomEdCess = $AfterCustomEdCess+$record->AfterCustomEdCess ;
$AfterCustomSHCess = $AfterCustomSHCess+$record->AfterCustomSHCess ;
$AfterExciseDuty = $AfterExciseDuty+$record->AfterExciseDuty ;
$AfterExciseDutyEdCess = $AfterExciseDutyEdCess+$record->AfterExciseDutyEdCess ;
$AfterAddlExciseDuty = $AfterAddlExciseDuty+$record->AfterAddlExciseDuty ;
$Grossdutypayable = $Grossdutypayable+$record->Grossdutypayable ;
$AvailableModvat = $AvailableModvat+$record->AvailableModvat ;
$Grossexpensesduetocustomduty = $Grossexpensesduetocustomduty+$record->Grossexpensesduetocustomduty ;
$purchaseratePerKG = $purchaseratePerKG+$record->purchaseratePerKG ;
$CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ;
$RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ;
$AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ;
$TotalOrderValue = $TotalOrderValue+$record->TotalOrderValue;
}
}
?>
</table>
<div align="right">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td align="right">Landing charge :</td>
<td align="right"><?php echo number_format($AfterLandingCharge,2);?></td>
<br/>
</tr>
<tr>
<td align="right">High seas sales charge:</td>
<td align="right"><?php echo number_format($AfterHighSeasSalesCharge,2);?></td>
<br/>
</tr>
<tr>
<td align="right">Custom duty : </td>
<td align="right"><?php echo number_format($AfterCustomDuty,2);?></td>
</tr>
<tr>
<td align="right">Excise duty :</td>
<td align="right"><?php echo number_format($AfterExciseDuty,2);?></td>
</tr>
<tr>
<td align="right">Excise duty ED_cess : </td>
<td align="right"><?php echo number_format($AfterExciseDutyEdCess,2);?></td>
</tr>
<tr>
<td align="right">Excise duty S & H cess :</td>
<td align="right"><?php echo number_format($AfterExciseDutySHCess,2);?></td>
</tr>
<tr>
<td align="right">Custom ED_cess : </td>
<td align="right"><?php echo number_format($AfterCustomEdCess,2);?></td>
</tr>
<tr>
<td align="right">Custom S & H cess :</td>
<td align="right"><?php echo number_format($AfterCustomSHCess,2);?></td>
</tr>
<tr>
<td align="right">Additional Excise duty :</td>
<td align="right"><?php echo number_format($AfterAddlExciseDuty,2);?></td>
</tr>
<tr>
<td align="right">Gross duty payable :</td>
<td align="right"><?php echo number_format($Grossdutypayable,2);?></td>
</tr>
<tr>
<td align="right">Available Modvat set-off on import :</td>
<td align="right"><?php echo number_format($AvailableModvat,2);?></td>
</tr>
<tr>
<td align="right">Gross expenses due to custom duty :</td>
<td align="right"><?php echo number_format($Grossexpensesduetocustomduty ,2);?></td>
</tr>
<tr>
<td align="right">Purchase Rate :</td>
<td align="right"><?php echo number_format($purchaseratePerKG,2);?></td>
</tr>
<tr>
<td align="right">Custom Duty Expenses :</td>
<td align="right"><?php echo number_format($CustomDutyExpensesPerKG,2);?></td>
</tr>
<tr>
<td align="right">RMC Including Customers :</td>
<td align="right"><?php echo number_format($RMCIncludingCustomersPerKG ,2);?></td>
</tr>
<tr>
<td align="right"><p><b>Total Order Amount :</b></p></td>
<td align="right"><?php echo number_format($TotalOrderValue,2);?></td>
</tr>
</table>
<br>
<br>
</div>
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$ServiceDescription = '';
$index=0;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->CompanyName;
$CompanyAddress = $CO->Address;
}
}
if(!empty($POItem))
{
foreach ($POItem as $PO)
{
$ReqNo=$PO->ReqNo;
$PONO = $PO->PONO;
$postatus= $PO->Status;
$SuplierName = $PO->SupplierName;
$SuplierAddress = $PO->Address;
$DeliveryAddress = $PO->DeliveryAddress;
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
$Podt = $dt->format('d-m-Y');
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $dtDe->format('d-m-Y');
$ServiceDescription =$PO->ServiceDescription;
$CostCenterCode=$PO->CostCenterCode;
$ReqBy=$PO->Requestedby;
$PaymentTerms=$PO->PaymentTerms;
}
}
?>
<style>
@page { margin: 310px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -310px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div><center>
<h2>IMPORT PURCHASE ORDER</h2>
<a style="color:#515151">PO NO:<?php echo $PONO?> </a></center>
</div>
<?php
if ($postatus == 'ST026')
{}
else
{
echo '<div>Draft</div>';
}
?>
<div align="right"> <?php echo $Podt?> </div>
<p>
<b style="color:#3c8dbc"><?php echo $CompanyName; ?></b><br/> <?php echo $CompanyAddress; ?></p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td>
<a style="color:#3c8dbc">Vendor Address :</a> <br/> <?php echo $SuplierName?> <br/><?php echo $SuplierAddress ?>
</td>
<td>
<a style="color:#3c8dbc">Delivery To :</a><br/> <?php echo $DeliveryAddress?>
</td>
</td>
<td> <a style="color:#3c8dbc">Delivery Date :</a><br/><?php echo $DeliveryDate?>
</tr>
</table>
</div>
<div class="page">
<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="1" width="100%" >
<tr style="background:#000;color:#fff;">
<th>#</th>
<th>Item and Description</th>
<th>Qty</th>
<th>Rate per unit</th>
<th>Basic Price</th>
<th>Total Amount</th>
<!--<th>Landing Charge</th>
<th>High Seas Sales charge</th>
<th>Custom duty (A) </th>
<th>Excise duty (b)</th>
<th>Excise duty ED_cess (C)</th>
<th>Excise duty S & H cess (d) </th>
<th>Custom ED_cess (e)</th>
<th>Custom S & H cess (f)</th>
<th>Additional Excise duty (g)</th>
<th>Gross duty payable</th>
<th>Available Modvat-set-off on import(b + c + d + g)</th>
<th>Gross expenses due to custom duty</th>
<th>purchase rate </th>
<th>Quantity</th>
<th>Custom Duty Expenses</th>
<th>RMC Including Customers</th>
<th>Total Amount</th> -->
</tr>
<?php
if(!empty($POItem))
{
$BasicValue=0;
$ProductPrice = 0;
$AfterLandingCharge= 0;
$AfterHighSeasSalesCharge= 0;
$AfterCustomDuty = 0;
$AfterCustomEdCess = 0;
$AfterCustomSHCess = 0;
$AfterExciseDuty = 0;
$AfterExciseDutyEdCess = 0;
$ExciseDutySHCess = 0;
$AfterAddlExciseDuty = 0;
$Grossdutypayable = 0;
$AvailableModvat = 0;
$Grossexpensesduetocustomduty = 0;
$purchaseratePerKG=0;
$CustomDutyExpensesPerKG=0;
$RMCIncludingCustomersPerKG=0;
$AfterExciseDutySHCess=0;
$TotalOrderValue=0;
$index=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<tr>
<td><?php echo $index ; ?></td>
<td><?php echo $record->MaterialName ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2) ; ?></td>
<td align="right"><?php echo $record->TotalOrderValue; ?></td>
<!--<td align="right"><?php echo $record->AfterLandingCharge; ?></td>
<td align="right"><?php echo $record->AfterHighSeasSalesCharge ; ?></td>
<td align="right"><?php echo $record->AfterCustomDuty ; ?></td>
<td align="right"><?php echo $record->AfterExciseDuty ; ?></td>
<td align="right"><?php echo $record->AfterExciseDutyEdCess ; ?></td>
<td align="right"><?php echo $record->AfterExciseDutySHCess ; ?></td>
<td align="right"><?php echo $record->AfterCustomEdCess ; ?></td>
<td align="right"><?php echo $record->AfterCustomSHCess ; ?></td>
<td align="right"><?php echo $record->AfterAddlExciseDuty ; ?></td>
<td align="right"><?php echo $record->Grossdutypayable ; ?></td>
<td align="right"><?php echo $record->AvailableModvat ; ?></td>
<td align="right"><?php echo $record->Grossexpensesduetocustomduty ; ?></td>
<td align="right"><?php echo $record->purchaseratePerKG ; ?></td>
<td align="right"><?php echo $record->CustomDutyExpensesPerKG ; ?></td>
<td align="right"><?php echo $record->RMCIncludingCustomersPerKG ; ?></td>
<td align="right"><?php echo $record->QuantityKG ; ?></td>
<td align="right"><?php echo $record->TotalOrderValue; ?></td> -->
</tr>
<?php
$AfterLandingCharge= $AfterLandingCharge+$record->AfterLandingCharge;
$AfterHighSeasSalesCharge=$AfterHighSeasSalesCharge+$record->AfterHighSeasSalesCharge ;
$AfterCustomDuty = $AfterCustomDuty+$record->AfterCustomDuty ;
$AfterCustomEdCess = $AfterCustomEdCess+$record->AfterCustomEdCess ;
$AfterCustomSHCess = $AfterCustomSHCess+$record->AfterCustomSHCess ;
$AfterExciseDuty = $AfterExciseDuty+$record->AfterExciseDuty ;
$AfterExciseDutyEdCess = $AfterExciseDutyEdCess+$record->AfterExciseDutyEdCess ;
$AfterAddlExciseDuty = $AfterAddlExciseDuty+$record->AfterAddlExciseDuty ;
$Grossdutypayable = $Grossdutypayable+$record->Grossdutypayable ;
$AvailableModvat = $AvailableModvat+$record->AvailableModvat ;
$Grossexpensesduetocustomduty = $Grossexpensesduetocustomduty+$record->Grossexpensesduetocustomduty ;
$purchaseratePerKG = $purchaseratePerKG+$record->purchaseratePerKG ;
$CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ;
$RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ;
$AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ;
$TotalOrderValue = $TotalOrderValue+$record->TotalOrderValue;
}
}
?>
</table>
<div align="right">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<!--<tr>
<td align="right">Landing charge :</td>
<td align="right"><?php echo number_format($AfterLandingCharge,2);?></td>
<br/>
</tr>
<tr>
<td align="right">High seas sales charge:</td>
<td align="right"><?php echo number_format($AfterHighSeasSalesCharge,2);?></td>
<br/>
</tr>
<tr>
<td align="right">Custom duty : </td>
<td align="right"><?php echo number_format($AfterCustomDuty,2);?></td>
</tr>
<tr>
<td align="right">Excise duty :</td>
<td align="right"><?php echo number_format($AfterExciseDuty,2);?></td>
</tr>
<tr>
<td align="right">Excise duty ED_cess : </td>
<td align="right"><?php echo number_format($AfterExciseDutyEdCess,2);?></td>
</tr>
<tr>
<td align="right">Excise duty S & H cess :</td>
<td align="right"><?php echo number_format($AfterExciseDutySHCess,2);?></td>
</tr>
<tr>
<td align="right">Custom ED_cess : </td>
<td align="right"><?php echo number_format($AfterCustomEdCess,2);?></td>
</tr>
<tr>
<td align="right">Custom S & H cess :</td>
<td align="right"><?php echo number_format($AfterCustomSHCess,2);?></td>
</tr>
<tr>
<td align="right">Additional Excise duty :</td>
<td align="right"><?php echo number_format($AfterAddlExciseDuty,2);?></td>
</tr>
<tr>
<td align="right">Gross duty payable :</td>
<td align="right"><?php echo number_format($Grossdutypayable,2);?></td>
</tr>
<tr>
<td align="right">Available Modvat set-off on import :</td>
<td align="right"><?php echo number_format($AvailableModvat,2);?></td>
</tr>
<tr>
<td align="right">Gross expenses due to custom duty :</td>
<td align="right"><?php echo number_format($Grossexpensesduetocustomduty ,2);?></td>
</tr>
<tr>
<td align="right">Purchase Rate :</td>
<td align="right"><?php echo number_format($purchaseratePerKG,2);?></td>
</tr>
<tr>
<td align="right">Custom Duty Expenses :</td>
<td align="right"><?php echo number_format($CustomDutyExpensesPerKG,2);?></td>
</tr>
<tr>
<td align="right">RMC Including Customers :</td>
<td align="right"><?php echo number_format($RMCIncludingCustomersPerKG ,2);?></td>
</tr>
--><tr>
<td align="right"><p><b>Total Order Amount </b></p></td>
<td align="right"><?php echo number_format($TotalOrderValue,2);?></td>
</tr>
</table>
<!-- table to show req detail , Data should come from DB , now i am hard coded the data-->
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td>Requition Number :<br/><?php echo $ReqNo;?></td>
<td>Requested by :<br/><?php echo $ReqBy;?></td>
<!--<td>Requisted Department :<br/>Store</td>-->
<td>Cost center :<br/><?php echo $CostCenterCode?></td>
</tr>
</table>
</div>
<!-- This day should comes from po it is editable in po screen-->
<div> Payment Terms *<br/><?php echo $PaymentTerms;?></div>
</div>