Report changes merged and issues fixed
This commit is contained in:
parent
dc6c8de5c8
commit
2f2c2908d8
@ -58,7 +58,7 @@ class MRIRcontroller extends BaseController
|
||||
$MrirNo = $_GET['MRIRNO'];
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : MRIR Pdf ';
|
||||
//$this->global['pageTitle'] = 'Resico : MRIR Pdf ';
|
||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
|
||||
$data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);
|
||||
$this->load->View("Mrirprintpdf",$data, NULL);
|
||||
@ -72,6 +72,8 @@ class MRIRcontroller extends BaseController
|
||||
$mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10,10, 38, 4, 6);
|
||||
$HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
|
||||
$mpdf->SetTitle('Resico : MRIR PDF');
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
$html = $this->load->view('Mrirprintpdf',$data,true);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
|
||||
@ -438,11 +438,23 @@ class monthlypay extends BaseController
|
||||
function permissionpdf($SNO){
|
||||
|
||||
$data['per'] = $this->monthlypay_model->pdf($SNO);
|
||||
|
||||
$id='';
|
||||
$name ='';
|
||||
$permissionpdf='';
|
||||
$date = '';
|
||||
|
||||
foreach($data['per'] as $record){
|
||||
$id= $record ->EmpID;
|
||||
$name =$record ->FirstName;
|
||||
$date =date_format(date_create($record ->date),'d-m-Y');
|
||||
}
|
||||
|
||||
$permissionpdf = $id.'-'.$name.'-'.$date;
|
||||
$this->load->view($this->config->item('admin_folder') .'/permissionpdf',$data);
|
||||
|
||||
$mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 38, 4, 6);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->SetTitle('Resico : Permission');
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
|
||||
$html = $this->load->view('permissionpdf',$data,true);
|
||||
@ -451,7 +463,7 @@ class monthlypay extends BaseController
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
$mpdf->WriteHTML($html);
|
||||
$mpdf->Output("Permission".$data.'.pdf','I',$php);
|
||||
$mpdf->Output('Permissionslip'.$permissionpdf.'.pdf','I',$php);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -340,6 +340,7 @@ class payslip extends BaseController
|
||||
$mpdf=new mPDF('utf-8','A4-P',10, 12,12, 10, 10, 38, 4, 6);
|
||||
$HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
/*$mpdf->SetTitle('Resico : PDF'.$filename);*/
|
||||
//$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
|
||||
// $mpdf->setFooter("Page {PAGENO} of {nb}");
|
||||
@ -767,7 +768,7 @@ class payslip extends BaseController
|
||||
$mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 24, 4, 6);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
$mpdf->addFavicon('icons');
|
||||
/*$mpdf->SetTitle('Resico : PDF');*/
|
||||
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
|
||||
$mpdf->setFooter("Page {PAGENO} of {nb}");
|
||||
$mpdf->list_indent_first_level = 1;
|
||||
|
||||
@ -1235,7 +1235,7 @@ class purchaseorder extends BaseController
|
||||
$PoStatus='';
|
||||
|
||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformationforPDF();
|
||||
$data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
|
||||
$data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
|
||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
|
||||
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
|
||||
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR');
|
||||
@ -1287,12 +1287,12 @@ $AdvanceAmount=0.00;
|
||||
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
$html = $this->load->view('revenuepopdf',$data,true);
|
||||
|
||||
$mpdf->SetTitle('Resico : PO PDF');
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
|
||||
|
||||
$mpdf->list_indent_first_level = 1;
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
$mpdf->WriteHTML($html);
|
||||
|
||||
@ -1372,7 +1372,7 @@ $AdvanceAmount=0.00;
|
||||
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
$html = $this->load->view('servicepopdf',$data,true);
|
||||
|
||||
$mpdf->SetTitle('Resico : PO PDF');
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
|
||||
|
||||
@ -1512,7 +1512,7 @@ public function importpoprint($PONO)
|
||||
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
|
||||
|
||||
$mpdf->SetTitle('Resico : PO PDF');
|
||||
$mpdf->list_indent_first_level = 1;
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
@ -2746,7 +2746,7 @@ function addNewImportPurchaseOrder()
|
||||
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
$html = $this->load->view('capitalpopdf',$data,true);
|
||||
|
||||
$mpdf->SetTitle('Resico : PO PDF');
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ class quality extends BaseController
|
||||
require APPPATH . '/third_party/mpdf/mpdf.php';
|
||||
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
|
||||
/*$mpdf->SetTitle('Resico : PDF');*/
|
||||
$mpdf->list_indent_first_level = 1;
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
|
||||
@ -498,7 +498,62 @@ class report extends BaseController
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function consolidate_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$cname = $this->input->get('cname');
|
||||
$prod = $this->input->get('prod');
|
||||
$m = $this->input->get('m');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->consolidate_month($m,$cname,$mid,$fa,$aa);
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_consolidate_m",$this->global,$data, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
public function consolidate_year()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$cname = $this->input->get('cname');
|
||||
$prod = $this->input->get('prod');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->consolidate_year($cname,$mid,$fa,$aa);
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_consolidate_y",$this->global,$data, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function cumulative()
|
||||
{
|
||||
|
||||
@ -811,7 +866,7 @@ class report extends BaseController
|
||||
public function i_consolidate_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
@ -843,7 +898,7 @@ class report extends BaseController
|
||||
public function i_consolidate_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class : storestatus (Store Stock Status -Controller)
|
||||
* storestatus Class to control all store related operations.
|
||||
@ -26,15 +21,8 @@ class storestatus extends BaseController
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->load->model('store_model');
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->load->library('form_validation');
|
||||
$this->isLoggedIn();
|
||||
|
||||
}
|
||||
@ -46,11 +34,8 @@ class storestatus extends BaseController
|
||||
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
|
||||
|
||||
|
||||
|
||||
$this->loadViews("storestatus", $this->global, NULL , NULL);
|
||||
$this->global['pageTitle'] = 'Resico : Store Status';
|
||||
$this->loadViews("storestatus", $this->global, NULL , NULL);
|
||||
|
||||
}
|
||||
|
||||
@ -61,219 +46,133 @@ class storestatus extends BaseController
|
||||
*/
|
||||
function storeavailability()
|
||||
{
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
|
||||
$data['Stock'] = $this->store_model->viewStock();
|
||||
$this->global['pageTitle'] = 'Resico : Store Status';
|
||||
$data['Stock'] = $this->store_model->viewStock();
|
||||
$data['MaterialList'] = $this->store_model->GetAllMaterialList();
|
||||
$data['StockStatus'] = $this->store_model->GetConfigValue('C021');
|
||||
if($this->DEPCode == STORE)
|
||||
{
|
||||
$this->loadViews("storestatus", $this->global, $data,null);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$this->loadViews("storestatus", $this->global, $data,null);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data,null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Its handles add stock details Operation.
|
||||
*/
|
||||
function AddStock()
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
$MaterialCode = $this->input->post('MaterialCode');
|
||||
|
||||
$AvailableQty = $this->input->post('AddAvailableStock');
|
||||
|
||||
$AvailbilityStatus = $this->input->post('StockAvail');
|
||||
|
||||
$Remarks = $this->input->post('Remarks');
|
||||
|
||||
$CreatedBy = $this->session->userdata('EmpID');
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$Status = 1;
|
||||
|
||||
$Status = 1;
|
||||
|
||||
if(trim($AvailbilityStatus) == 'YES')
|
||||
|
||||
{
|
||||
|
||||
$Status = 0;
|
||||
|
||||
}
|
||||
/* this array to store the value in master table.. */
|
||||
|
||||
$Stockdetails = array('MaterialCode'=>$MaterialCode,'Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt);
|
||||
|
||||
$data['Stock'] = $this->store_model->addStock($Stockdetails);
|
||||
|
||||
|
||||
|
||||
//this array to store the value in master table..
|
||||
|
||||
$Stockdetails = array('MaterialCode'=>$MaterialCode,'Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt);
|
||||
|
||||
|
||||
|
||||
$data['Stock'] = $this->store_model->addStock($Stockdetails);
|
||||
|
||||
echo 'Stock Added successfully';
|
||||
|
||||
|
||||
|
||||
|
||||
echo 'Stock Added successfully';
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Its handles updated stock details Operations.
|
||||
*/
|
||||
function UpdateStock()
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
$MaterialCode = $this->input->post('EditMaterialCode');
|
||||
|
||||
$AvailableQty = $this->input->post('EditAvailableStock');
|
||||
|
||||
$AvailbilityStatus = $this->input->post('EditStockAvail');
|
||||
|
||||
$Remarks = $this->input->post('EditRemarks');
|
||||
|
||||
$CreatedBy = $this->session->userdata('EmpID');
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$Status = 1;
|
||||
|
||||
if(trim($AvailbilityStatus) == 'YES')
|
||||
|
||||
{
|
||||
|
||||
$Status = 0;
|
||||
|
||||
}
|
||||
|
||||
/*this array to store the value in master table..*/
|
||||
|
||||
$Stockdetails = array('Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'UpdatedBy'=>$CreatedBy,'updatedOn'=>$createddt);
|
||||
|
||||
|
||||
$data['Stock'] = $this->store_model->UpdateStock($Stockdetails,$MaterialCode);
|
||||
|
||||
//this array to store the value in master table..
|
||||
|
||||
$Stockdetails = array('Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'UpdatedBy'=>$CreatedBy,'updatedOn'=>$createddt);
|
||||
|
||||
|
||||
|
||||
$data['Stock'] = $this->store_model->UpdateStock($Stockdetails,$MaterialCode);
|
||||
|
||||
echo 'Stock updated successfully';
|
||||
|
||||
|
||||
|
||||
|
||||
echo 'Stock updated successfully';
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Its handles view all stock details.
|
||||
*/
|
||||
function viewStockHistory()
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
$MaterialCode= $this->input->post('id');
|
||||
|
||||
|
||||
|
||||
$result = $this->store_model->GetStockHisory($MaterialCode);
|
||||
|
||||
|
||||
|
||||
$TotalStock = 0;
|
||||
|
||||
$HTML="";
|
||||
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
|
||||
{
|
||||
|
||||
function viewStockHistory()
|
||||
{
|
||||
$MaterialCode= $this->input->post('id');
|
||||
$result = $this->store_model->GetStockHisory($MaterialCode);
|
||||
$TotalStock = 0;
|
||||
$HTML="";
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
{
|
||||
$SNo = $i + 1;
|
||||
|
||||
|
||||
|
||||
$AvailableQty = $result[$i]['Quantity'];
|
||||
|
||||
$UpdatedStock = $result[$i]['ActualQuantity'];
|
||||
|
||||
$Remarks = $result[$i]['Remarks'];
|
||||
|
||||
$Updatedon= new DateTime($result[$i]['updatedOn']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$HTML.="<tr id='".$i."'>
|
||||
|
||||
<td align='left'>".$SNo."</td>
|
||||
|
||||
<td align='left'>". $AvailableQty."</td>
|
||||
|
||||
|
||||
|
||||
<td align='left'>".$UpdatedStock."</td>
|
||||
|
||||
<td align='left'>".$Updatedon->format('d-m-Y')."</td>
|
||||
|
||||
<td align='left'>".$Remarks."</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>";
|
||||
|
||||
$TotalStock = $TotalStock + $UpdatedStock;
|
||||
$TotalStock = $TotalStock + $UpdatedStock;
|
||||
|
||||
}
|
||||
|
||||
die(json_encode(array('History' =>$HTML,'AvalStock'=>$TotalStock)));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* To load pagenotfound view
|
||||
*/
|
||||
function pageNotFound()
|
||||
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
|
||||
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@ -36,8 +36,8 @@ class user extends BaseController
|
||||
|
||||
$this->load->model('dahsboard_Model');
|
||||
|
||||
$data['EmpCount'] = $this->employeedetails_model->getEmployeeCount();
|
||||
|
||||
$data['EmpCount'] = $this->employeedetails_model->getEmployeeCount();
|
||||
$data['UserCount'] = $this->dahsboard_Model->getUserCount();
|
||||
$data['totalpurchaseorder']=$this->dahsboard_Model->totalpurchaseorder();
|
||||
|
||||
//print_r( $data['totalpurchaseorder']);
|
||||
@ -72,13 +72,15 @@ class user extends BaseController
|
||||
|
||||
//dashboard pie chart
|
||||
$data['importbudgt'] = $this->dahsboard_Model->importbudgt();
|
||||
$data['importbal'] = $this->dahsboard_Model->importbal();
|
||||
//$data['importbal'] = $this->dahsboard_Model->importbal();
|
||||
$data['servicebudgt'] = $this->dahsboard_Model->servicebudgt();
|
||||
$data['servicebal'] = $this->dahsboard_Model->servicebal();
|
||||
//$data['servicebal'] = $this->dahsboard_Model->servicebal();
|
||||
$data['revenuebudgt'] = $this->dahsboard_Model->revenuebudgt();
|
||||
$data['revenuebal'] = $this->dahsboard_Model->revenuebal();
|
||||
//$data['revenuebal'] = $this->dahsboard_Model->revenuebal();
|
||||
$data['capitalbud'] = $this->dahsboard_Model->capitalbud();
|
||||
$data['capitalbal'] = $this->dahsboard_Model->capitalbal();
|
||||
//$data['capitalbal'] = $this->dahsboard_Model->capitalbal();
|
||||
$data['typebal'] = $this->dahsboard_Model->typebal();
|
||||
|
||||
|
||||
|
||||
/* HR DASHBOARD Controller Start*/
|
||||
@ -202,8 +204,8 @@ class user extends BaseController
|
||||
$Basic_Pay = $totalEmployeePersent[0]->Basic_Pay;
|
||||
$totalsalary = $totalEmployeePersent[0]->TotalSalary;
|
||||
$dayFoodAmt = $totalEmployeePersent[0]->Food_Allowances;
|
||||
|
||||
|
||||
//$allowances =$totalEmployeePersent[0]->Allowances;
|
||||
//$Allowances = $allowances * $values;
|
||||
$Food_Allowances = $dayFoodAmt * $values;
|
||||
|
||||
$daySalary = $Basic_Pay / $CUR_month;
|
||||
@ -227,7 +229,7 @@ class user extends BaseController
|
||||
$currentDayHra = $dayHra * $values;
|
||||
/** total working days hra calculations**/
|
||||
// echo $currentDayHra.'<br/>';
|
||||
$currentDatePF = $currentDaySalary + $currentDayHra;
|
||||
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
||||
/** current date pf calculation**/
|
||||
if ($totalsalary <= 20000) {
|
||||
|
||||
@ -240,8 +242,8 @@ class user extends BaseController
|
||||
/** pf amount per day**/
|
||||
|
||||
//echo $totalothour;die;
|
||||
$salaryInCurrentday = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances;
|
||||
|
||||
$salaryInCurrentdays = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances;
|
||||
$salaryInCurrentday = $salaryInCurrentdays - ($esiAmount + $pfAmount);
|
||||
$employeeSalary += round($salaryInCurrentday);
|
||||
|
||||
}
|
||||
@ -316,8 +318,8 @@ class user extends BaseController
|
||||
$Basic_Pay = $totalEmployeePersent[0]->Basic_Pay;
|
||||
$totalsalary = $totalEmployeePersent[0]->TotalSalary;
|
||||
$dayFoodAmt = $totalEmployeePersent[0]->Food_Allowances;
|
||||
|
||||
|
||||
//$allowances =$totalEmployeePersent[0]->Allowances;
|
||||
//$Allowances = $allowances * $values;
|
||||
$Food_Allowances = $dayFoodAmt * $values;
|
||||
|
||||
$daySalary = $Basic_Pay / $CUR_month;
|
||||
@ -341,7 +343,7 @@ class user extends BaseController
|
||||
$currentDayHra = $dayHra * $values;
|
||||
/** total working days hra calculations**/
|
||||
// echo $currentDayHra.'<br/>';
|
||||
$currentDatePF = $currentDaySalary + $currentDayHra;
|
||||
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
||||
/** current date pf calculation**/
|
||||
if ($totalsalary <= 20000) {
|
||||
|
||||
@ -354,8 +356,8 @@ class user extends BaseController
|
||||
/** pf amount per day**/
|
||||
|
||||
//echo $totalothour;die;
|
||||
$salaryInCurrentday = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances;
|
||||
|
||||
$salaryInCurrentdays = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances; /* + $Allowances;*/
|
||||
$salaryInCurrentday = $salaryInCurrentdays -($esiAmount+$pfAmount);
|
||||
|
||||
$totalSalarys = $totalSalary + $salaryInCurrentday;
|
||||
|
||||
|
||||
@ -2,7 +2,16 @@
|
||||
|
||||
class dahsboard_Model extends CI_Model
|
||||
{
|
||||
|
||||
/*Admin Dashboard - To get User count */
|
||||
function getUserCount()
|
||||
{
|
||||
|
||||
$sql="select count(userId) as users FROM tbl_users where isDeleted ='0'";
|
||||
$query =$this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* HR DASHBOART Model START*/
|
||||
function totemp()
|
||||
@ -13,8 +22,7 @@ class dahsboard_Model extends CI_Model
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function totloan()
|
||||
{
|
||||
|
||||
@ -304,9 +312,7 @@ function getTotalServicePoCount(){
|
||||
|
||||
|
||||
$sql="SELECT count(cmast.PONO) as totalService FROM T_PurchaseOrder_Master cmast
|
||||
left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
||||
left join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
||||
where ReqType='SERVICE' and month(PODate) = $i
|
||||
where POType='SERVICE' and Status != 'ST030' and month(PODate) = $i
|
||||
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
@ -334,9 +340,7 @@ function getTotalimportPoCount(){
|
||||
|
||||
|
||||
$sql="SELECT count(cmast.PONO) as totalImport FROM T_PurchaseOrder_Master cmast
|
||||
left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
||||
left join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
||||
where ReqType='IMPORT' and month(PODate) = $i
|
||||
where POType='IMPORT' and Status != 'ST030' and month(PODate) = $i
|
||||
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
@ -362,9 +366,7 @@ function getTotalcapitalPoCount(){
|
||||
while($i<=12){
|
||||
|
||||
$sql="SELECT count(cmast.PONO) as totalcapital FROM T_PurchaseOrder_Master cmast
|
||||
left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
||||
left join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
||||
where ReqType='CAPITAL' and month(PODate) = $i
|
||||
where POType='CAPITAL' and Status != 'ST030' and month(PODate) = $i
|
||||
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
@ -390,9 +392,7 @@ $i++;
|
||||
while($i<=12){
|
||||
|
||||
$sql="SELECT count(cmast.PONO) as totalrevenue FROM T_PurchaseOrder_Master cmast
|
||||
left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
||||
left join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
||||
where ReqType='REVENUE' and month(PODate) = $i
|
||||
where POType='REVENUE' and Status != 'ST030' and month(PODate) = $i
|
||||
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
@ -486,81 +486,49 @@ function importbudgt ()
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function importbal ()
|
||||
{
|
||||
$sql="SELECT ROUND(sum(BudgetAmount)-(SELECT
|
||||
ifnull((sum(distinct(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)
|
||||
as Util_Amount
|
||||
from T_CostCenter_Budget Cost_Center_Budget
|
||||
join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
|
||||
JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.POType=Cost_Center_Budget.BudgetType
|
||||
WHERE Cost_Center_Budget.BudgetType='IMPORT' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())),2) as balimportbudget FROM T_CostCenter_Budget where BudgetType ='IMPORT' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW()) ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function capitalbud ()
|
||||
{
|
||||
$sql="SELECT sum(BudgetAmount) as totalcapitalbudget FROM T_CostCenter_Budget where BudgetType ='CAPITAL' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW()) ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function capitalbal ()
|
||||
{
|
||||
$sql="SELECT ROUND(sum(BudgetAmount)-(SELECT
|
||||
ifnull(sum(distinct if(CapitalRange=0,(( PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate),( PO_Line_Item.Quantity * PO_Line_Item.Rate) - st.Afterdiscountval)),0)
|
||||
as Util_Amount
|
||||
from T_CostCenter_Budget Cost_Center_Budget
|
||||
join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
|
||||
JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.POType=Cost_Center_Budget.BudgetType and po.Status !='ST030'
|
||||
left JOIN T_Service_Tax st on st.LineItemNo = PO_Line_Item.LineItemNo
|
||||
WHERE Cost_Center_Budget.BudgetType='CAPITAL' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())),2) as balcapitalbudget FROM T_CostCenter_Budget where BudgetType ='CAPITAL' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())
|
||||
";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function servicebudgt ()
|
||||
{
|
||||
$sql="SELECT ROUND(sum(BudgetAmount),2) as totalservicebudget FROM T_CostCenter_Budget where BudgetType ='SERVICE' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function servicebal ()
|
||||
{
|
||||
$sql="SELECT Cost_Center_Budget.CostCenterCode as Cost_Center_Code, CostCenterName as Cost_Center_Name,group_concat(distinct Dept_Details.DepartmentName) as Dept_Name,Cost_Center_Budget.BudgetType as BudgetType,Cost_Center_Budget.BudgetYear as BudgetYear,
|
||||
case Cost_Center_Budget.BudgetType
|
||||
when 'SERVICE'
|
||||
then ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)
|
||||
end as service
|
||||
from T_CostCenter_Budget Cost_Center_Budget
|
||||
left join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
|
||||
left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.Status !='ST030'
|
||||
left JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo
|
||||
JOIN T_CostCenter_Master Cost_Mast on Cost_Center_Budget.CostCenterCode=Cost_Mast.CostCenterCode
|
||||
JOIN T_CostCenter_Departments CostCentDept on CostCentDept.CostCenterCode=Cost_Mast.CostCenterCode
|
||||
JOIN T_DepartmentDetails Dept_Details on Dept_Details.DEPCode= CostCentDept.DEPCode
|
||||
left JOIN T_Service_Tax st on st.LineItemNo = PO_Line_Item.LineItemNo
|
||||
WHERE Cost_Center_Budget.BudgetType = po.POType and date(po.PODate) >= '2017-04-01' and date(po.PODate) <= '2018-03-31'
|
||||
group by
|
||||
Cost_Center_Budget.BudgetType
|
||||
";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function revenuebudgt ()
|
||||
{
|
||||
$sql="SELECT ROUND(sum(BudgetAmount),2) as totalrevenuebudget FROM T_CostCenter_Budget where BudgetType ='REVENUE' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function revenuebal ()
|
||||
function typebal ()
|
||||
{
|
||||
$sql="SELECT ROUND(sum(BudgetAmount)-(SELECT
|
||||
ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(distinct T_Rev_Tax.AfterDiscount)),0)
|
||||
as Util_Amount
|
||||
$sql="SELECT Cost_Center_Budget.BudgetYear as BudgetYear,
|
||||
sum(if(Cost_Center_Budget.BudgetType='IMPORT',
|
||||
(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate,0)) as im,
|
||||
sum(if(Cost_Center_Budget.BudgetType='CAPITAL',
|
||||
if(CapitalRange=0,(( PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate),( PO_Line_Item.Quantity * PO_Line_Item.Rate) - st.Afterdiscountval),0)) as ca,
|
||||
sum(if(Cost_Center_Budget.BudgetType='SERVICE',
|
||||
PO_Line_Item.Quantity * PO_Line_Item.Rate,0)) as sr,
|
||||
sum(if(Cost_Center_Budget.BudgetType='REVENUE',
|
||||
(PO_Line_Item.Quantity * PO_Line_Item.Rate)-T_Rev_Tax.AfterDiscount,0)) as rv
|
||||
|
||||
from T_CostCenter_Budget Cost_Center_Budget
|
||||
join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
|
||||
JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo
|
||||
WHERE Cost_Center_Budget.BudgetType='REVENUE' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())),2) as balrevenuebudget FROM T_CostCenter_Budget where BudgetType ='REVENUE' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())";
|
||||
left join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
|
||||
left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.Status !='ST030'
|
||||
left JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo
|
||||
JOIN T_CostCenter_Master Cost_Mast on Cost_Center_Budget.CostCenterCode=Cost_Mast.CostCenterCode
|
||||
left JOIN T_Service_Tax st on st.LineItemNo = PO_Line_Item.LineItemNo
|
||||
WHERE Cost_Center_Budget.BudgetType = po.POType and date(po.PODate) >= '2017-04-01' and date(po.PODate) <= '2018-03-31'
|
||||
group by
|
||||
Cost_Center_Budget.BudgetYear
|
||||
";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
@ -696,7 +664,7 @@ if ($fa and $aa != ''){
|
||||
|
||||
|
||||
$sql="select ifnull(Dept_Details.DepartmentName,'-') As Dept_Name,
|
||||
SUM(CASE WHEN Mast.Status = 'ST015' THEN 1 ELSE 0 END) AS PO_Created,
|
||||
SUM(CASE WHEN Mast.Status = 'ST015' or Mast.Status = 'ST024' THEN 1 ELSE 0 END) AS PO_Created,
|
||||
SUM(CASE WHEN Mast.Status = 'ST025' THEN 1 ELSE 0 END) AS Approved,
|
||||
SUM(CASE WHEN Mast.Status = 'ST051' THEN 1 ELSE 0 END) AS Approver_Onhold,
|
||||
SUM(CASE WHEN Mast.Status = 'ST052' THEN 1 ELSE 0 END) AS Releaser_Onhold,
|
||||
@ -1193,6 +1161,51 @@ if ($cname!= ''){
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function consolidate_month($m=null,$cname=null,$mid=null,$fa=null,$aa=null){
|
||||
|
||||
$sql="select mm.Category as category,sd.SupplierID as sid,sd.SupplierName as supplier_name,mm.MaterialCode as mid,mm.MaterialName as material_name,
|
||||
sum(pl.Quantity) as quantity,
|
||||
sum(pl.Quantity * pl.Rate) as total
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and
|
||||
monthname(pm.PODate) = '".$m."' and sd.SupplierName = '".$cname."' and mm.MaterialCode = '".$mid."' ";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (pm.PODate >= '".$fa."-04-01' and pm.PODate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
$sql.= "group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function consolidate_year($cname=null,$mid=null,$fa=null,$aa=null){
|
||||
|
||||
$sql="select mm.Category as category,sd.SupplierID as sid,sd.SupplierName as supplier_name,mm.MaterialCode as mid,mm.MaterialName as material_name,
|
||||
sum(pl.Quantity) as quantity,
|
||||
sum(pl.Quantity * pl.Rate) as total
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName = '".$cname."' and mm.MaterialCode = '".$mid."' ";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (pm.PODate >= '".$fa."-04-01' and pm.PODate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
$sql.= "group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function report_cumulative(){
|
||||
|
||||
$sql="SELECT year.sid as sid,year.mid as mid,year.supplier_name as supplier_name,year.material_name as material_name,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
|
||||
@ -1302,13 +1315,14 @@ ifnull(sum(pl.Quantity * pl.Rate),0)))
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0)
|
||||
- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total
|
||||
- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total,pb.FilePath as file
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO
|
||||
where pm.Status != 'ST030' and pm.PONO in (select PONO from T_IGR_Master) ";
|
||||
|
||||
if ($cname!= ''){
|
||||
@ -1380,13 +1394,14 @@ ifnull(sum(pl.Quantity * pl.Rate),0)))
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0)
|
||||
- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total
|
||||
- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total,pb.FilePath as file
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO
|
||||
where
|
||||
pm.Status != 'ST030' ";
|
||||
|
||||
@ -1975,7 +1990,7 @@ if ($fa and $aa != ''){
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
//home --this month//
|
||||
function monthexpensereport()
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
@ -2000,31 +2015,22 @@ if ($fa and $aa != ''){
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
function yearexpensereport()
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.total
|
||||
end,'0') as expense,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.total
|
||||
end, '0') as income,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.towhom
|
||||
end,'-') as paymentname,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
date_format(date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.towhom,tinc.description,tinc.account_code,monthname(tinc.date)as month FROM t_income_expense tinc where year(date)= year(current_date()) group by month order by total desc limit 10 ";
|
||||
//home--this year//
|
||||
function yearexpensereport($fa,$aa)
|
||||
{
|
||||
$sql="select monthname(date) as month,
|
||||
sum(if(type='PAYMENT',total,0)) as exp,
|
||||
sum(if(type='RECEIPT',total,0)) as inc,
|
||||
sum(total) as total
|
||||
from t_income_expense
|
||||
where date >= '".$fa."-04-01' and date <= '".$aa."-03-31'
|
||||
group by month ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
//home--report--Day Wise Report //
|
||||
function today_data($value='')
|
||||
{
|
||||
$sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE";
|
||||
@ -2078,6 +2084,7 @@ if ($fa and $aa != ''){
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
//yearwise/month//
|
||||
function yearmonthwise($sid='')
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
@ -2131,6 +2138,22 @@ function INRSymbol()
|
||||
$query=$this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function cashbookfinyear(){
|
||||
|
||||
|
||||
$sql="SELECT
|
||||
CASE WHEN MONTH(date)>=4 THEN
|
||||
concat(YEAR(date), '-',YEAR(date)+1)
|
||||
ELSE concat(YEAR(date)-1,'-', YEAR(date)) END AS financial_year
|
||||
FROM t_income_expense
|
||||
GROUP BY financial_year";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
|
||||
|
||||
}
|
||||
function today()
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
@ -2160,7 +2183,7 @@ function INRSymbol()
|
||||
// $query = $this->db->query($sql);
|
||||
// return $query->result();
|
||||
//}
|
||||
//for menu link in monthly payments//
|
||||
|
||||
function monthlypayments()
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code WHERE MONTH(date) = MONTH(curdate()) group by account_code";
|
||||
@ -2169,10 +2192,11 @@ function INRSymbol()
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function departmentmenu($fdate,$tdate)
|
||||
|
||||
//home page --Reports//
|
||||
function departmentmenu($fdate,$tdate,$fa,$aa)
|
||||
{
|
||||
$fdate= date("Y-m-d",strtotime($fdate));
|
||||
$tdate=date("Y-m-d",strtotime($tdate));
|
||||
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
@ -2190,10 +2214,25 @@ function INRSymbol()
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
tinc.total,tinc.towhom,tinc.description,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.date >= '".$fdate."' and tinc.date <= '".$tdate."'";
|
||||
tinc.total,tinc.towhom,tinc.description,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.date !=0 ";
|
||||
if ($fdate and $tdate != ''){
|
||||
$fdate= date("Y-m-d",strtotime($fdate));
|
||||
$tdate=date("Y-m-d",strtotime($tdate));
|
||||
|
||||
$sql.="and date(tinc.date) >= '".$fdate."'
|
||||
and date(tinc.date) <= '".$tdate."'";
|
||||
}
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (tinc.date >= '".$fa."-04-01' and tinc.date <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
//echo $fdate;
|
||||
//print_r($this->db->last_query());
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
@ -791,7 +791,7 @@ function GetPOType($ReqNo)
|
||||
Mat.UOM,Mat.HSNCODE,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
|
||||
ROUND(((AfterSGST + AfterCGST +
|
||||
AfterIGST)) ,2)as Taxamount,AdvanceAmount,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,sup.SupplierID,sup.ContactNumber,sup.EmailAddress,sup.PAN,sup.GSTNO,LineItem.AmendedDetails as LineAmend,Payment.PaymentTerms,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,sup.SupplierID,sup.ContactNumber,sup.EmailAddress,sup.PAN,sup.GSTNO,LineItem.AmendedDetails as LineAmend,Payment.PaymentTerms
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
|
||||
@ -163,64 +163,49 @@
|
||||
foreach ($spurchse as $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $result->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/link_purchase?cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&ab=<?php echo $ab;?>"><?php echo $result->supplier_name;?> </a>
|
||||
</td>
|
||||
<td style="text-align:left;"><?php
|
||||
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$apr= $apr + round($result->April);
|
||||
if(!empty($result->April)) { echo round($result->April); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$may= $may + round($result->May);
|
||||
if(!empty($result->May)) { echo round($result->May); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$jun= $jun + round($result->June);
|
||||
if(!empty($result->June)) { echo round($result->June); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$jul= $jul + round($result->July);
|
||||
if(!empty($result->July)) { echo round($result->July); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$aug= $aug + round($result->August);
|
||||
if(!empty($result->August)) { echo round($result->August); } else {echo "-";}
|
||||
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$sep= $sep + $result->September;
|
||||
if(!empty($result->September)) { echo round($result->September); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$oct= $oct + round($result->October);
|
||||
if(!empty($result->October)) { echo round($result->October); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$nov= $nov + round($result->November);
|
||||
if(!empty($result->November)) { echo round($result->November); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$dec= $dec + round($result->December);
|
||||
if(!empty($result->December)) { echo round($result->December); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$jan= $jan + round($result->January);
|
||||
if(!empty($result->January)) { echo round($result->January); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$feb= $feb + round($result->February);
|
||||
if(!empty($result->February)) { echo round($result->February); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$mar= $mar + round($result->March);
|
||||
if(!empty($result->March)) { echo round($result->March); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$tot= $tot + round($result->qtotal);
|
||||
if(!empty($result->qtotal)) { echo round($result->qtotal); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php $apr= $apr + round($result->April); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $may= $may + round($result->May);?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a></td>
|
||||
<td style="text-align:right;"><?php $jun= $jun + round($result->June);?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $jul= $jul + round($result->July);?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $aug= $aug + round($result->August); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $sep= $sep + round($result->September); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $oct= $oct + round($result->October); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $nov= $nov + round($result->November); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $dec= $dec + round($result->December); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $jan= $jan + round($result->January); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $feb= $feb + round($result->February); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $mar= $mar + round($result->March); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $tot= $tot + round($result->qtotal); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>"><?php echo round($result->qtotal);?> </a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
@ -407,63 +392,51 @@
|
||||
$tot = 0;
|
||||
foreach ($spurchse as $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;"><a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $result->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?></a></td>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/link_purchase?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a>
|
||||
</td>
|
||||
<td style="text-align:left;"><?php
|
||||
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$apr= $apr + round($result->vApril);
|
||||
if(!empty($result->vApril)) { echo number_format($result->vApril,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$may= $may + round($result->vMay);
|
||||
if(!empty($result->vMay)) { echo number_format($result->vMay,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$jun= $jun + round($result->vJune);
|
||||
if(!empty($result->vJune)) { echo number_format($result->vJune,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$jul= $jul + round($result->vJuly);
|
||||
if(!empty($result->vJuly)) { echo number_format($result->vJuly,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$aug= $aug + round($result->vAugust);
|
||||
if(!empty($result->vAugust)) { echo number_format($result->vAugust,2,'.',''); } else {echo "-";}
|
||||
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$sep= $sep + $result->vSeptember;
|
||||
if(!empty($result->vSeptember)) { echo number_format($result->vSeptember,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$oct= $oct + round($result->vOctober);
|
||||
if(!empty($result->vOctober)) { echo number_format($result->vOctober,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$nov= $nov + round($result->vNovember);
|
||||
if(!empty($result->vNovember)) { echo number_format($result->vNovember,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$dec= $dec + round($result->vDecember);
|
||||
if(!empty($result->vDecember)) { echo number_format($result->vDecember,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$jan= $jan + round($result->vJanuary);
|
||||
if(!empty($result->vJanuary)) { echo number_format($result->vJanuary,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$feb= $feb + round($result->vFebruary);
|
||||
if(!empty($result->vFebruary)) { echo number_format($result->vFebruary,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$mar= $mar + round($result->vMarch);
|
||||
if(!empty($result->vMarch)) { echo number_format($result->vMarch,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php
|
||||
$tot= $tot + round($result->vtotal);
|
||||
if(!empty($result->vtotal)) { echo number_format($result->vtotal,2,'.',''); } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php $apr= $apr + number_format($result->vApril,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo number_format($result->vApril,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $may= $may + number_format($result->vMay,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo number_format($result->vMay,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $jun= $jun + number_format($result->vJune,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo number_format($result->vJune,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $jul= $jul + number_format($result->vJuly,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo number_format($result->vJuly,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $aug= $aug + number_format($result->vAugust,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo number_format($result->vAugust,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $sep= $sep + number_format($result->vSeptember,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo number_format($result->vSeptember,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $oct= $oct + number_format($result->vOctober,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo number_format($result->vOctober,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $nov= $nov + number_format($result->vNovember,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo number_format($result->vNovember,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $dec= $dec + number_format($result->vDecember,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo number_format($result->vDecember,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $jan= $jan + number_format($result->vJanuary,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo number_format($result->vJanuary,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $feb= $feb + number_format($result->vFebruary,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo number_format($result->vFebruary,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $mar= $mar + number_format($result->vMarch,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo number_format($result->vMarch,2,'.','');?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;"><?php $tot= $tot + number_format($result->vtotal,2,'.',''); ?>
|
||||
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&cname=<?php echo $result->supplier_name;?>&mid=<?php echo $result->mid;?>"><?php echo number_format($result->vtotal,2,'.','');?> </a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
199
application/views/Report_consolidate_m.php
Normal file
199
application/views/Report_consolidate_m.php
Normal file
@ -0,0 +1,199 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Consolidate(<?php
|
||||
$m = $this->input->get('m');
|
||||
echo $m;
|
||||
?>)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if(!empty($spurchse)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
$ab=$this->input->get('ab');
|
||||
$month=date('F');
|
||||
$m = $this->input->get('m');
|
||||
//echo $month;
|
||||
foreach($spurchse as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?ab=<?php echo $ab;?>&cname=<?php echo $rel->supplier_name;?>&mid=<?php echo $rel->mid;?>&month=<?php echo $m;?>"><?php echo $rel->supplier_name;?> </a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->quantity);
|
||||
echo round($rel->quantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->total,2,'.','');
|
||||
echo number_format($rel->total,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: 'REPORT-Consolidate',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -172,7 +172,7 @@ $(document).ready(function() {
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: 'REPORT-Consolidate Category-Wise',
|
||||
title: 'REPORT - Consolidate Inward',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
|
||||
200
application/views/Report_consolidate_y.php
Normal file
200
application/views/Report_consolidate_y.php
Normal file
@ -0,0 +1,200 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Consolidate(<?php
|
||||
$m = $this->input->get('ab');
|
||||
echo $m;
|
||||
?>)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if(!empty($spurchse)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
$ab=$this->input->get('ab');
|
||||
|
||||
$month=date('F');
|
||||
//echo $month;
|
||||
foreach($spurchse as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?cname=<?php echo $rel->supplier_name;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?> </a>
|
||||
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->quantity);
|
||||
echo round($rel->quantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->total,2,'.','');
|
||||
echo number_format($rel->total,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: 'REPORT-Consolidate',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -174,7 +174,7 @@ $(document).ready(function() {
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: 'REPORT-Consolidate Category-Wise',
|
||||
title: 'REPORT - Consolidate Inward',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
|
||||
@ -321,7 +321,16 @@ if(!empty($mms))
|
||||
echo $rel->Package;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_tot= $tot_tot + round($rel->total,2);
|
||||
echo number_format($rel->total,2,'.','');?></span></td>
|
||||
|
||||
if(!empty($rel->file)){ ?>
|
||||
<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $rel->file ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><?php echo number_format($rel->total,2,'.','');?></a>
|
||||
<?php
|
||||
}else
|
||||
{
|
||||
echo number_format($rel->total,2,'.','');
|
||||
}
|
||||
?>
|
||||
</span></td>
|
||||
|
||||
|
||||
|
||||
@ -573,6 +582,11 @@ buttons: [
|
||||
$('#mySelect').val('');
|
||||
|
||||
}
|
||||
$(document).ready(function(){
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,19 @@
|
||||
<?php
|
||||
//print_r($getTotalServicePoCount);
|
||||
$Empcnt = '';
|
||||
|
||||
//echo $DEPCode;
|
||||
//echo ROLE_MANAGER;
|
||||
|
||||
if(!empty($EmpCount))
|
||||
{
|
||||
foreach ($EmpCount as $Emp)
|
||||
{
|
||||
$Empcnt = $Emp->EmpCount;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@ -532,26 +533,31 @@ $("#monthabs").val('');
|
||||
|
||||
<!-- Dashboard for admin-->
|
||||
<?php
|
||||
$user='';
|
||||
if(!empty($UserCount))
|
||||
{
|
||||
foreach ($UserCount as $uc)
|
||||
{
|
||||
$user = $uc->users;
|
||||
}
|
||||
}
|
||||
if($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR)
|
||||
{
|
||||
?>
|
||||
<div class="content">
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1> Admin Dashboard </h1>
|
||||
<h1> Admin Dashboard </h1>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<!-- ./col -->
|
||||
<!-- Info boxes -->
|
||||
<div class="row">
|
||||
<!-- fix for small devices only -->
|
||||
<div class=" col-xs-12 col-md-4 col-md-offset-4">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner">
|
||||
<h3>44</h3>
|
||||
|
||||
<h3><?php echo $user ?></h3>
|
||||
<p>User Registrations</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
@ -560,13 +566,9 @@ $("#monthabs").val('');
|
||||
<a href="<?php echo base_url(); ?>userListing" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ./col -->
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
@ -574,7 +576,7 @@ $("#monthabs").val('');
|
||||
|
||||
<!-- Dashboard for Manager department-->
|
||||
<?php
|
||||
if($role == ROLE_MANAGER && $DEPCode != MANAGEMENT)
|
||||
if($role == ROLE_MANAGER && $DEPCode != MANAGEMENT && $DEPCode != HR)
|
||||
{
|
||||
?>
|
||||
<div class="content-wrapper">
|
||||
@ -789,7 +791,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<div class="col-md-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Monthly Released Purchase Order</h3>
|
||||
<h3 class="box-title">Monthly Purchase Order</h3>
|
||||
|
||||
<!--<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
@ -938,18 +940,18 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<div class="col-xs-6 col-md-3 text-center">
|
||||
<div class="description-block border-right">
|
||||
<?php foreach($servicebudgt as $service)
|
||||
if(!empty($servicebal))
|
||||
if(!empty($typebal))
|
||||
{
|
||||
foreach($servicebal as $serviceb)
|
||||
$sb=$service->totalservicebudget-$serviceb->service;
|
||||
foreach($typebal as $serviceb)
|
||||
$sb=$service->totalservicebudget-$serviceb->sr;
|
||||
{
|
||||
?>
|
||||
<div class="knob-label"><strong style="color:#00c0ef">SERVICE BUDGET</strong></div>
|
||||
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php
|
||||
echo $sb;?> data-min="20" data-max=<?php echo $service->totalservicebudget;?> data-width="" data-height="" data-fgColor="#00c0ef "> <br>
|
||||
echo number_format($sb,2,'.','');?> data-min="20" data-max=<?php echo $service->totalservicebudget;?> data-width="" data-height="" data-fgColor="#00c0ef "> <br>
|
||||
<div class="knob-label"><strong>TOTAL : <i class="fa fa-rupee " ></i> <?php echo $service->totalservicebudget;?></strong></div>
|
||||
<div class="knob-label"><strong>BALANCE : <i class="fa fa-rupee " ></i> <?php
|
||||
echo $sb;?></strong></div>
|
||||
echo number_format($sb,2,'.','');?></strong></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@ -962,18 +964,17 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<?php // if(!empty($totalrevenuepo))
|
||||
// {
|
||||
foreach($revenuebudgt as $revenue)
|
||||
if(!empty($revenuebal))
|
||||
if(!empty($typebal))
|
||||
{
|
||||
foreach($revenuebal as $revenueb)
|
||||
|
||||
foreach($typebal as $revenueb)
|
||||
$rb=$revenue->totalrevenuebudget-$revenueb->rv;
|
||||
{
|
||||
|
||||
?>
|
||||
<div class="knob-label"><strong style="color:#dd4b39">REVENUE BUDGET</strong></div>
|
||||
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value="<?php echo $revenueb->balrevenuebudget;?> " data-min="0" data-max=<?php echo $revenue->totalrevenuebudget;?> data-width="" data-height="" data-fgColor="#dd4b39 "> <br>
|
||||
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value="<?php echo number_format($rb,2,'.','');?> " data-min="0" data-max=<?php echo $revenue->totalrevenuebudget;?> data-width="" data-height="" data-fgColor="#dd4b39 "> <br>
|
||||
<div class="knob-label"><strong>TOTAL : <i class="fa fa-rupee " ></i> <?php echo $revenue->totalrevenuebudget;?> </strong> </div>
|
||||
<div class="knob-label"><strong>BALANCE : <i class="fa fa-rupee " ></i> <?php echo $revenueb->balrevenuebudget;?></strong> </div>
|
||||
|
||||
<div class="knob-label"><strong>BALANCE : <i class="fa fa-rupee " ></i> <?php echo number_format($rb,2,'.','');?></strong> </div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@ -984,15 +985,16 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<div class="col-xs-6 col-md-3 text-center">
|
||||
<div class="description-block border-right">
|
||||
<?php foreach($importbudgt as $import)
|
||||
if(!empty($importbal)){
|
||||
foreach($importbal as $importb)
|
||||
if(!empty($typebal)){
|
||||
foreach($typebal as $importb)
|
||||
$im=$import->totalimportbudget-$importb->im;
|
||||
{
|
||||
|
||||
?>
|
||||
<div class="knob-label"><strong style="color:#00a65a">IMPORT BUDGET</strong></div>
|
||||
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $importb->balimportbudget;?> data-min="0" data-max=<?php echo $import->totalimportbudget;?> data-width="" data-height="" data-fgColor="#00a65a "> <br>
|
||||
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo number_format($im,2,'.','');?> data-min="0" data-max=<?php echo $import->totalimportbudget;?> data-width="" data-height="" data-fgColor="#00a65a "> <br>
|
||||
<div class="knob-label"><strong>TOTAL : <i class="fa fa-rupee " ></i> <?php echo $import->totalimportbudget;?> </strong></div>
|
||||
<div class="knob-label"><strong>BALANCE : <i class="fa fa-rupee " ></i> <?php echo $importb->balimportbudget;?> </strong></div>
|
||||
<div class="knob-label"><strong>BALANCE : <i class="fa fa-rupee " ></i> <?php echo number_format($im,2,'.','');?> </strong></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@ -1002,16 +1004,17 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<div class="col-xs-6 col-md-3 text-center">
|
||||
<div class="description-block border-right">
|
||||
<?php foreach($capitalbud as $capital)
|
||||
if(!empty($capitalbal)){
|
||||
foreach($capitalbal as $capitalb)
|
||||
if(!empty($typebal)){
|
||||
foreach($typebal as $capitalb)
|
||||
$ca=$capital->totalcapitalbudget-$capitalb->ca;
|
||||
|
||||
{
|
||||
|
||||
?>
|
||||
<div class="knob-label"><strong style="color:#f39c12">CAPITAL BUDGET</strong></div>
|
||||
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo $capitalb->balcapitalbudget;?> data-min="0" data-max=<?php echo $capital->totalcapitalbudget;?> data-fgColor="#f39c12 "><br>
|
||||
<input type="text" class="knob" data-thickness="0.4" data-readonly="true" value=<?php echo number_format($ca,2,'.','');?> data-min="0" data-max=<?php echo $capital->totalcapitalbudget;?> data-fgColor="#f39c12 "><br>
|
||||
<div class="knob-label"><strong>TOTAL : <i class="fa fa-rupee " ></i> <?php echo $capital->totalcapitalbudget;?></strong></div>
|
||||
<div class="knob-label"><strong>BALANCE : <i class="fa fa-rupee " ></i> <?php echo $capitalb->balcapitalbudget;?></strong> </div>
|
||||
<div class="knob-label"><strong>BALANCE : <i class="fa fa-rupee " ></i> <?php echo number_format($ca,2,'.','');?></strong> </div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,6 +67,7 @@
|
||||
|
||||
$('#datatable').DataTable({
|
||||
"paging": true,
|
||||
"responsive": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -444,10 +444,11 @@ function Redirect()
|
||||
$('#Items').DataTable({
|
||||
|
||||
"paging": true,
|
||||
"responsive": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
|
||||
@ -1267,7 +1267,7 @@
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Permission Time</label>
|
||||
<label>Permission Time(Hours : Min)</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Pretime','value' => set_value('Pretime',''),'id'=>'Pretime', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
@ -1311,13 +1311,13 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#timepicker1').timepicker({
|
||||
minuteStep: 1,
|
||||
minuteStep: 5,
|
||||
defaultTime:'current'
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$('#timepicker2').timepicker({
|
||||
minuteStep: 1,
|
||||
minuteStep: 5,
|
||||
defaultTime:'current'
|
||||
});
|
||||
</script>
|
||||
@ -1364,17 +1364,28 @@ function calculateTime() {
|
||||
var timeStart = new Date("01/01/2007 " + valuestart);
|
||||
var timeEnd = new Date("01/01/2007 " + valuestop);
|
||||
|
||||
|
||||
var hourDiff = timeEnd - timeStart;
|
||||
var hourDiff = timeEnd-timeStart;
|
||||
var minites = hourDiff/ 60/ 60 /1000;
|
||||
minites = minites.toFixed(2);
|
||||
// alert(minites);
|
||||
$("#Pretime").val(minites);
|
||||
minites = minites.toFixed(2);
|
||||
var resstr = minites.split(".");
|
||||
var hrs = resstr[0];
|
||||
var min = resstr[1];
|
||||
var min1 =min * 60 / 100;
|
||||
|
||||
min1 = Math.round(min1);
|
||||
|
||||
if (minites< 0) {
|
||||
swal('Please enter a invalid time');
|
||||
$("#Pretime").val(0);
|
||||
} else{
|
||||
$("#Pretime").val(hrs+':'+min1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#timepicker2").change(calculateTime);
|
||||
// alert();
|
||||
|
||||
calculateTime();
|
||||
|
||||
});
|
||||
@ -1384,25 +1395,23 @@ $("#save").click(function(){
|
||||
var emp = $("#emp").val();
|
||||
var shift = $("#shift").val();
|
||||
var res = $("#Reason").val();//alert(emp);
|
||||
|
||||
var time1=$('#timepicker1').val();
|
||||
var time2=$('#timepicker2').val();
|
||||
|
||||
if(emp == '-1'){
|
||||
alert('Please Select Employee');
|
||||
swal('Please Select Employee');
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
// if(!$.trim(shift) ==""){
|
||||
// alert('Please Enter the Shift');
|
||||
// return false;
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
// if(res === 0){
|
||||
// alert('Please Enter The Reason');
|
||||
// return false;
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
if(time1 != time2)
|
||||
{
|
||||
swal('Please Select To Time');
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -262,7 +262,7 @@ $('#addspec').click(function(){
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
swal('Please Select Product and Customer.');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -277,7 +277,7 @@ $('#addspec').click(function(){
|
||||
var customerinward = $('#customerinward').val();
|
||||
if(productinward == -1 || customerinward == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
swal('Please Select Product and Customer.');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -302,7 +302,7 @@ function addNewRow()
|
||||
|
||||
if(sname == '' || uom =='' || min == '' || max == '' || temp == '')
|
||||
{
|
||||
alert('Please Enter all specification');
|
||||
swal('Please Enter all specification');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -351,7 +351,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
// alert(customer);exit();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
swal('Please Select Product and Customer.');
|
||||
}
|
||||
else{
|
||||
$('#content').loader('show');
|
||||
@ -364,7 +364,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
if(data)
|
||||
{
|
||||
|
||||
alert(data);
|
||||
swal(data);
|
||||
//console.log(data);
|
||||
window.location = "<?php echo base_url().'quality';?>";
|
||||
$('#content').loader('hide');
|
||||
@ -384,7 +384,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
swal('Please Select Product and Customer.');
|
||||
}
|
||||
else{
|
||||
var rowid = rowid;
|
||||
@ -407,7 +407,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
|
||||
success:function(data){
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
swal(data);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -183,7 +183,7 @@ $('#addspec').click(function(){
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
swal('Please Select Product and Customer.');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -203,7 +203,7 @@ function addNewRow()
|
||||
|
||||
if(sname == '' || uom =='' || min == '' || max == '')
|
||||
{
|
||||
alert('Please Enter all specification');
|
||||
swal('Please Enter all specification');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -239,7 +239,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
swal('Please Select Product and Customer.');
|
||||
}
|
||||
else{
|
||||
$('#content').loader('show');
|
||||
@ -252,7 +252,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
swal(data);
|
||||
//console.log(data);
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
swal('Please Select Product and Customer.');
|
||||
}
|
||||
else{
|
||||
var d='';
|
||||
@ -292,7 +292,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
|
||||
success:function(data){
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
swal(data);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -405,14 +405,14 @@ function calculateMaster(id)
|
||||
var SW12 = document.getElementById('12sw').textContent;
|
||||
if(SW12 != 100)
|
||||
{
|
||||
alert('AFS Details Sand Weight Total Should be 100..!');
|
||||
swal('AFS Details Sand Weight Total Should be 100..!');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if($('#invoiceno').val() == -1)
|
||||
{
|
||||
alert('Select Invoice No');
|
||||
swal('Select Invoice No');
|
||||
return false;
|
||||
}
|
||||
var cid = id;
|
||||
@ -583,7 +583,7 @@ function calculateMaster(id)
|
||||
|
||||
if($('#invoiceno').val() == -1 || $('#reportdate').val() == '')
|
||||
{
|
||||
alert('Select Invoice No and Batch Date');
|
||||
swal('Select Invoice No and Batch Date');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -601,13 +601,13 @@ function calculateMaster(id)
|
||||
var total_sandweight = parseFloat(document.getElementById('12sw').textContent);
|
||||
if(flag != 0 || (total_sandweight!=100) )
|
||||
{
|
||||
alert('Test Failed, Cant Save Test Report!');
|
||||
swal('Test Failed, Cant Save Test Report!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if($('#approvedby').val() == -1)
|
||||
{
|
||||
alert('Enter Approver Name');
|
||||
swal('Enter Approver Name');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -632,7 +632,7 @@ function calculateMaster(id)
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
swal('Please Select Product and Customer.');
|
||||
}
|
||||
else{
|
||||
|
||||
@ -646,7 +646,7 @@ function calculateMaster(id)
|
||||
url:"<?php echo base_url() ?>quality/saveTestReportData",
|
||||
success:function(data) {
|
||||
if(data){
|
||||
alert(data);
|
||||
swal(data);
|
||||
$('.content').loader('hide');
|
||||
window.location = "<?php echo base_url().'qualityreportlist';?>";
|
||||
}
|
||||
@ -668,7 +668,7 @@ function calculateMaster(id)
|
||||
|
||||
if($('#invoiceno').val() == -1)
|
||||
{
|
||||
alert('Select Invoice No');
|
||||
swal('Select Invoice No');
|
||||
return false;
|
||||
}
|
||||
var cid = cid;
|
||||
|
||||
@ -253,7 +253,7 @@ $("#myModal").on("shown.bs.modal", function(e) {
|
||||
success:function(json) {
|
||||
// success:function(data) {
|
||||
$('#content').loader('hide');
|
||||
//alert(data);
|
||||
|
||||
$("#ReqType").val(json.Requist[0]['ReqType']);
|
||||
$("#ReqBy").val(json.Requist[0]['FirstName']);
|
||||
$("#ReqDate").val(json.Requist[0]['CreatedDate']);
|
||||
@ -285,7 +285,7 @@ function saveToDatabase(editableObj,column,ReqId,Index) {
|
||||
var Remarks = $('#Remarks'+Index).val();
|
||||
if(Status == '3' && Remarks == '')
|
||||
{
|
||||
alert('Please enter remarks');
|
||||
swal('Please enter remarks');
|
||||
$('#status'+Index).val('1');
|
||||
return false;
|
||||
|
||||
@ -303,12 +303,12 @@ function saveToDatabase(editableObj,column,ReqId,Index) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
swal(data);
|
||||
location.reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
swal(data);
|
||||
|
||||
location.reload();
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
}});
|
||||
|
||||
@ -1,34 +1,22 @@
|
||||
<!-- <?php
|
||||
|
||||
|
||||
|
||||
$DraftCount = '';
|
||||
|
||||
$ReqNo = '';
|
||||
|
||||
if(!empty($Status))
|
||||
{
|
||||
foreach ($Status as $St)
|
||||
{
|
||||
|
||||
{
|
||||
//$DraftCount = $St->cnt;
|
||||
//$ReqNo = $St->ReqNo;
|
||||
|
||||
foreach ($Status as $St)
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
//$DraftCount = $St->cnt;
|
||||
|
||||
//$ReqNo = $St->ReqNo;
|
||||
|
||||
}
|
||||
|
||||
//echo $ReqNo;
|
||||
//echo $ReqNo;
|
||||
|
||||
}?> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
<style>
|
||||
|
||||
span.highlight {
|
||||
|
||||
@ -39,123 +27,48 @@ span.highlight {
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
|
||||
|
||||
<section class="content">
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<?php
|
||||
|
||||
<div class="col-md-3">
|
||||
$attributes = array('class' => 'form-label-left Storerequistion ','name' => 'Storerequistion','id' => 'Storerequistion');
|
||||
echo form_open($this->config->base_url().'storerequisitionlist/addstorerequisitionlist',$attributes); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$attributes = array('class' => 'form-label-left Storerequistion ','name' => 'Storerequistion','id' => 'Storerequistion');
|
||||
|
||||
|
||||
|
||||
echo form_open($this->config->base_url().'storerequisitionlist
|
||||
|
||||
/ addstorerequisitionlist',$attributes); ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3 col-md-offset-3">
|
||||
|
||||
<label> </label>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<input type="hidden" name="FromDate" id="FromDate" />
|
||||
|
||||
<input type="hidden" name="ToDate" id="ToDate" />
|
||||
|
||||
|
||||
|
||||
<!-- <input type="Reset" class="btn btn-primary" >
|
||||
|
||||
|
||||
|
||||
<!-- <button type="button" class="close" data-dismiss="modal">×</button>
|
||||
|
||||
<!--<a class="btn btn-info" onclick="Search()" >Search</a> -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-md-offset-3">
|
||||
<label> </label>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="FromDate" id="FromDate" />
|
||||
<input type="hidden" name="ToDate" id="ToDate" />
|
||||
<!-- <input type="Reset" class="btn btn-primary" >
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<a class="btn btn-info" onclick="Search()" >Search</a>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- model to show Store requisition detail -->
|
||||
|
||||
<div class="modal fade" id="storereqdetail" role="dialog">
|
||||
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
|
||||
<form>
|
||||
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
|
||||
<center><h4> Store Requisition Number Details </h4></center>
|
||||
|
||||
</div>
|
||||
|
||||
<div align="left">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4> Store Requisition Number Details </h4></center>
|
||||
</div>
|
||||
<div align="left">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Requistion No</label>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'ReqNO','value' => set_value('ReqNO'),'id'=>'ReqNO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
@ -165,371 +78,171 @@ span.highlight {
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Requested By</label>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'ReqBy','value' => set_value('ReqBy'),'id'=>'ReqBy', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
|
||||
echo form_input($data);
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<label>Department</label>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'Desigination','value' => set_value('Desigination'),'id'=>'Desigination', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<label>Requested Date</label>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
<div class="col-md-6">
|
||||
<label>Requested Date</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'ReqDate','value' => set_value('ReqDate'),'id'=>'ReqDate', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>Cost Center Name</label>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$data = array('name' => 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
|
||||
echo form_input($data);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-4">
|
||||
|
||||
<label>Avl Budget Amt</label> <img id="AlertImg" src="<?php echo base_url(); ?>assets/dist/img/red.png" alt="your image" width="25px" style="display:none"/>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'AvlBudgetAmount','value' => set_value('AvlBudgetAmount'),'id'=>'AvlBudgetAmount', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
|
||||
<div align="right" style="padding-right:10px">
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" role="dialog">
|
||||
|
||||
|
||||
|
||||
<thead style="background-color:#ddf">
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<th>SNo</th>
|
||||
|
||||
<th>Item Code</th>
|
||||
|
||||
<th>Item Description</th>
|
||||
|
||||
<th>UOM</th>
|
||||
|
||||
<th>Requested Quantity</th>
|
||||
|
||||
<th>Issued Quantity</th>
|
||||
|
||||
<th>Remarks</th>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody id="tbleAppend">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
<table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div class="modal fade" role="dialog">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Item Code</th>
|
||||
<th>Item Description</th>
|
||||
<th>UOM</th>
|
||||
<th>Requested Quantity</th>
|
||||
<th>Issued Quantity</th>
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbleAppend">
|
||||
</tbody>
|
||||
</div>
|
||||
</div>
|
||||
</table>
|
||||
|
||||
<div class="modal-footer"> <div class="col-md-12">
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Ok</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</table>
|
||||
|
||||
<div class="modal-footer"> <div class="col-md-12">
|
||||
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Ok</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-12">
|
||||
|
||||
<div class="box">
|
||||
|
||||
<div class=" container-fluid">
|
||||
|
||||
<div class="box-header">
|
||||
|
||||
<CENTER><h3 class="box-title">Resico Industries - Store Requisition Listing</h3></CENTER>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<table id="Requisition" class="table table-bordered table-hover editabletable" style="background-color:#fff;font-size:12px;">
|
||||
|
||||
<table id="Requisition" class="table table-bordered table-hover editabletable" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Store Requisition No</th>
|
||||
|
||||
<th>Requested Department</th>
|
||||
|
||||
<th>Requested By</th>
|
||||
|
||||
<th>Requested Date</th>
|
||||
|
||||
<th>Status</th>
|
||||
|
||||
<th>Approver Comments</th>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($TotNoOfLine))
|
||||
{
|
||||
$index = 0;
|
||||
foreach($TotNoOfLine as $record)
|
||||
{
|
||||
$index = $index +1;
|
||||
?>
|
||||
<tr id="<?php echo $index ?>" >
|
||||
<td><a data-toggle="tooltip" href="<?php echo base_url().'storerequisitionlist/issuestorerequisition?ReqNo='.$record->StoreReqNo; ?>" title="<?php echo $record->StoreReqNo; ?> - Click here to view store Requisition details" ><u><?php echo $record->StoreReqNo ?></u></a>
|
||||
</td>
|
||||
<td><?php echo $record->DepartmentName ?></td>
|
||||
<td><?php echo $record->Requestedby ?></td>
|
||||
<td align="right"><?php
|
||||
|
||||
if(!empty($TotNoOfLine))
|
||||
$rdate = new DateTime($record->ReqDate) ;
|
||||
$ReqDate = $rdate->format('d-m-Y');
|
||||
echo $ReqDate; ?></td>
|
||||
|
||||
{
|
||||
|
||||
$index = 0;
|
||||
|
||||
foreach($TotNoOfLine as $record)
|
||||
|
||||
{
|
||||
|
||||
$index = $index +1;
|
||||
|
||||
?>
|
||||
|
||||
<tr id="<?php echo $index ?>" >
|
||||
|
||||
<td><a data-toggle="tooltip" href="<?php echo base_url().'storerequisitionlist/issuestorerequisition?ReqNo='.$record->StoreReqNo; ?>" title="<?php echo $record->StoreReqNo; ?> - Click here to view store Requisition details" ><u><?php echo $record->StoreReqNo ?></u></a>
|
||||
|
||||
</td>
|
||||
|
||||
<td><?php echo $record->DepartmentName ?></td>
|
||||
|
||||
<td><?php echo $record->Requestedby ?></td>
|
||||
|
||||
<td align="right"><?php
|
||||
|
||||
$rdate = new DateTime($record->ReqDate) ;
|
||||
|
||||
$ReqDate = $rdate->format('d-m-Y');
|
||||
|
||||
echo $ReqDate; ?></td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td><?php echo $record->StatusName ?></td>
|
||||
|
||||
<td> <?php echo $record->Remarks ?></td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<div id="content"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<td><?php echo $record->StatusName ?></td>
|
||||
<td><?php echo $record->Remarks ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var startDate = '';
|
||||
|
||||
var endDate = '';
|
||||
|
||||
|
||||
|
||||
function SaveIssueQuantity(rowid)
|
||||
|
||||
{
|
||||
|
||||
var IssueQty = $("#IssuedQuantity"+RowId).val();
|
||||
|
||||
|
||||
|
||||
if( IssueQty != '')
|
||||
|
||||
{
|
||||
|
||||
$('#content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
|
||||
data:{id:IssueQty},
|
||||
|
||||
type:"POST",
|
||||
|
||||
url:"<?php echo base_url() ?>storerequisitionlist/SaveIssuedQuantity",
|
||||
|
||||
success:function(data) {
|
||||
|
||||
$('#content').loader('hide');
|
||||
|
||||
alert(data);
|
||||
|
||||
swal(data);
|
||||
location.reload();
|
||||
|
||||
}
|
||||
@ -541,260 +254,124 @@ span.highlight {
|
||||
}
|
||||
|
||||
function Reset()
|
||||
|
||||
{
|
||||
|
||||
$('#RequisitionStatus').val("-1");
|
||||
|
||||
$('#SearchDate').val('');
|
||||
|
||||
}
|
||||
|
||||
$("#storereqdetail").on("shown.bs.modal", function(e) {
|
||||
|
||||
var ReqId = $(e.relatedTarget).data('userid');
|
||||
|
||||
$('#ReqNO').val(ReqId);
|
||||
|
||||
$("#CostCenter").val('');
|
||||
|
||||
$("#tbleAppend").empty();
|
||||
|
||||
$("#ReqDate").val('');
|
||||
|
||||
$("#ReqDate").val('');
|
||||
$("#Desigination").val('');
|
||||
|
||||
|
||||
|
||||
$('#content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
|
||||
data:{id:ReqId},
|
||||
|
||||
type:"POST",
|
||||
|
||||
dataType: 'json',
|
||||
|
||||
url:"<?php echo base_url() ?>storerequisitionlist/ViewRequest",
|
||||
|
||||
success:function(json) {
|
||||
|
||||
// success:function(data) {
|
||||
|
||||
$('#content').loader('hide');
|
||||
|
||||
// alert(data) ;
|
||||
|
||||
$("#ReqBy").val(json.Requist[0]['Requestedby']);
|
||||
|
||||
$("#ReqDate").val(json.Requist[0]['ReqDate']);
|
||||
|
||||
$("#Desigination").val(json.Requist[0]['DepartmentName']);
|
||||
|
||||
$("#CostCenter").val(json.Requist[0]['CostCenterName']);
|
||||
|
||||
$("#tbleAppend").append(json.Items);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function DeleteRow(rowid)
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
id = rowid;
|
||||
|
||||
|
||||
|
||||
var answer = confirm(" Do you want to delete the Requisition?")
|
||||
|
||||
if (answer)
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
|
||||
data:{id:id},
|
||||
|
||||
type:"POST",
|
||||
|
||||
url:"<?php echo base_url() ?>storerequisitionlist/DeleteReqNo",
|
||||
|
||||
success:function(data) {
|
||||
|
||||
if(data)
|
||||
|
||||
{
|
||||
|
||||
$('#content').loader('hide');
|
||||
|
||||
alert(data);
|
||||
|
||||
|
||||
|
||||
location.reload();
|
||||
|
||||
|
||||
|
||||
|
||||
swal(data);
|
||||
location.reload();
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
{
|
||||
|
||||
alert("Error");
|
||||
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
var d = new Date();
|
||||
|
||||
|
||||
|
||||
var month = d.getMonth();
|
||||
|
||||
var day = d.getDate();
|
||||
|
||||
var year = d.getFullYear() ;
|
||||
|
||||
var SIAStartYear = year - 2015;
|
||||
|
||||
var mindt = year-70;
|
||||
|
||||
var maxdt = year-15;
|
||||
|
||||
$( ".datePicker" ).datepicker(
|
||||
|
||||
{
|
||||
|
||||
minDate : new Date(year-SIAStartYear,1,1),
|
||||
|
||||
maxDate :'now',
|
||||
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
//$('#SearchDate').daterangepicker( );
|
||||
|
||||
//Initialize Select2 Elements
|
||||
|
||||
$(".select2").select2();
|
||||
|
||||
//$('#SearchDate').val('');
|
||||
|
||||
$('#SearchDate').daterangepicker(
|
||||
|
||||
{
|
||||
|
||||
locale: {
|
||||
|
||||
format: 'DD-MM-YYYY'
|
||||
|
||||
{
|
||||
locale: {
|
||||
format: 'DD-MM-YYYY'
|
||||
},
|
||||
|
||||
|
||||
|
||||
showDropdowns: true
|
||||
|
||||
showDropdowns: true
|
||||
},
|
||||
|
||||
function(start, end, label) {
|
||||
startDate = start.format('DD-MM-YYYY');
|
||||
endDate = end.format('DD-MM-YYYY');
|
||||
|
||||
|
||||
|
||||
startDate = start.format('DD-MM-YYYY');
|
||||
|
||||
endDate = end.format('DD-MM-YYYY');
|
||||
|
||||
$('#FromDate').val(startDate);
|
||||
|
||||
$('#ToDate').val(endDate);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//alert("A new date range was chosen: " + start.format('DD-MM-YYYY') + ' to ' + end.format('DD-MM-YYYY'));
|
||||
$('#FromDate').val(startDate);
|
||||
$('#ToDate').val(endDate);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$(function () {
|
||||
|
||||
|
||||
|
||||
$('#Requisition').DataTable({
|
||||
|
||||
"paging": true,
|
||||
|
||||
"lengthChange": true,
|
||||
|
||||
"searching": true,
|
||||
|
||||
"ordering": true,
|
||||
|
||||
"info": true,
|
||||
|
||||
"autoWidth": true
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user