This commit is contained in:
venbatechnologies@gmail.com 2017-07-06 15:42:28 +05:30
parent 660530d841
commit 45b1fc6470
6 changed files with 204 additions and 66 deletions

View File

@ -973,6 +973,25 @@ $DeliveryOption = $this->input->post('DateRange');
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
foreach ($data['POItem'] as $Reqdby)
{
$Requester=$Reqdby->Requestedby;
}
$data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester);
foreach ($data['Requestername'] as $ReqDep)
{
$Depcode=$ReqDep->Departmentcode;
}
$data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode);
//print_r($data['Requestername']);
$data['Currencytype']=$this->purchaseorder_model->GetINRCurrencytype('INR');
// Add header to pdf
@ -1006,6 +1025,27 @@ $DeliveryOption = $this->input->post('DateRange');
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetailsForPrint($PONO);
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
foreach ($data['POItem'] as $Reqdby)
{
$Requester=$Reqdby->Requestedby;
}
$data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester);
foreach ($data['Requestername'] as $ReqDep)
{
$Depcode=$ReqDep->Departmentcode;
}
$data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode);
//print_r($data['Requestername']);
$data['Currencytype']=$this->purchaseorder_model->GetINRCurrencytype('INR');
$this->load->View("servicepopdf", $data);
// Add header to pdf
@ -1049,6 +1089,13 @@ public function importpoprint($PONO)
}
$data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester);
foreach ($data['Requestername'] as $ReqDep)
{
$Depcode=$ReqDep->Departmentcode;
}
$data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode);
//print_r($data['Requestername']);
$data['Currencytype']=$this->purchaseorder_model->GerCurrencyCodeName($Currencycode);

View File

@ -585,13 +585,23 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '')
function GerRequesterName($Requester='')
{
$subQuery='SELECT EmpID,FirstName from T_Employee_Details where EmpID=?';
$subQuery='SELECT EmpID,FirstName,Departmentcode from T_Employee_Details where EmpID=?';
$query=$this->db->query($subQuery,array($Requester));
return $query->result();
}
function GerRequesterDep($Depcode='')
{
$subQuery='SELECT DepartmentName from T_DepartmentDetails where DEPCode=?';
$query=$this->db->query($subQuery,array($Depcode));
return $query->result();
}
function GerCurrencyCodeName($Currencycode='')
{
$subQuery='SELECT Currency_Code,FontCode2000 from T_Currency_Details where Currency_Code=?';

View File

@ -1616,8 +1616,8 @@ if(!empty($RequistionDetails))
<th>UOM</th>
<th>Rate</th>
<th>Basic Amount</th>
<th>Tax Amount</th>
<th>Total Order Amount</th>
<!-- <th>Tax Amount</th>
<th>Total Order Amount</th> -->
<th>Action</th>
</tr>
</thead>
@ -1641,8 +1641,8 @@ if(!empty($RequistionDetails))
<td><?php echo $record->UOM ?></td>
<td><?php echo $record->Rate ?></td>
<td><?php echo $record->BasicValue ?></td>
<td><?php echo $record->Taxamount?></td>
<td><?php echo $record->TotalOrderValue?></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 ; ?>" />
@ -1756,8 +1756,8 @@ if(!empty($RequistionDetails))
$totavlmodvat=$totavlmodvat+$record->AvailableModvat;
$totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty;
$ExchangeRate=$record->ExchangeRate;
$totorder=$totorder+$record->TotalOrderValue;
$totorder=$totorder+$record->BasicPriceInMTon;
//alert($totorder);
}
@ -1968,8 +1968,8 @@ if(!empty($RequistionDetails))
<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 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>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick = "DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
@ -3056,14 +3056,9 @@ function CalculateCtable()
$('#RMCIncludingCustomers').val(Math.round(txtrmc));
}
total=<?php echo CALCULATE_TOTAL;?>;
if(isNaN(total))
{
$('#TotalExp').val('');
}
else
{
$('#TotalExp').val(Math.round(total));
}
$('#TotalExp').val(Math.round(basicamt));
}
@ -3096,7 +3091,7 @@ function EditCalculateCtable()
txtrmc=<?php echo RMC_CAL;?>;
$('#EditRMCIncludingCustomers').val(txtrmc);
total=<?php echo CALCULATE_TOTAL;?>;
$('#EditTotalExp').val(total);
$('#EditTotalExp').val(basicamt);
}

View File

@ -1489,8 +1489,8 @@ function vaildateBeforeOpenModal()
<th>UOM</th>
<th>Rate</th>
<th>Basic Amount</th>
<th>Tax Amount</th>
<th>Total Order Amount</th>
<!-- <th>Tax Amount</th>
<th>Total Order Amount</th> -->
<th>Action</th>
</tr>
</thead>
@ -1669,8 +1669,8 @@ function vaildateBeforeOpenModal()
<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 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>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick = "DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
@ -2808,7 +2808,7 @@ function CalculateCtable()
}
else
{
$('#TotalExp').val((total).toFixed(2));
$('#TotalExp').val((basicprice).toFixed(2));
}
}

View File

@ -8,6 +8,7 @@
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$PaymentTerms='';
$ServiceDescription = '';
if(!empty($CompanyDetails))
@ -33,9 +34,45 @@
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $dtDe->format('d-m-Y');
$ServiceDescription =$PO->ServiceDescription;
$PaymentTerms=$PO->PaymentTerms;
}
}
if(!empty($Requestername))
{
foreach ($Requestername as $Reqname)
{
$ReqBy=$Reqname->FirstName;
//$ReqDep=$Reqname->
}
}
$CurrencyCode='';
$CurrencyName='';
if(!empty($Currencytype))
{
foreach ($Currencytype as $CURRE)
{
$CurrencyCode=$CURRE->Currency_Code;
$CurrencyName=$CURRE->FontCode2000;
}
}
$DEPNAME='';
if(!empty($DEPCODE))
{
foreach ($DEPCODE as $DEP)
{
$DEPNAME=$DEP->DepartmentName;
}
}
?>
<div><center>
@ -60,16 +97,16 @@
<th>Item Description</th>
<th>Qty</th>
<th>Rate</th>
<th>Amount</th>
<th>Discount</th>
<th>Excise Duty</th>
<th>Vat</th>
<th>CST</th>
<th>GST</th>
<th>Other Taxes</th>
<th>Insurance</th>
<th>Freight</th>
<th>Total Amount</th>
<th>Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Discount in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Excise Duty in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Vat in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>CST in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>GST in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Other Taxes in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Insurance in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Freight in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Total Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th></th>
</tr>
@ -132,52 +169,52 @@ echo number_format($TotalAmount,2) ; ?></td>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="0" width="105%">
<tr>
<td align="right">Sub Total Amount :</td>
<td align="right">Sub Total Amount :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($SubTotalAmount,2);?></td>
<br/>
</tr>
<tr>
<td align="right">Discount :</td>
<td align="right">Discount :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($AfterDiscount,2);?></td>
</tr>
<tr>
<td align="right">Excise Duty :</td>
<td align="right">Excise Duty :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($AfterExciseDuty,2);?></td>
</tr>
<tr>
<td align="right">Vat :</td>
<td align="right">Vat :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($AfterVAT,2);?></td>
</tr>
<tr>
<td align="right">CST :</td>
<td align="right">CST :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($AfterCST,2);?></td>
</tr>
<tr>
<td align="right">GST :</td>
<td align="right">GST :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($AfterGST,2);?></td>
</tr>
<tr>
<td align="right">Other Taxes:</td>
<td align="right">Other Taxes:<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($AfterOtherTaxes,2);?></td>
</tr>
<tr>
<td align="right">Insurance :</td>
<td align="right">Insurance :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($Insurance,2);?></td>
</tr>
<tr>
<td align="right">Freight :</td>
<td align="right">Freight :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($AfterFreightValue,2);?></td>
</tr>
<tr>
<td align="right"><p><b>Total Order Amount :</b></p></td>
<td align="right"><p><b>Total Order Amount :<?php echo "$CurrencyCode ($CurrencyName)"?></b></p></td>
<td align="right"><b><?php echo number_format($OrderValue,2);?></b></td>
</tr>
@ -191,7 +228,14 @@ if(!empty($releasedetails)){
foreach($releasedetails as $detail){
?>
<table width="200%">
<tr>
<td>Requition Number :<br/><?php echo $ReqNo;?></td>
<td>Requested by :<br/><?php echo $ReqBy;?></td>
<td>Requisted Department :<br/><?php echo $DEPNAME?></td>
<td>Cost center :<br/><?php echo $CostCenterCode?></td>
</tr>
<!-- <table width="200%">
<tr>
<td><b>ReleasedBy:</b></td>
<td><b>ReleasedOn:</b></td>
@ -200,7 +244,7 @@ if(!empty($releasedetails)){
<td><?php echo $detail->FirstName;?></td>
<td><?php echo $detail->ReleasedOn;?></td>
</tr>
</table>
</table> -->
<?php
}
}

View File

@ -21,6 +21,8 @@
$TaxAmount =0.00;
$BasicAmount = 0.00;
$ServiceDescription = '';
$CostCenterCode='';
$PaymentTerms='';
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
@ -45,8 +47,48 @@
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $dtDe->format('d-m-Y');
$ServiceDescription =$PO->ServiceDescription;
$CostCenterCode=$PO->CostCenterCode;
$PaymentTerms=$PO->PaymentTerms;
}
if(!empty($Requestername))
{
foreach ($Requestername as $Reqname)
{
$ReqBy=$Reqname->FirstName;
//$ReqDep=$Reqname->
}
}
$CurrencyCode='';
$CurrencyName='';
if(!empty($Currencytype))
{
foreach ($Currencytype as $CURRE)
{
$CurrencyCode=$CURRE->Currency_Code;
$CurrencyName=$CURRE->FontCode2000;
}
}
$DEPNAME='';
if(!empty($DEPCODE))
{
foreach ($DEPCODE as $DEP)
{
$DEPNAME=$DEP->DepartmentName;
}
}
}
?>
@ -92,14 +134,14 @@
<th>#</th>
<th>Item Description</th>
<th>Qty</th>
<th>Rate</th>
<th>Amount</th>
<th>Service Tax</th>
<th>Educess Tax</th>
<th>Sec Higher Educess Tax</th>
<th>Krishi Kalyan tax</th>
<th>Swachh Bharat tax</th>
<th>Total Amount</th>
<th>Rate per unit in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Service Tax in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Educess Tax in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Sec Higher Educess Tax in <?php echo "$CurrencyCode ($CurrencyName)"?> </th>
<th>Krishi Kalyan tax in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Swachh Bharat taxin <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th>Total Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
</tr>
<?php
@ -147,48 +189,48 @@
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="right">Sub Total Amount :</td>
<td align="right">Sub Total Amount :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($SubTotalAmount,2);?></td>
<br/>
</tr>
<tr>
<td align="right">Service Tax @14% :</td>
<td align="right">Service Tax @14% :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($ServiceTax,2);?></td>
<br/>
</tr>
<tr>
<td align="right">Edu. cess @2% on ServiceTax:</td>
<td align="right">Edu. cess @2% on ServiceTax:<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($EducessTax,2);?></td>
<br/>
</tr>
<tr>
<td align="right">Sec & Higher cess @1% on ServiceTax:</td>
<td align="right">Sec & Higher cess @1% on ServiceTax:<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($SecHigherEducessTax,2);?></td>
<br/>
</tr>
<tr>
<td align="right">Krishi kalyan Tax @0.5% on Basic Amount:</td>
<td align="right">Krishi kalyan Tax @0.5% on Basic Amount:<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($KrishiKalyantax,2);?></td>
<br/>
</tr>
<tr>
<td align="right">Swachh Barath Tax @0.5% on Basic Amount :</td>
<td align="right">Swachh Barath Tax @0.5% on Basic Amount :<?php echo "$CurrencyCode ($CurrencyName)"?></td>
<td align="right"><?php echo number_format($SwachhBharattax,2);?></td>
<br/>
</tr>
<tr>
<td align="right"><b>Total Order Amount :</b></td>
<td align="right"><b>Total Order Amount :<?php echo "$CurrencyCode ($CurrencyName)"?></b></td>
<td align="right"><b><?php echo number_format($OrderValue,2);?></b></td>
<br/>
</tr>
</table>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td>Requition Number :<br/>Req004</td>
<td>Requested by :<br/>Sanjeev</td>
<td>Requisted Department :<br/>Store</td>
<td>Cost center :<br/>Fe001</td>
<td>Requition Number :<br/><?php echo $ReqNo;?></td>
<td>Requested by :<br/><?php echo $ReqBy;?></td>
<td>Requisted Department :<br/><?php echo $DEPNAME?></td>
<td>Cost center :<br/><?php echo $CostCenterCode?></td>
</tr>
</table>
@ -201,7 +243,7 @@
foreach($releasedetails as $detail){
?>
<table width="200%">
<!-- <table width="200%">
<tr>
<td><b>ReleasedBy:</b></td>
<td><b>ReleasedOn:</b></td>
@ -210,7 +252,7 @@
<td><?php echo $detail->FirstName;?></td>
<td><?php echo $detail->ReleasedOn;?></td>
</tr>
</table>
</table> -->
<?php
}
}