Payslip,Amend,PO Approval,PO Release

This commit is contained in:
velz2020 2017-06-30 19:37:55 +05:30
parent 2792e52cbc
commit 153e286369
13 changed files with 10262 additions and 49 deletions

View File

@ -166,6 +166,7 @@ $route['CreatePO'] = "purchaseorder/requisition";
$route['PurchaseOrder'] = "purchaseorder/CreatePurchaseOrder";
$route['purchaseorderListing'] = "purchaseorder/PurchaseOrderList";
$route['EditPO'] = "purchaseorder/EditPurchaseOrder";
$route['EditAmendPO'] = "amendmentpurchaseorder/EditAmendPurchaseOrder";
$route['EmergencyPO'] = "emergencypurchaseorder/CreateEmergencyPO";

View File

@ -0,0 +1,397 @@
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
require APPPATH . '/libraries/BaseController.php';
/**
* Class : Amendment Purchase Order controller
* User Class to control all user related operations.
* @author : Saravana kumar
* @version : 1.1
* @since : 19 June 2016
*/
class amendmentpurchaseorder extends BaseController
{
/**
* This is default constructor of the class
*/
public function __construct()
{
parent::__construct();
//$this->load->model('amendment_model');
$this->load->model('purchaseorder_model');
$this->load->library('session');
$this->load->library('form_validation');
// $this->load->library('pagination');
$this->isLoggedIn();
}
/**
* This function used to load the first screen of the user
*/
public function index()
{
$this->load->library('pagination');
// $count = $this->purchaseorder_model->purchaseorderListingCount('');
//$returns = $this->paginationCompress ( "purchaseorderListing/", $count, 10 );
//$this->purchaseorder_model->UpdateRequistionStatus(); CONFORM IT
$forwhat='amendment';
$data['POData'] = $this->purchaseorder_model->purchaseorderListing($forwhat);
$this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
$this->loadviews('AmendPOlist',$this->global,$data,NULL);
}
function EditAmendPurchaseOrder()
{
$PONO = $_GET['PONO'];
$ReqType = $_GET['ReqType'];
$Req = $this->purchaseorder_model->getRequistionNoFromPO($PONO);
$data['ReqList'] = $Req ;
$result = array();
$ReqArray = array();
foreach ($Req as $SID):
$ReqArray[] = $SID->ReqNo ;
$result[] = $this->purchaseorder_model->getRawPOMaterialList($SID->ReqNo);
endforeach;
$data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
/* Cost code from Requisition - Client Review Fix
Start here */
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
$data['RequistionDetails'] = $ReqDetails;
$CostCode = '';
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$Year = $dt->format('Y');
foreach ($ReqDetails as $Rs):
$CostCode = $Rs->CostCenterCode;
endforeach;
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
if(count($AvlBudget)>0)
{
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
}
/* End Here */
$data['POMaster'] = $this->purchaseorder_model->GetServicePurchaseOrder($PONO);
$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
if($ReqType == SERVICE)
{
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetails($PONO);
$this->global['pageTitle'] = 'Siddharth : Edit Service Purchase order form';
$this->loadViews("editServiceAmendPO", $this->global, $data, NULL);
}
else if($ReqType == REVENUE)
{
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
$this->loadViews("editRevenueAmendPO", $this->global, $data, NULL);
}
else if($ReqType == IMPORT)
{
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
if(count($AvlBudget)>0)
{
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
}
// print_r($data);
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
//print_r($data);
//$data['ExchangeRate']=$data['POItem']->ExchangeRate;
//print_r($data['POItem']);
foreach($data['POItem'] as $Rate)
{
// print_r($Rate->ExchangeRate);
$exRate=$Rate->ExchangeRate;
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
}
foreach($data['POItem'] as $CUR)
{
//print_r($CUR->CurrencyType);
$Currency=$CUR->CurrencyType;
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
}
//echo "$Currency";
$data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
//print_r($data);
$data['ExchangeRate']=$exRate;
$data['Currency']=$this->purchaseorder_model->GetCurrencytype();
//print_r($data);
$this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
$this->loadViews("editImportAmendPO", $this->global, $data, NULL);
}
}
function EditRevenuePurchaseOrder()
{
$NewPO='0';
$PONO =$this->input->post('txtPONO');
echo "OLD PO IS" . $PONO;
$POdt =$this->input->post('PODate');
$PODate = $this->getDateformat($POdt);
$SupplierID = $this->input->post('drpSupplier');
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
$dt = $this->input->post('Deliverydt');
//$Deliverydt = $this->getDateformat($dt);
$DeliveryOption = $this->input->post('DateRange');
if($DeliveryOption==1){
$Deliverydt = '';
$DeliverySchedule = $this->input->post('Scheduleby');
}
else{
$Deliverydt = $this->getDateformat($dt);
$DeliverySchedule = '';
}
$POType = $this->input->post('POType');
$PoRange = $this->input->post('txtPoRange');
$SpcialInstruction = $this->input->post('SpcialInstruction');
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
$POStatus = $this->input->post('txtStatus');
$updatedBy = $this->session->userdata ( 'userId' );
$RowCount = $this->input->post('txtRowCount');
//$DeletedRow = $this->input->post('txtDeletedRow');
// $comma_separated = explode(':', $DeletedRow);
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$updateddt = $dt->format('Y-m-d H:i:s');
// PO Master
// PO Master
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>'ST015','DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
//$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
$LastPO = $this->purchaseorder_model->addPOMaster($POMaster);
foreach($LastPO as $PO):
$NewPO=$PO->PONO;
endforeach;
echo "NEW PO IS " . $NewPO;
echo "";
//change old po status as Amendment
$PODetail=array('Status'=>"ST030");//TO SET PARENT PO AS AMENDMENT STATUS
print_r($PODetail);
$APO=$this->purchaseorder_model->updateAmendPOMaster($PONO,$PODetail);
echo $APO."Affected";
//die();
//print_r($LastPO);
$LineItemStatus = REQITEM_NEW;
echo 'before for loop';
echo $RowCount;
for ($i = 1; $i <= $RowCount; $i++)
{
echo "inside loop";
$MaterialCode = $this->input->post('materialCode'.$i);
$Quantity = $this->input->post('quantity'.$i);
$Reqnumber = $this->input->post('Reqnumber'.$i);
$itemRate = $this->input->post('itemRate'.$i);
$DiscountType = $this->input->post('DisType'.$i);
$DiscountValue = $this->input->post('DisVal'.$i);
$AfterDiscount = $this->input->post('AfterDisVal'.$i);
$PackagingOption = $this->input->post('PackOption'.$i);
$PackagingType = $this->input->post('PackType'.$i);
$PackagingValue = $this->input->post('PackVal'.$i);
$AfterPackagingValue = $this->input->post('AfterPackVal'.$i);
$ExciseOption = $this->input->post('ExciseOption'.$i);
$ExciseValue = $this->input->post('ExciseVal'.$i);
$AfterExciseValue = $this->input->post('AfterExciseVal'.$i);
$VatOption = $this->input->post('VatOption'.$i);
$VatValue = $this->input->post('VatVal'.$i);
$AfterVatValue = $this->input->post('AfterVatVal'.$i);
$CSTOption = $this->input->post('CSTOption'.$i);
$CSTValue = $this->input->post('CSTVal'.$i);
$AfterCSTValue = $this->input->post('AfterCSTVal'.$i);
$GSTValue = $this->input->post('GSTVal'.$i);
$AfterGSTValue = $this->input->post('AfterGSTVal'.$i);
$OtherTaxValue = $this->input->post('OtherTaxVal'.$i);
$AfterOtherTaxValue = $this->input->post('AfterOtherTaxVal'.$i);
$FreightType = $this->input->post('FreightType'.$i);
$FreightValue = $this->input->post('FreightVal'.$i);
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
$InsuranceValue = $this->input->post('Insval'.$i);
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$POLineItemNo = $this->input->post('LineItemNo'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$LineItemNo = '';
// $SkipInsert = "False";
// if( count($comma_separated) > 0)
// {
// for($j = 1; $j < count($comma_separated); $j++)
// {
// $deletedRow = $comma_separated[$j] ;
// if($deletedRow == $i )
// {
// $SkipInsert = "True";
// break;
// }
// }
// }
// if($SkipInsert == "False")
// {
// if(strlen($POLineItemNo) == 0)
// {
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter);
print_r($POLineItemList);
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
// if(count($POLineItem)>0)
// {
foreach($POLineItem as $line):
$LineItemNo = $line->LineItemNo;
endforeach;
echo "Lineitem no is" . $LineItemNo;
//print_r($LineItemNo);
// }
//}
// else
// {
// $LineItemNo = $POLineItemNo;
// $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter);
// $POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
// }
// $isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
// if(count($isExists) == 0)
// {
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
// }
// else
// {
// $RevenueTaxList = array('DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt);
// $this->purchaseorder_model->updateRevenueTax($LineItemNo,$RevenueTaxList);
// }
}
echo 'Purchase Order Amended Successfully! PO Number Is: '.$PONO .'- New PO Number is'.$NewPO;
}
function getDateformat($Val)
{
$date = new DateTime($Val,new DateTimeZone('Asia/Kolkata'));
$retDate = $date->format('Y-m-d H:i:s');
return $retDate;
}
/* ---------------------------------OLD AMENDPO FUNCTION-----------------------------------------------*/
function getpodetails()
{
$PONO=$this->input->post('pono');
//$PONO='PO0001';
$result = $this->amendment_model->getPODetails($PONO);
// print_r($result);
$obj=json_encode($result);
echo $obj;
//print_r($obj);
//die();
}
function updatepo(){
$someArray = $_GET['jsondata'];
//$PONO = $_GET['pono'];
$PONO = $this->input->get('PONO');
$rowsaffected=0;
$porow=0;
//echo $PONO."</br>";
// print_r($someArray);
$d=json_decode($someArray);
////print_r( $d);
foreach($d as $d1){
$MaterialCode=$d1->ItemCode;
$Quantity=$d1->Ordered_Quantity;
$ReceivedQuantity=$d1->Additional_Quantity_Received;
$Remarks=$d1->Remarks;
$Status='ST031';
$POstatus='ST030';
$store=array('Quantity'=>$Quantity,'AmendmentQuantity'=>$ReceivedQuantity,'AmendmentRemarks'=>$Remarks,'Status'=>$Status);
//print_r($store);
$result=$this->amendment_model->updatePODetails($PONO,$MaterialCode,$store,$POstatus);
$rowsaffected++;
}
echo "<script>alert($rowsaffected+'--Rows Affected')</script>";
$data['PODetails']=$this->amendment_model->getPONO();
$this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
$this->loadviews('amendmentpo',$this->global, NULL);
}
function amendmentpolisting()
{
$this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
$data['POlisiting']=$this->amendment_model->getPOlist();
//echo "From CON.</br>";
//print_r($data);
$this->loadviews('amendmentpolisting',$this->global,$data);
}
function pageNotFound()
{
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
$this->loadViews("404", $this->global, NULL, NULL);
}
}

View File

@ -1,3 +1,8 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
ERROR - 2017-06-30 12:34:19 --> Severity: Notice --> Undefined variable: designation C:\xampp\htdocs\sia306\siddharth_application\application\views\includes\header.php 248
ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166

View File

@ -30,7 +30,7 @@ class purchaseorder_model extends CI_Model
* @return array $result : This is result
*/
function purchaseorderListing()
function purchaseorderListing($forwhat='')
{
$this->db->distinct();
$this->db->select('POMast.PONO,supp.SupplierName,TotalOrderValue,PODate,Stat.StatusName,Stat.StatusCode,Req.ReqType,DeliveryDate,DeliverySchedule,DeliveryOption');
@ -664,6 +664,20 @@ function GetCurrencytype()
return TRUE;
}
// To update Parent PO as Amended PO
function updateAmendPOMaster($PONO,$PODetail)
{
//echo $PONO."from model";
$this->db->where('PONO', $PONO);
$this->db->update('T_PurchaseOrder_Master', $PODetail);
$insert_id = $this->db->affected_rows();
return $insert_id;
}
/**
* This function is used to check the Line Item is already available in the database
* @return array $result : This is result of the query
@ -968,6 +982,7 @@ function GetCurrencytype()
$this->db->join('T_Requestion_Master rmast','rmast.ReqNo=req.ReqNo');
$this->db->join('T_CostCenter_Budget bud','bud.CostCenterCode = req.CostCenterCode and bud.BudgetType = rmast.ReqType');
$this->db->join('T_CostCenter_Master ccm','ccm.CostCenterCode = req.CostCenterCode and ccm.CostCenterCode = bud.CostCenterCode');
$this->db->where('mast.Status','ST030'); // EMERGENGY PO
if($q=='A'){
$this->db->where('mast.Status','ST015');//PO CREATED
$this->db->or_where('mast.Status','ST020');//ON HOLD

View File

@ -1,10 +1 @@
<span style='color: #900'>14,592 KB</span> <span style='color: #090'>244.4260 ms</span><br /><div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: explode() expects parameter 2 to be string, array given</p>
<p>Filename: include/style.cls.php</p>
<p>Line Number: 948</p>
</div>
<span style='color: #900'>8,448 KB</span> <span style='color: #090'>660.7060 ms</span><br />

View File

@ -0,0 +1,112 @@
<!-- In this purchase order listing , datatable is used for sorting , pagination and etc.. , new design is used for table fro the theme-->
<style>
.pagination {
margin:0px !important;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<center><h3 class="box-title"><b>Siddharth Industries - Amendment Purchase Order List<b></h3></center>
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-hover editableTable">
<thead>
<tr bgcolor="LightSlateGray ">
<th>#</th>
<th>PONO#</th>
<th>PO Type</th>
<th>PO Date</th>
<th>Supplier Name</th>
<th>Total Order Value</th>
<th>PO Status</th>
<th>Delivery Option</th>
<th>Delivery Date</th>
<th>Delivery Schedule</th>
<th>Action</th>
</tr>
</thead>
<tbody><?php
if(!empty($POData))
{
$index = 0;
foreach($POData as $record)
{
$index = $index + 1;
?>
<tr id="<?php echo $index ; ?>">
<td align="left"><?php echo $index ; ?></td>
<td><?php echo $record->PONO ?></td>
<td><?php echo $record->ReqType ?></td>
<td align="right"><?php $Pdt = new DateTime($record->PODate);
$PODate = $Pdt->format('d-m-Y');
echo $PODate
?></td>
<td><?php echo $record->SupplierName ?></td>
<td align="right"><?php echo $record->TotalOrderValue ?></td>
<td><?php echo $record->StatusName ?></td>
<td><?php $option = 'By Deliver Date';
if($record->DeliveryOption == 1){
$option = "By Schedule" ; }
echo $option ?></td>
<td align="right"><?php
$Ddt = new DateTime($record->DeliveryDate);
$Deliverydt = $Ddt->format('d-m-Y');
if($record->DeliveryOption == 1){$Deliverydt = '';}
echo $Deliverydt ?></td>
<td><?php echo $record->DeliverySchedule ?></td>
<td> <a data-toggle="tooltip" href="<?php echo base_url().'EditAmendPO?PONO='.$record->PONO.'&ReqType='.$record->ReqType; ?>" ><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a>
<a data-toggle="tooltip" href="<?php echo base_url().'EditAmendPO?PONO='.$record->PONO.'&ReqType='.$record->ReqType; ?>"> &nbsp;&nbsp;&nbsp; <a data-toggle="tooltip" href="<?php echo base_url().'purchaseorder/CreatePOPrint?PONO='.$record->PONO.'&ReqType='.$record->ReqType; ?>"><i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Print the Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<?php
}?>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script>
$(function () {
$('#example1').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -310,6 +310,12 @@
<i class="fa fa-ambulance"></i>
<span>Emergency Purchase Order </span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>amendmentpurchaseorder">
<i class="fa fa-ambulance"></i>
<span>Amendment Purchase Order </span>
</a>
</li>
<?php } ?>
<?php

View File

@ -38,6 +38,9 @@
$DeptName = '';
$LossofPay = '0.00';
$RecCount = '';
$OtherDeductions='0.00';
$LoanAdvance='0.00';
$Otherallowances='0.00';
if(!empty($Count))
{
@ -80,6 +83,8 @@ if(!empty($PayDetails))
$BasicAndDA = $Pay->BasicPlusDA;
$HRA = $Pay->HRA;
$OTWage = $Pay->OTWages;
$OtherDeductions=$Pay->OtherDeductions;
$LoanAdvance=$Pay->Advance;
if($OTWage == '')
{
$OTWages = '0.00';
@ -101,9 +106,10 @@ if(!empty($PayDetails))
$GrosssSalary = $Pay->ESIGrossSalary;
$ESI = $Pay->EmployeeESI;
$PF = $Pay->PF;
$ESIAndPF = $Pay->TotalDeduction;
$ESIAndPF = $PF+$ESI+$OtherDeductions+$LoanAdvance;
$SalaryAsPerPF = $Pay->SalaryAsPerPF;
$Food =$Pay->FoodAllowance;
$Otherallowances=$Pay->Other_allowances;
if($Food == '')
{
$FoodAllowance = '0.00';
@ -121,7 +127,7 @@ if(!empty($PayDetails))
{
$Incentive = $IncenAmt;
}
$TotalSalary = $Pay->TotalSalary;
$TotalSalary = $BasicAndDA+$HRA+$Food+$IncenAmt+$OTSal+$Otherallowances;
$Adv = $Pay->Advance;
if($Adv == '')
{
@ -164,25 +170,27 @@ if($RecCount > 0)
?>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td>
<img width="80" height="80" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg==">
</td>
<br/><center><img width="80" height="80" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg==">
</center></td>
<td colspan="8">
<h3>Siddharth Industries</h3> Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, <br/>Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026.<br/>PaySlip for the month - <?php echo $PayOn ?>
<h3><center>Siddharth Industries</center></h3><center> Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, <br/>Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026.</center><br/><center>PaySlip for the month - <?php echo $PayOn ?></center>
</td>
</tr>
</table>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td colspan="6">
<td colspan="8">
<table>
<tbody>
<tr >
<td width="160px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Name :</td>
<td width="250px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $FirstName ?></td>
<td width="200px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $FirstName ?></td>
<td width="160px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Employee ID :</td>
<td width="250px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $EmpID ?></td>
<td width="152px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $EmpID ?></td>
</tr>
<tr>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Desigination :</td>
@ -205,7 +213,7 @@ if($RecCount > 0)
<tr>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PF Account Number :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" ><?php echo $PFnumber ?></td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Balance Advance :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Loan Balance :</td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;" ><?php echo $BalanceAdvance ?></td>
</tr>
<tr>
@ -223,25 +231,25 @@ if($RecCount > 0)
<tr>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Bank Account Number :</td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo $BankAccountNo ?></td>
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Loss Of Pay :</td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo $LossofPay ?></td>
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">UAN Number : </td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">101033275864 </td>
</tr>
<tr>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PAN Number :</td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> QWERS3423E</td>
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">UAN Number : </td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">101033275864 </td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%" >
<tr><th>Earnings</th><th>Amount</th><th>Deductions</th><th>Amount</th></tr>
<tr>
<td width="50px;">Basic Plus DA</td>
<td style="text-align: right;" ><?php echo $BasicAndDA ?></td>
<td width="50px;">Provident Fund</td>
<td style="text-align: right;" ><?php echo $PF ?></td>
<td width="25%;">Basic Plus DA</td>
<td width="25%;" style="text-align: right;" ><?php echo $WorkedSalary ?></td>
<td width="25%;">Provident Fund</td>
<td width="25%;" style="text-align: right;" ><?php echo $PF ?></td>
</tr>
<tr>
<td>House Rent Allowance</td>
@ -252,28 +260,35 @@ if($RecCount > 0)
<tr>
<td>Food Allowance</td>
<td style="text-align: right;"><?php echo $FoodAllowance ?></td>
<td>Advance</td>
<td style="text-align: right;"><?php echo $Advance ?></td>
<td>Loan Recovery</td>
<td style="text-align: right;"><?php echo $LoanAdvance ?></td>
</tr>
<tr>
<td>Other Allowance</td>
<td style="text-align: right;"><?php echo $Otherallowances ?></td>
<td>Other Deduction</td>
<td style="text-align: right;"><?php echo $OtherDeductions ?></td>
</tr>
<tr>
<td>Incentive</td>
<td style="text-align: right;"><?php echo $Incentive ?></td>
<td></td>
<td style="text-align: right;">&nbsp;</td>
<td style="text-align: right;"></td>
</tr>
<tr>
<td>OT Salary</td>
<td style="text-align: right;"><?php echo $OTSalary ?></td>
<td>&nbsp;</td>
<td style="text-align: right;">&nbsp;</td>
<td></td>
<td style="text-align: right;"></td>
</tr>
<tr><th nowrap>Total Earning (Rounded) (TE)</th>
<td style="text-align: right;"><?php echo $TotalSalary ?></td>
<td style="text-align: right;"><?php echo round($TotalSalary)?></td>
<th nowrap>Total Deduction (Rounded)(TD)</th>
<td style="text-align: right;"><?php echo $ESIAndPF ?></td>
<td style="text-align: right;"><?php echo round($ESIAndPF) ?></td>
</tr>
<tr><th style="text-align: right;" colspan="3">Net Pay (Rounded) :&nbsp;</th>
<td style="text-align: right;" colspan="1"><?php echo $LessAdvance ?></td>
<td style="text-align: right;" colspan="1"><?php echo round($LessAdvance) ?></td>
</tr>
<tr><th style="text-align: center;" colspan="4">This is a computer generated document. This document does not require signature.</th></tr>
</tbody>

View File

@ -88,15 +88,15 @@ if(empty($Status))
<td>
<select disabled name="selectId" id="selectId" title="You Can't Select Here">
<!-- <select disabled name="selectId" id="selectId" title="You Can't Select Here">
<option value="-1" >Select Option</option>
<option value="1">Approve</option>
<option value="2">OnHold</option>
</select>
</select> --> <center>-</center>
</td>
<?php
}elseif($record->StatusName == 'ON HOLD' or $record->StatusName == 'PO CREATED' or $record->StatusName == 'EMERGENCY PO'){
}elseif($record->StatusName == 'ON HOLD' or $record->StatusName == 'PO CREATED' or $record->StatusName == 'EMERGENCY PO' or $record->StatusName == 'AMENDMENT PO' or $record->StatusName == 'AWAITING RELEASE'){
?>
<td>
@ -108,7 +108,13 @@ if(empty($Status))
</td>
<?php }?>
<td contenteditable="true" id="remarks<?php echo $index ; ?>"> <?php echo $record->Remarks ?> </td>
<td contenteditable="true" id="remarks<?php echo $index ; ?>"> <?php
if($record->Remarks == ''){
}
else{ echo $record->Remarks; }?></td>
</tr>
@ -124,17 +130,35 @@ if(empty($Status))
</table>
<script>
function showvalue(PONO,value,Status,Remarks)
function showvalue(PONO,value,Status,Remark)
{
//alert(value);
var Remarks='';
var curtremarks=document.getElementById('remarks'+value+'').innerHTML;
//alert(curtremarks);
var curtremarks = curtremarks.trim();
//var lower = str.toLowerCase();
alert("already"+Remark);
alert("Current"+curtremarks);
//var curtremarks="CUR"
var PO=PONO;
//var val=value;
var Status=Status;
var Remarks=Remarks+'||'+curtremarks;
if((curtremarks == '<br>' || curtremarks == '') && Remark == ''){
Remarks='';
alert("To Store both empty" + Remarks)
}
else if(curtremarks == '<br>')
{
Remarks=Remark;
alert("To Store current empty" + Remarks)
}
else{
Remarks=Remark+"||"+curtremarks;
alert("To Store both" + Remarks)
}
//alert(Remarks);
var StatusCode='';
var srtMsg='';

View File

@ -81,7 +81,7 @@ if(empty($Status))
<td><?php echo $record->StatusName ?></td>
<?php
if($record->StatusName == 'PO APPROVED'){
if($record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){
?>
<td>
@ -92,8 +92,17 @@ if(empty($Status))
</select>
</td>
<?php }?>
<td contenteditable="true" id="remarks<?php echo $index ; ?>"><?php echo $record->Remarks ?></td>
<?php }else{
echo "<td><center>-</center></td>";
}?>
<td contenteditable="true" id="remarks<?php echo $index ; ?>"><?php
if($record->Remarks == ''){
}
else{ echo $record->Remarks; }?></td>
</tr>
@ -108,14 +117,29 @@ if(empty($Status))
</table>
<script>
function showvalue(PONO,value,Status,Remarks)
function showvalue(PONO,value,Status,Remark)
{
var Remarks='';
var curtremarks=document.getElementById('remarks'+value+'').innerHTML;
//var curtremarks = curtremarks.trim();
var PO=PONO;
var Status=Status;
var StatusCode='';
var srtMsg='';
var Remarks=Remarks+'||'+curtremarks;
if(curtremarks == '<br>' && Remark == ''){
Remarks='';
alert("To Store both empty" + Remarks)
}
else if(curtremarks == '<br>')
{
Remarks=Remark;
alert("To Store current empty" + Remarks)
}
else{
Remarks=Remark+"||"+curtremarks;
alert("To Store both hahve" + Remarks)
}
//alert(PO+"-"+Status+"-"+StatusCode);
if(Status != '-1'){
if(Status == '1'){