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

@ -117,6 +117,8 @@ class purchaseorder extends BaseController
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006'); $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018'); $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')); $SelectedReq = json_decode($this->input->post('txtReqNo'));
$Req = $SelectedReq->Req; $Req = $SelectedReq->Req;
@ -237,6 +239,7 @@ class purchaseorder extends BaseController
endforeach; endforeach;
$data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray); $data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
$data['Suplist'] = $this->purchaseorder_model->getSupplierName(); $data['Suplist'] = $this->purchaseorder_model->getSupplierName();
$data['Payment']=$this->purchaseorder_model->getSupplierPayment();
/* Cost code from Requisition - Client Review Fix /* Cost code from Requisition - Client Review Fix
Start here */ Start here */
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray); $ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
@ -266,6 +269,11 @@ class purchaseorder extends BaseController
$exRate=$Exc->ExchangeRate; $exRate=$Exc->ExchangeRate;
} }
foreach ($data['POMaster'] as $TER)
{
$PAYTERM=$TER->PaymentTerms;
}
//print_r($exRate); //print_r($exRate);
//$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate(); //$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
$data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate(); $data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate();
@ -301,18 +309,24 @@ class purchaseorder extends BaseController
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO); $data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
$data['Currency']=$this->purchaseorder_model->GetCurrencytype(); $data['Currency']=$this->purchaseorder_model->GetCurrencytype();
// foreach($data['POMaster'] as $CUR)
// {
// //print_r($CUR->CurrencyType); foreach($data['POMaster'] as $CUR)
// $Currency=$CUR->Currency_Code; {
//print_r($CUR->CurrencyType);
$Currency=$CUR->CurrencyType;
// // $data[$Rate->ExchangeRate]=$Rate->ExchangeRate; }
// } // $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
// $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency); $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
// //print_r($data['CurrencyDetail']); $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->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
$this->loadViews("editimportpo", $this->global, $data, NULL); $this->loadViews("editimportpo", $this->global, $data, NULL);
} }
@ -920,8 +934,7 @@ public function importpoprint($PONO)
function addNewImportPurchaseOrder()
function addNewImportPurchaseOrder()
{//echo ("ggh"); {//echo ("ggh");
$POdt =$this->input->post('PODate'); $POdt =$this->input->post('PODate');
@ -961,9 +974,12 @@ public function importpoprint($PONO)
$Exchangerate=$this->input->post('ExchangeRate'); $Exchangerate=$this->input->post('ExchangeRate');
$ExchangeRateCalculatedon=$this->input->post('Exchangerateon'); $ExchangeRateCalculatedon=$this->input->post('Exchangerateon');
$CurrencyType=$this->input->post('currencytype'); $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); //print_r($POList);
//die(); //die();
@ -1117,9 +1133,12 @@ $createddt='';
$comma_separated = explode(':', $DeletedRow); $comma_separated = explode(':', $DeletedRow);
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$updateddt = $dt->format('Y-m-d H:i:s'); $updateddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentTerms');
$Payableat=$this->input->post('PayableAT');
// PO Master // PO Master
// 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 $PONO;
//echo $TotalOrder; //echo $TotalOrder;
//print_r($POList); //print_r($POList);

View File

@ -439,11 +439,11 @@ function purchaseorderListing()
} }
// This Method to get the Service PO Details for Edit the Item // This Method to get the Service PO Details for Edit the Item
function GetServicePurchaseOrder($PONO = '')
function GetServicePurchaseOrder($PONO = '')
{ {
$this->db->distinct(); $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->from('T_PurchaseOrder_Master POMast');
$this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID'); $this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID');
$this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status'); $this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status');
@ -563,8 +563,29 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '')
function GetCurrencyDetail($Currency='') 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)); $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(); return $query->result();
} }

View File

@ -3,14 +3,24 @@ $AvlAmount = 0;
$ReqType =''; $ReqType ='';
$Value=''; $Value='';
$EXCRATE=0; $EXCRATE=0;
//$Value="$";
//echo $ExchangeRate; //echo $ExchangeRate;
//echo $Currency; //echo $Currency;
//echo $unicode;
$Value=$unicode;
//echo $Value;
// foreach ($CurrencyDetail as $Detail) foreach ($CurrencyDetail as $Detail)
// { {
// $Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency; $Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency;
// } }
foreach ($PaymentTerms as $TER)
{
$Terms=$TER->PaymentTerms;
}
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$CurrentDate = $dt->format('Y-m-d'); $CurrentDate = $dt->format('Y-m-d');
@ -30,7 +40,7 @@ if(!empty($AvlBudAmt))
$AvlAmount = $AvlBudAmt; $AvlAmount = $AvlBudAmt;
} }
//echo $AvlAmount; //echo $AvlBudAmt;;
$CompanyAddress = ''; $CompanyAddress = '';
if(!empty($CompanyDetails)) if(!empty($CompanyDetails))
@ -93,7 +103,10 @@ if(!empty($POMaster))
$PONO = $Req->PONO; $PONO = $Req->PONO;
$ServiceDescription = $Req->ServiceDescription; $ServiceDescription = $Req->ServiceDescription;
$ExchangeRate=$Req->ExchangeRate; $ExchangeRate=$Req->ExchangeRate;
//echo "$ExchangeRate";
$ExchangeRateCalculatedon=$Req->ExchangeRateCalculatedon; $ExchangeRateCalculatedon=$Req->ExchangeRateCalculatedon;
$PaymentTerms=$Req->PaymentTerms;
$PayableAT=$Req->PayableAT;
} }
} }
@ -145,6 +158,11 @@ if(!empty($POMaster))
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10' 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({ $("#Exchangerateon").datepicker({
minDate : m, minDate : m,
@ -206,8 +224,8 @@ if(!empty($POMaster))
<label>Currency Type</label> <label>Currency Type</label>
<?php <?php
//$options = array("0"=>$Cur); $options = array("0"=>$Cur);
$options = array("0"=>'Select Currency'); //$options = array("0"=>'Select Currency');
//print_r( $options); //print_r( $options);
if(!empty($Currency)) if(!empty($Currency))
@ -239,9 +257,6 @@ if(!empty($POMaster))
?> ?>
</div> </div>
</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>
@ -286,15 +301,7 @@ if(!empty($POMaster))
?> ?>
</div> </div>
</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> </div>
@ -318,17 +325,7 @@ if(!empty($POMaster))
?> ?>
</div> </div>
</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"> <!-- <div class="col-md-12">
Basic value in INR : Basic value in INR :
@ -372,7 +369,37 @@ if(!empty($POMaster))
?> ?>
</div> </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> <label>Purchase Order Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -381,35 +408,26 @@ if(!empty($POMaster))
?> ?>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<legend>Payment Details</legend> <legend>Payment Details</legend>
<!-- Text input--> <!-- 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"> <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 <?php
if(!empty($payment))
{
foreach ($payment as $rl)
{
?>
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
<?php
}
}
?> ?>
</select> </select>
</div> </div>
<div class="col-md-3"> <!--<div class="col-md-3">
<span for="PayableAT">Payable AT</span> <span for="PayableAT">Payable AT</span>
<input type="text" class="form-control required" id="PayableAT" name="PayableAT"> <input type="text" class="form-control required" id="PayableAT" name="PayableAT">
</div> </div>
@ -417,7 +435,28 @@ if(!empty($POMaster))
<div class="col-md-3"><span>Payment Date</span><br/> <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="Before">Before</label>
<label class="radio-inline"><input type="radio" name="Payment" value="After">After</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>
</div> </div>
@ -576,7 +615,7 @@ if(!empty($POMaster))
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<!-- <label>Basic Amount </label>--> <!-- <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"> <div class="form-group">
<?php <?php
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true'); //$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> </div>
<div class="col-md-2"> <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"> <div class="form-group">
<?php <?php
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true'); //$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">
<div class="col-md-12"> <div class="col-md-12">
<label>Comments for Special Instructions :</label> <?php <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); echo form_textarea($data);
?> ?>
</div> </div>
@ -1845,7 +1885,29 @@ if(!empty($POMaster))
<br/> <br/>
</div> </div>
</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>
</div> </div>
</section> </section>
@ -1889,7 +1951,7 @@ var NilType = '<?php echo NILTYPE;?>';
Mat: [] Mat: []
}; };
//$('#ExchangeRate').val(<?php echo $ExchangeRate;?>); // $('#ExchangeRate').val(<?php echo $ExchangeRate;?>);
$('#EditAvlBudAmt').val(<?php echo $AvlAmount; ?>); $('#EditAvlBudAmt').val(<?php echo $AvlAmount; ?>);
//var a=$('#ExchangeRate').val(); //var a=$('#ExchangeRate').val();
@ -1909,6 +1971,33 @@ var txtbasic=txtexchangerate*basicpriceinus;
$('#EditINRBasicvalue').val(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;
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() { $('#drpSupplier').change(function() {
@ -1925,6 +2014,8 @@ $('#drpSupplier').change(function() {
if(obj.SupplierID === id) if(obj.SupplierID === id)
{ {
$("#SupAddress").val(obj.Address); $("#SupAddress").val(obj.Address);
$("#PayableAT").val(obj.PayableAT);
} }
@ -3710,7 +3801,16 @@ 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> </script>

View File

@ -3,6 +3,7 @@ $AvlAmount = 0;
$ReqType =''; $ReqType ='';
$CompanyAddress = ''; $CompanyAddress = '';
$Value=''; $Value='';
$Value="&#6107;";
date_default_timezone_set('Australia/Melbourne'); date_default_timezone_set('Australia/Melbourne');
@ -136,6 +137,8 @@ function vaildateBeforeOpenModal()
$('#ExchangeRate').focus(); $('#ExchangeRate').focus();
return false; return false;
} }
else else
{ {
return true; return true;
@ -202,11 +205,6 @@ function vaildateBeforeOpenModal()
?> ?>
</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> </div>
<div class="col-md-9"> <div class="col-md-9">
@ -241,16 +239,6 @@ function vaildateBeforeOpenModal()
?> ?>
</div> </div>
</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>
<div class="col-md-4"> <div class="col-md-4">
@ -273,17 +261,7 @@ function vaildateBeforeOpenModal()
?> ?>
</div> </div>
</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"> <!-- <div class="col-md-12">
Basic value in INR : Basic value in INR :
@ -296,7 +274,7 @@ function vaildateBeforeOpenModal()
</div>--> </div>-->
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="col-md-12"> <div class="col-md-12">
<b><u>Select Delivery By</u></b><br/> <b><u>Select Delivery By</u></b><br/>
<tr> <tr>
@ -313,7 +291,7 @@ function vaildateBeforeOpenModal()
<label >Schedule </label> <label >Schedule </label>
<?php <?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); echo Form_textarea($data);
?> ?>
@ -327,7 +305,33 @@ function vaildateBeforeOpenModal()
?> ?>
</div> </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> <label>Purchase Order Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
@ -336,35 +340,26 @@ function vaildateBeforeOpenModal()
?> ?>
</div> </div>
</div> </div>
</div>
</div> </div>
<div class="col-md-12"> </div>
<div class="col-md-12">
<legend>Payment Details</legend> <legend>Payment Details</legend>
<!-- Text input--> <!-- 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"> <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 <?php
if(!empty($payment))
{
foreach ($payment as $rl)
{
?>
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
<?php
}
}
?> ?>
</select> </select>
</div> </div>
<div class="col-md-3"> <!--<div class="col-md-3">
<span for="PayableAT">Payable AT</span> <span for="PayableAT">Payable AT</span>
<input type="text" class="form-control required" id="PayableAT" name="PayableAT"> <input type="text" class="form-control required" id="PayableAT" name="PayableAT">
</div> </div>
@ -372,7 +367,28 @@ function vaildateBeforeOpenModal()
<div class="col-md-3"><span>Payment Date</span><br/> <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="Before">Before</label>
<label class="radio-inline"><input type="radio" name="Payment" value="After">After</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>
</div> </div>
@ -516,7 +532,7 @@ function vaildateBeforeOpenModal()
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<!--<label>Basic Amount </label>--> <!--<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"> <div class="form-group">
<?php <?php
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true'); //$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true');
@ -1052,7 +1068,7 @@ function vaildateBeforeOpenModal()
</div> </div>
</div> </div>
<div class="col-md-2"> <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"> <div class="form-group">
<?php <?php
//$data = array('name' => 'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true'); //$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">
<div class="col-md-12"> <div class="col-md-12">
<label>Special Instructions :</label> <?php <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); echo form_textarea($data);
?> ?>
</div> </div>
@ -1636,6 +1652,7 @@ function vaildateBeforeOpenModal()
</div> </div>
<br/> <br/>
</div> </div>
</div> </div>
</div> </div>
@ -1667,6 +1684,7 @@ function vaildateBeforeOpenModal()
<script type="text/javascript"> <script type="text/javascript">
// for delivey date and scheduled // for delivey date and scheduled
//alert();
$(document).ready(function () { $(document).ready(function () {
$('#Date').click(function () { $('#Date').click(function () {
//for Date range selection //for Date range selection
@ -1693,6 +1711,8 @@ var NilType = '<?php echo NILTYPE;?>';
Mat: [] Mat: []
}; };
$('#drpSupplier').change(function() { $('#drpSupplier').change(function() {
var id = $('#drpSupplier').val(); var id = $('#drpSupplier').val();
@ -1708,10 +1728,13 @@ $('#drpSupplier').change(function() {
if(obj.SupplierID === id) if(obj.SupplierID === id)
{ {
$("#SupAddress").val(obj.Address); $("#SupAddress").val(obj.Address);
$("#PayableAT").val(obj.PayableAT);
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentTerms).html(obj.PaymentTerms) );
} }
});
});
} }
else else
{ {
@ -1721,6 +1744,11 @@ $('#drpSupplier').change(function() {
}); });
// $('#PaymentTerms').change(function()
// {
// //alert();
// });
$('#currencytype').change(function(){ $('#currencytype').change(function(){
$('#ExchangeRate').val(''); $('#ExchangeRate').val('');
@ -1833,7 +1861,7 @@ $("#txtBasicValue").val('');
if(id != '0') if(id != '0')
{ {
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>; var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
// alert(Material);
for(i=0;i<Material.length;i++) for(i=0;i<Material.length;i++)
{ {
$.each(Material[i], function(idx, obj) { $.each(Material[i], function(idx, obj) {
@ -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() function USRate()
{ {
@ -2936,7 +2984,7 @@ function validateImport()
} }
else if($('#MaterialCode').val() == "0") else if($('#MaterialCode').val() == "0")
{ {
alert('Please select the Material Code'); ('Please select the Material Code');
$('#MaterialCode').focus(); $('#MaterialCode').focus();
return false; return false;
} }
@ -3588,5 +3636,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> </script>

View File

@ -2,6 +2,7 @@
$PONO = ''; $PONO = '';
$postatus ='';
$CompanyAddress = ''; $CompanyAddress = '';
$CompanyName = ''; $CompanyName = '';
$SuplierName = ''; $SuplierName = '';
@ -24,9 +25,12 @@
if(!empty($POItem)) if(!empty($POItem))
{ {
foreach ($POItem as $PO) foreach ($POItem as $PO)
{ {
$ReqNo=$PO->ReqNo;
$PONO = $PO->PONO; $PONO = $PO->PONO;
$postatus= $PO->Status;
$SuplierName = $PO->SupplierName; $SuplierName = $PO->SupplierName;
$SuplierAddress = $PO->Address; $SuplierAddress = $PO->Address;
$DeliveryAddress = $PO->DeliveryAddress; $DeliveryAddress = $PO->DeliveryAddress;
@ -36,230 +40,268 @@
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $dtDe->format('d-m-Y'); $DeliveryDate = $dtDe->format('d-m-Y');
$ServiceDescription =$PO->ServiceDescription; $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><center> ?>
<h2>IMPORT PURCHASE ORDER</h2> <div align="right"> <?php echo $Podt?> </div>
<a style="color:#515151">PO NO:<?php echo $PONO?> </a></center> <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>
<div align="right"> <?php echo $Podt?> </div> <div class="page">
<p> <table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="1" width="100%" >
<b style="color:#3c8dbc"><?php echo $CompanyName; ?></b><br/> <?php echo $CompanyAddress; ?></p> <tr style="background:#000;color:#fff;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%"> <th>#</th>
<tr> <th>Item and Description</th>
<td> <th>Qty</th>
<p><a style="color:#3c8dbc">Vendor Address : </a> <br/> <?php echo $SuplierName?> <br/><?php echo $SuplierAddress ?></p></td> <th>Rate per unit</th>
<td> <th>Basic Price</th>
<p><a style="color:#3c8dbc">Delivery To :</a><br/> <?php echo $DeliveryAddress?><p></td></td> <th>Total Amount</th>
<td><div align="right"> Delivery Date :<?php echo $DeliveryDate?></div></p> <!--<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>
</tr> <?php
</table> if(!empty($POItem))
{
<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="1" width="100%"> $BasicValue=0;
<tr style="background:#000;color:#fff;"> $ProductPrice = 0;
<th>#</th> $AfterLandingCharge= 0;
<th>Item and Description</th> $AfterHighSeasSalesCharge= 0;
<th>Qty</th> $AfterCustomDuty = 0;
<th>Rate per unit</th> $AfterCustomEdCess = 0;
<th>Basic Price</th> $AfterCustomSHCess = 0;
<th>Landing Charge</th> $AfterExciseDuty = 0;
<th>High Seas Sales charge</th> $AfterExciseDutyEdCess = 0;
<th>Custom duty (A) </th> $ExciseDutySHCess = 0;
<th>Excise duty (b)</th> $AfterAddlExciseDuty = 0;
<th>Excise duty ED_cess (C)</th> $Grossdutypayable = 0;
<th>Excise duty S & H cess (d) </th> $AvailableModvat = 0;
<th>Custom ED_cess (e)</th> $Grossexpensesduetocustomduty = 0;
<th>Custom S & H cess (f)</th> $purchaseratePerKG=0;
<th>Additional Excise duty (g)</th> $CustomDutyExpensesPerKG=0;
<th>Gross duty payable</th> $RMCIncludingCustomersPerKG=0;
<th>Available Modvat-set-off on import(b + c + d + g)</th> $AfterExciseDutySHCess=0;
<th>Gross expenses due to custom duty</th> $TotalOrderValue=0;
<th>purchase rate </th> $index=0;
<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) foreach($POItem as $record)
{ {
$index = $index + 1; $index = $index + 1;
?> ?>
<tr> <tr>
<td><?php echo $index ; ?></td> <td><?php echo $index ; ?></td>
<td><?php echo $record->MaterialName ; ?></td> <td><?php echo $record->MaterialName ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td> <td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td> <td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate); <td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2) ; ?></td> echo number_format($BasicValue,2) ; ?></td>
<td align="right"><?php echo $record->AfterLandingCharge; ?></td> <td align="right"><?php echo $record->TotalOrderValue; ?></td>
<td align="right"><?php echo $record->AfterHighSeasSalesCharge ; ?></td> <!--<td align="right"><?php echo $record->AfterLandingCharge; ?></td>
<td align="right"><?php echo $record->AfterCustomDuty ; ?></td> <td align="right"><?php echo $record->AfterHighSeasSalesCharge ; ?></td>
<td align="right"><?php echo $record->AfterExciseDuty ; ?></td> <td align="right"><?php echo $record->AfterCustomDuty ; ?></td>
<td align="right"><?php echo $record->AfterExciseDutyEdCess ; ?></td> <td align="right"><?php echo $record->AfterExciseDuty ; ?></td>
<td align="right"><?php echo $record->AfterExciseDutySHCess ; ?></td> <td align="right"><?php echo $record->AfterExciseDutyEdCess ; ?></td>
<td align="right"><?php echo $record->AfterCustomEdCess ; ?></td> <td align="right"><?php echo $record->AfterExciseDutySHCess ; ?></td>
<td align="right"><?php echo $record->AfterCustomSHCess ; ?></td> <td align="right"><?php echo $record->AfterCustomEdCess ; ?></td>
<td align="right"><?php echo $record->AfterAddlExciseDuty ; ?></td> <td align="right"><?php echo $record->AfterCustomSHCess ; ?></td>
<td align="right"><?php echo $record->Grossdutypayable ; ?></td> <td align="right"><?php echo $record->AfterAddlExciseDuty ; ?></td>
<td align="right"><?php echo $record->AvailableModvat ; ?></td> <td align="right"><?php echo $record->Grossdutypayable ; ?></td>
<td align="right"><?php echo $record->Grossexpensesduetocustomduty ; ?></td> <td align="right"><?php echo $record->AvailableModvat ; ?></td>
<td align="right"><?php echo $record->purchaseratePerKG ; ?></td> <td align="right"><?php echo $record->Grossexpensesduetocustomduty ; ?></td>
<td align="right"><?php echo $record->CustomDutyExpensesPerKG ; ?></td> <td align="right"><?php echo $record->purchaseratePerKG ; ?></td>
<td align="right"><?php echo $record->RMCIncludingCustomersPerKG ; ?></td> <td align="right"><?php echo $record->CustomDutyExpensesPerKG ; ?></td>
<td align="right"><?php echo $record->QuantityKG ; ?></td> <td align="right"><?php echo $record->RMCIncludingCustomersPerKG ; ?></td>
<td align="right"><?php echo $record->TotalOrderValue; ?></td> <td align="right"><?php echo $record->QuantityKG ; ?></td>
</tr> <td align="right"><?php echo $record->TotalOrderValue; ?></td> -->
</tr>
<?php <?php
$AfterLandingCharge= $AfterLandingCharge+$record->AfterLandingCharge; $AfterLandingCharge= $AfterLandingCharge+$record->AfterLandingCharge;
$AfterHighSeasSalesCharge=$AfterHighSeasSalesCharge+$record->AfterHighSeasSalesCharge ; $AfterHighSeasSalesCharge=$AfterHighSeasSalesCharge+$record->AfterHighSeasSalesCharge ;
$AfterCustomDuty = $AfterCustomDuty+$record->AfterCustomDuty ; $AfterCustomDuty = $AfterCustomDuty+$record->AfterCustomDuty ;
$AfterCustomEdCess = $AfterCustomEdCess+$record->AfterCustomEdCess ; $AfterCustomEdCess = $AfterCustomEdCess+$record->AfterCustomEdCess ;
$AfterCustomSHCess = $AfterCustomSHCess+$record->AfterCustomSHCess ; $AfterCustomSHCess = $AfterCustomSHCess+$record->AfterCustomSHCess ;
$AfterExciseDuty = $AfterExciseDuty+$record->AfterExciseDuty ; $AfterExciseDuty = $AfterExciseDuty+$record->AfterExciseDuty ;
$AfterExciseDutyEdCess = $AfterExciseDutyEdCess+$record->AfterExciseDutyEdCess ; $AfterExciseDutyEdCess = $AfterExciseDutyEdCess+$record->AfterExciseDutyEdCess ;
$AfterAddlExciseDuty = $AfterAddlExciseDuty+$record->AfterAddlExciseDuty ; $AfterAddlExciseDuty = $AfterAddlExciseDuty+$record->AfterAddlExciseDuty ;
$Grossdutypayable = $Grossdutypayable+$record->Grossdutypayable ; $Grossdutypayable = $Grossdutypayable+$record->Grossdutypayable ;
$AvailableModvat = $AvailableModvat+$record->AvailableModvat ; $AvailableModvat = $AvailableModvat+$record->AvailableModvat ;
$Grossexpensesduetocustomduty = $Grossexpensesduetocustomduty+$record->Grossexpensesduetocustomduty ; $Grossexpensesduetocustomduty = $Grossexpensesduetocustomduty+$record->Grossexpensesduetocustomduty ;
$purchaseratePerKG = $purchaseratePerKG+$record->purchaseratePerKG ; $purchaseratePerKG = $purchaseratePerKG+$record->purchaseratePerKG ;
$CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ; $CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ;
$RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ; $RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ;
$AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ; $AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ;
$TotalOrderValue = $TotalOrderValue+$record->TotalOrderValue; $TotalOrderValue = $TotalOrderValue+$record->TotalOrderValue;
} }
} }
?> ?>
</table> </table>
<div align="right"> <div align="right">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%"> <table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr> <!--<tr>
<td align="right">Landing charge :</td> <td align="right">Landing charge :</td>
<td align="right"><?php echo number_format($AfterLandingCharge,2);?></td> <td align="right"><?php echo number_format($AfterLandingCharge,2);?></td>
<br/> <br/>
</tr> </tr>
<tr> <tr>
<td align="right">High seas sales charge:</td> <td align="right">High seas sales charge:</td>
<td align="right"><?php echo number_format($AfterHighSeasSalesCharge,2);?></td> <td align="right"><?php echo number_format($AfterHighSeasSalesCharge,2);?></td>
<br/> <br/>
</tr> </tr>
<tr> <tr>
<td align="right">Custom duty : </td> <td align="right">Custom duty : </td>
<td align="right"><?php echo number_format($AfterCustomDuty,2);?></td> <td align="right"><?php echo number_format($AfterCustomDuty,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Excise duty :</td> <td align="right">Excise duty :</td>
<td align="right"><?php echo number_format($AfterExciseDuty,2);?></td> <td align="right"><?php echo number_format($AfterExciseDuty,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Excise duty ED_cess : </td> <td align="right">Excise duty ED_cess : </td>
<td align="right"><?php echo number_format($AfterExciseDutyEdCess,2);?></td> <td align="right"><?php echo number_format($AfterExciseDutyEdCess,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Excise duty S & H cess :</td> <td align="right">Excise duty S & H cess :</td>
<td align="right"><?php echo number_format($AfterExciseDutySHCess,2);?></td> <td align="right"><?php echo number_format($AfterExciseDutySHCess,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Custom ED_cess : </td> <td align="right">Custom ED_cess : </td>
<td align="right"><?php echo number_format($AfterCustomEdCess,2);?></td> <td align="right"><?php echo number_format($AfterCustomEdCess,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Custom S & H cess :</td> <td align="right">Custom S & H cess :</td>
<td align="right"><?php echo number_format($AfterCustomSHCess,2);?></td> <td align="right"><?php echo number_format($AfterCustomSHCess,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Additional Excise duty :</td> <td align="right">Additional Excise duty :</td>
<td align="right"><?php echo number_format($AfterAddlExciseDuty,2);?></td> <td align="right"><?php echo number_format($AfterAddlExciseDuty,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Gross duty payable :</td> <td align="right">Gross duty payable :</td>
<td align="right"><?php echo number_format($Grossdutypayable,2);?></td> <td align="right"><?php echo number_format($Grossdutypayable,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Available Modvat set-off on import :</td> <td align="right">Available Modvat set-off on import :</td>
<td align="right"><?php echo number_format($AvailableModvat,2);?></td> <td align="right"><?php echo number_format($AvailableModvat,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Gross expenses due to custom duty :</td> <td align="right">Gross expenses due to custom duty :</td>
<td align="right"><?php echo number_format($Grossexpensesduetocustomduty ,2);?></td> <td align="right"><?php echo number_format($Grossexpensesduetocustomduty ,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Purchase Rate :</td> <td align="right">Purchase Rate :</td>
<td align="right"><?php echo number_format($purchaseratePerKG,2);?></td> <td align="right"><?php echo number_format($purchaseratePerKG,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">Custom Duty Expenses :</td> <td align="right">Custom Duty Expenses :</td>
<td align="right"><?php echo number_format($CustomDutyExpensesPerKG,2);?></td> <td align="right"><?php echo number_format($CustomDutyExpensesPerKG,2);?></td>
</tr> </tr>
<tr> <tr>
<td align="right">RMC Including Customers :</td> <td align="right">RMC Including Customers :</td>
<td align="right"><?php echo number_format($RMCIncludingCustomersPerKG ,2);?></td> <td align="right"><?php echo number_format($RMCIncludingCustomersPerKG ,2);?></td>
</tr> </tr>
<tr> --><tr>
<td align="right"><p><b>Total Order Amount :</b></p></td> <td align="right"><p><b>Total Order Amount </b></p></td>
<td align="right"><?php echo number_format($TotalOrderValue,2);?></td> <td align="right"><?php echo number_format($TotalOrderValue,2);?></td>
</tr> </tr>
</table> </table>
<br> <!-- table to show req detail , Data should come from DB , now i am hard coded the data-->
<br> <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> </div>