Report changes merged and issues fixed

This commit is contained in:
venbatechnologies@gmail.com 2017-12-26 09:57:28 +05:30
parent dc6c8de5c8
commit 2f2c2908d8
29 changed files with 2497 additions and 1772 deletions

View File

@ -58,7 +58,7 @@ class MRIRcontroller extends BaseController
$MrirNo = $_GET['MRIRNO']; $MrirNo = $_GET['MRIRNO'];
$this->global['pageTitle'] = 'Resico : MRIR Pdf '; //$this->global['pageTitle'] = 'Resico : MRIR Pdf ';
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
$data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo); $data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);
$this->load->View("Mrirprintpdf",$data, NULL); $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); $mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10,10, 38, 4, 6);
$HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true); $HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true);
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
$mpdf->SetTitle('Resico : MRIR PDF');
$mpdf->SetHTMLHeader($HtmlHeading); $mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('Mrirprintpdf',$data,true); $html = $this->load->view('Mrirprintpdf',$data,true);
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');

View File

@ -438,11 +438,23 @@ class monthlypay extends BaseController
function permissionpdf($SNO){ function permissionpdf($SNO){
$data['per'] = $this->monthlypay_model->pdf($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); $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=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 38, 4, 6);
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
$mpdf->SetTitle('Resico : Permission');
$mpdf->SetHTMLHeader($HtmlHeading); $mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('permissionpdf',$data,true); $html = $this->load->view('permissionpdf',$data,true);
@ -451,7 +463,7 @@ class monthlypay extends BaseController
$mpdf->setAutoTopMargin = 'stretch'; $mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch'; $mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($html); $mpdf->WriteHTML($html);
$mpdf->Output("Permission".$data.'.pdf','I',$php); $mpdf->Output('Permissionslip'.$permissionpdf.'.pdf','I',$php);
} }

View File

@ -340,6 +340,7 @@ class payslip extends BaseController
$mpdf=new mPDF('utf-8','A4-P',10, 12,12, 10, 10, 38, 4, 6); $mpdf=new mPDF('utf-8','A4-P',10, 12,12, 10, 10, 38, 4, 6);
$HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true); $HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true);
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
/*$mpdf->SetTitle('Resico : PDF'.$filename);*/
//$mpdf->SetHTMLHeader($HtmlHeading); //$mpdf->SetHTMLHeader($HtmlHeading);
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
// $mpdf->setFooter("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=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 24, 4, 6);
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
$mpdf->SetHTMLHeader($HtmlHeading); $mpdf->SetHTMLHeader($HtmlHeading);
$mpdf->addFavicon('icons'); /*$mpdf->SetTitle('Resico : PDF');*/
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
$mpdf->setFooter("Page {PAGENO} of {nb}"); $mpdf->setFooter("Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1; $mpdf->list_indent_first_level = 1;

View File

@ -1235,7 +1235,7 @@ class purchaseorder extends BaseController
$PoStatus=''; $PoStatus='';
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformationforPDF(); $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['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR');
@ -1287,12 +1287,12 @@ $AdvanceAmount=0.00;
$mpdf->SetHTMLHeader($HtmlHeading); $mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('revenuepopdf',$data,true); $html = $this->load->view('revenuepopdf',$data,true);
$mpdf->SetTitle('Resico : PO PDF');
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1; $mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch'; $mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch'; $mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($html); $mpdf->WriteHTML($html);
@ -1372,7 +1372,7 @@ $AdvanceAmount=0.00;
$mpdf->SetHTMLHeader($HtmlHeading); $mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('servicepopdf',$data,true); $html = $this->load->view('servicepopdf',$data,true);
$mpdf->SetTitle('Resico : PO PDF');
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
@ -1512,7 +1512,7 @@ public function importpoprint($PONO)
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
$mpdf->SetTitle('Resico : PO PDF');
$mpdf->list_indent_first_level = 1; $mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch'; $mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch'; $mpdf->setAutoBottomMargin = 'stretch';
@ -2746,7 +2746,7 @@ function addNewImportPurchaseOrder()
$mpdf->SetHTMLHeader($HtmlHeading); $mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('capitalpopdf',$data,true); $html = $this->load->view('capitalpopdf',$data,true);
$mpdf->SetTitle('Resico : PO PDF');
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");

View File

@ -212,7 +212,7 @@ class quality extends BaseController
require APPPATH . '/third_party/mpdf/mpdf.php'; require APPPATH . '/third_party/mpdf/mpdf.php';
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6); $mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
$mpdf->SetDisplayMode('fullpage'); $mpdf->SetDisplayMode('fullpage');
/*$mpdf->SetTitle('Resico : PDF');*/
$mpdf->list_indent_first_level = 1; $mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch'; $mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch'; $mpdf->setAutoBottomMargin = 'stretch';

View File

@ -498,7 +498,62 @@ class report extends BaseController
$this->loadViews("access", $this->global, $data, NULL); $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() public function cumulative()
{ {
@ -811,7 +866,7 @@ class report extends BaseController
public function i_consolidate_month() public function i_consolidate_month()
{ {
$this->global['pageTitle'] = 'Siddharth : Reports'; $this->global['pageTitle'] = 'Resico : Reports';
//$this->input->post('btn_submit'); //$this->input->post('btn_submit');
$sid=$this->input->get('sid'); $sid=$this->input->get('sid');
$mid = $this->input->get('mid'); $mid = $this->input->get('mid');
@ -843,7 +898,7 @@ class report extends BaseController
public function i_consolidate_year() public function i_consolidate_year()
{ {
$this->global['pageTitle'] = 'Siddharth : Reports'; $this->global['pageTitle'] = 'Resico : Reports';
//$this->input->post('btn_submit'); //$this->input->post('btn_submit');
$sid=$this->input->get('sid'); $sid=$this->input->get('sid');
$mid = $this->input->get('mid'); $mid = $this->input->get('mid');

View File

@ -1,11 +1,6 @@
<?php if(!defined('BASEPATH')) exit('No direct script access allowed'); <?php if(!defined('BASEPATH')) exit('No direct script access allowed');
require APPPATH . '/libraries/BaseController.php'; require APPPATH . '/libraries/BaseController.php';
/** /**
* Class : storestatus (Store Stock Status -Controller) * Class : storestatus (Store Stock Status -Controller)
* storestatus Class to control all store related operations. * storestatus Class to control all store related operations.
@ -26,15 +21,8 @@ class storestatus extends BaseController
{ {
parent::__construct(); parent::__construct();
$this->load->model('store_model'); $this->load->model('store_model');
$this->load->library('form_validation');
$this->load->library('form_validation');
$this->isLoggedIn(); $this->isLoggedIn();
} }
@ -46,11 +34,8 @@ class storestatus extends BaseController
{ {
$this->global['pageTitle'] = 'Siddharth Industries : Store Status'; $this->global['pageTitle'] = 'Resico : Store Status';
$this->loadViews("storestatus", $this->global, NULL , NULL);
$this->loadViews("storestatus", $this->global, NULL , NULL);
} }
@ -61,219 +46,133 @@ class storestatus extends BaseController
*/ */
function storeavailability() function storeavailability()
{ {
$this->global['pageTitle'] = 'Resico : Store Status';
$data['Stock'] = $this->store_model->viewStock();
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
$data['Stock'] = $this->store_model->viewStock();
$data['MaterialList'] = $this->store_model->GetAllMaterialList(); $data['MaterialList'] = $this->store_model->GetAllMaterialList();
$data['StockStatus'] = $this->store_model->GetConfigValue('C021'); $data['StockStatus'] = $this->store_model->GetConfigValue('C021');
if($this->DEPCode == STORE) if($this->DEPCode == STORE)
{ {
$this->loadViews("storestatus", $this->global, $data,null); $this->loadViews("storestatus", $this->global, $data,null);
} }
else else
{ {
$this->loadViews("access", $this->global, $data,null); $this->loadViews("access", $this->global, $data,null);
} }
} }
/** /**
* Its handles add stock details Operation. * Its handles add stock details Operation.
*/ */
function AddStock() function AddStock()
{ {
$MaterialCode = $this->input->post('MaterialCode'); $MaterialCode = $this->input->post('MaterialCode');
$AvailableQty = $this->input->post('AddAvailableStock'); $AvailableQty = $this->input->post('AddAvailableStock');
$AvailbilityStatus = $this->input->post('StockAvail'); $AvailbilityStatus = $this->input->post('StockAvail');
$Remarks = $this->input->post('Remarks'); $Remarks = $this->input->post('Remarks');
$CreatedBy = $this->session->userdata('EmpID'); $CreatedBy = $this->session->userdata('EmpID');
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
$Status = 1;
$Status = 1;
if(trim($AvailbilityStatus) == 'YES') if(trim($AvailbilityStatus) == 'YES')
{ {
$Status = 0; $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);
echo 'Stock Added successfully';
//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';
} }
/** /**
* Its handles updated stock details Operations. * Its handles updated stock details Operations.
*/ */
function UpdateStock() function UpdateStock()
{ {
$MaterialCode = $this->input->post('EditMaterialCode'); $MaterialCode = $this->input->post('EditMaterialCode');
$AvailableQty = $this->input->post('EditAvailableStock'); $AvailableQty = $this->input->post('EditAvailableStock');
$AvailbilityStatus = $this->input->post('EditStockAvail'); $AvailbilityStatus = $this->input->post('EditStockAvail');
$Remarks = $this->input->post('EditRemarks'); $Remarks = $this->input->post('EditRemarks');
$CreatedBy = $this->session->userdata('EmpID'); $CreatedBy = $this->session->userdata('EmpID');
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
$Status = 1; $Status = 1;
if(trim($AvailbilityStatus) == 'YES') if(trim($AvailbilityStatus) == 'YES')
{ {
$Status = 0; $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.. echo 'Stock updated successfully';
$Stockdetails = array('Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'UpdatedBy'=>$CreatedBy,'updatedOn'=>$createddt);
$data['Stock'] = $this->store_model->UpdateStock($Stockdetails,$MaterialCode);
echo 'Stock updated successfully';
} }
/** /**
* Its handles view all stock details. * Its handles view all stock details.
*/ */
function viewStockHistory() function viewStockHistory()
{
{ $MaterialCode= $this->input->post('id');
$result = $this->store_model->GetStockHisory($MaterialCode);
$TotalStock = 0;
$HTML="";
$MaterialCode= $this->input->post('id'); for ($i = 0; $i < count($result); $i++)
{
$result = $this->store_model->GetStockHisory($MaterialCode);
$TotalStock = 0;
$HTML="";
for ($i = 0; $i < count($result); $i++)
{
$SNo = $i + 1; $SNo = $i + 1;
$AvailableQty = $result[$i]['Quantity']; $AvailableQty = $result[$i]['Quantity'];
$UpdatedStock = $result[$i]['ActualQuantity']; $UpdatedStock = $result[$i]['ActualQuantity'];
$Remarks = $result[$i]['Remarks']; $Remarks = $result[$i]['Remarks'];
$Updatedon= new DateTime($result[$i]['updatedOn']); $Updatedon= new DateTime($result[$i]['updatedOn']);
$HTML.="<tr id='".$i."'> $HTML.="<tr id='".$i."'>
<td align='left'>".$SNo."</td> <td align='left'>".$SNo."</td>
<td align='left'>". $AvailableQty."</td> <td align='left'>". $AvailableQty."</td>
<td align='left'>".$UpdatedStock."</td> <td align='left'>".$UpdatedStock."</td>
<td align='left'>".$Updatedon->format('d-m-Y')."</td> <td align='left'>".$Updatedon->format('d-m-Y')."</td>
<td align='left'>".$Remarks."</td> <td align='left'>".$Remarks."</td>
</tr>"; </tr>";
$TotalStock = $TotalStock + $UpdatedStock; $TotalStock = $TotalStock + $UpdatedStock;
} }
die(json_encode(array('History' =>$HTML,'AvalStock'=>$TotalStock))); die(json_encode(array('History' =>$HTML,'AvalStock'=>$TotalStock)));
} }
/** /**
* To load pagenotfound view * To load pagenotfound view
*/ */
function pageNotFound() 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); $this->loadViews("404", $this->global, NULL, NULL);
} }
} }
?> ?>

View File

@ -36,8 +36,8 @@ class user extends BaseController
$this->load->model('dahsboard_Model'); $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(); $data['totalpurchaseorder']=$this->dahsboard_Model->totalpurchaseorder();
//print_r( $data['totalpurchaseorder']); //print_r( $data['totalpurchaseorder']);
@ -72,13 +72,15 @@ class user extends BaseController
//dashboard pie chart //dashboard pie chart
$data['importbudgt'] = $this->dahsboard_Model->importbudgt(); $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['servicebudgt'] = $this->dahsboard_Model->servicebudgt();
$data['servicebal'] = $this->dahsboard_Model->servicebal(); //$data['servicebal'] = $this->dahsboard_Model->servicebal();
$data['revenuebudgt'] = $this->dahsboard_Model->revenuebudgt(); $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['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*/ /* HR DASHBOARD Controller Start*/
@ -202,8 +204,8 @@ class user extends BaseController
$Basic_Pay = $totalEmployeePersent[0]->Basic_Pay; $Basic_Pay = $totalEmployeePersent[0]->Basic_Pay;
$totalsalary = $totalEmployeePersent[0]->TotalSalary; $totalsalary = $totalEmployeePersent[0]->TotalSalary;
$dayFoodAmt = $totalEmployeePersent[0]->Food_Allowances; $dayFoodAmt = $totalEmployeePersent[0]->Food_Allowances;
//$allowances =$totalEmployeePersent[0]->Allowances;
//$Allowances = $allowances * $values;
$Food_Allowances = $dayFoodAmt * $values; $Food_Allowances = $dayFoodAmt * $values;
$daySalary = $Basic_Pay / $CUR_month; $daySalary = $Basic_Pay / $CUR_month;
@ -227,7 +229,7 @@ class user extends BaseController
$currentDayHra = $dayHra * $values; $currentDayHra = $dayHra * $values;
/** total working days hra calculations**/ /** total working days hra calculations**/
// echo $currentDayHra.'<br/>'; // echo $currentDayHra.'<br/>';
$currentDatePF = $currentDaySalary + $currentDayHra; $currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
/** current date pf calculation**/ /** current date pf calculation**/
if ($totalsalary <= 20000) { if ($totalsalary <= 20000) {
@ -240,8 +242,8 @@ class user extends BaseController
/** pf amount per day**/ /** pf amount per day**/
//echo $totalothour;die; //echo $totalothour;die;
$salaryInCurrentday = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances; $salaryInCurrentdays = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances;
$salaryInCurrentday = $salaryInCurrentdays - ($esiAmount + $pfAmount);
$employeeSalary += round($salaryInCurrentday); $employeeSalary += round($salaryInCurrentday);
} }
@ -316,8 +318,8 @@ class user extends BaseController
$Basic_Pay = $totalEmployeePersent[0]->Basic_Pay; $Basic_Pay = $totalEmployeePersent[0]->Basic_Pay;
$totalsalary = $totalEmployeePersent[0]->TotalSalary; $totalsalary = $totalEmployeePersent[0]->TotalSalary;
$dayFoodAmt = $totalEmployeePersent[0]->Food_Allowances; $dayFoodAmt = $totalEmployeePersent[0]->Food_Allowances;
//$allowances =$totalEmployeePersent[0]->Allowances;
//$Allowances = $allowances * $values;
$Food_Allowances = $dayFoodAmt * $values; $Food_Allowances = $dayFoodAmt * $values;
$daySalary = $Basic_Pay / $CUR_month; $daySalary = $Basic_Pay / $CUR_month;
@ -341,7 +343,7 @@ class user extends BaseController
$currentDayHra = $dayHra * $values; $currentDayHra = $dayHra * $values;
/** total working days hra calculations**/ /** total working days hra calculations**/
// echo $currentDayHra.'<br/>'; // echo $currentDayHra.'<br/>';
$currentDatePF = $currentDaySalary + $currentDayHra; $currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
/** current date pf calculation**/ /** current date pf calculation**/
if ($totalsalary <= 20000) { if ($totalsalary <= 20000) {
@ -354,8 +356,8 @@ class user extends BaseController
/** pf amount per day**/ /** pf amount per day**/
//echo $totalothour;die; //echo $totalothour;die;
$salaryInCurrentday = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances; $salaryInCurrentdays = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances; /* + $Allowances;*/
$salaryInCurrentday = $salaryInCurrentdays -($esiAmount+$pfAmount);
$totalSalarys = $totalSalary + $salaryInCurrentday; $totalSalarys = $totalSalary + $salaryInCurrentday;

View File

@ -2,7 +2,16 @@
class dahsboard_Model extends CI_Model 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*/ /* HR DASHBOART Model START*/
function totemp() function totemp()
@ -13,8 +22,7 @@ class dahsboard_Model extends CI_Model
return $query->result(); return $query->result();
} }
function totloan() function totloan()
{ {
@ -304,9 +312,7 @@ function getTotalServicePoCount(){
$sql="SELECT count(cmast.PONO) as totalService FROM T_PurchaseOrder_Master cmast $sql="SELECT count(cmast.PONO) as totalService FROM T_PurchaseOrder_Master cmast
left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO where POType='SERVICE' and Status != 'ST030' and month(PODate) = $i
left join T_Requestion_Master req on req.ReqNo=line.ReqNo
where ReqType='SERVICE' and month(PODate) = $i
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'"; and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
$query = $this->db->query($sql); $query = $this->db->query($sql);
@ -334,9 +340,7 @@ function getTotalimportPoCount(){
$sql="SELECT count(cmast.PONO) as totalImport FROM T_PurchaseOrder_Master cmast $sql="SELECT count(cmast.PONO) as totalImport FROM T_PurchaseOrder_Master cmast
left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO where POType='IMPORT' and Status != 'ST030' and month(PODate) = $i
left join T_Requestion_Master req on req.ReqNo=line.ReqNo
where ReqType='IMPORT' and month(PODate) = $i
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'"; and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
$query = $this->db->query($sql); $query = $this->db->query($sql);
@ -362,9 +366,7 @@ function getTotalcapitalPoCount(){
while($i<=12){ while($i<=12){
$sql="SELECT count(cmast.PONO) as totalcapital FROM T_PurchaseOrder_Master cmast $sql="SELECT count(cmast.PONO) as totalcapital FROM T_PurchaseOrder_Master cmast
left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO where POType='CAPITAL' and Status != 'ST030' and month(PODate) = $i
left join T_Requestion_Master req on req.ReqNo=line.ReqNo
where ReqType='CAPITAL' and month(PODate) = $i
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'"; and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
$query = $this->db->query($sql); $query = $this->db->query($sql);
@ -390,9 +392,7 @@ $i++;
while($i<=12){ while($i<=12){
$sql="SELECT count(cmast.PONO) as totalrevenue FROM T_PurchaseOrder_Master cmast $sql="SELECT count(cmast.PONO) as totalrevenue FROM T_PurchaseOrder_Master cmast
left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO where POType='REVENUE' and Status != 'ST030' and month(PODate) = $i
left join T_Requestion_Master req on req.ReqNo=line.ReqNo
where ReqType='REVENUE' and month(PODate) = $i
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'"; and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
$query = $this->db->query($sql); $query = $this->db->query($sql);
@ -486,81 +486,49 @@ function importbudgt ()
$query = $this->db->query($sql); $query = $this->db->query($sql);
return $query->result(); 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 () function capitalbud ()
{ {
$sql="SELECT sum(BudgetAmount) as totalcapitalbudget FROM T_CostCenter_Budget where BudgetType ='CAPITAL' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW()) "; $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); $query = $this->db->query($sql);
return $query->result(); 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 () 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())"; $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); $query = $this->db->query($sql);
return $query->result(); 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 () 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())"; $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); $query = $this->db->query($sql);
return $query->result(); return $query->result();
} }
function revenuebal () function typebal ()
{ {
$sql="SELECT ROUND(sum(BudgetAmount)-(SELECT $sql="SELECT Cost_Center_Budget.BudgetYear as BudgetYear,
ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(distinct T_Rev_Tax.AfterDiscount)),0) sum(if(Cost_Center_Budget.BudgetType='IMPORT',
as Util_Amount (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 from T_CostCenter_Budget Cost_Center_Budget
join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode left 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 left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.Status !='ST030'
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_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); $query = $this->db->query($sql);
return $query->result(); return $query->result();
} }
@ -696,7 +664,7 @@ if ($fa and $aa != ''){
$sql="select ifnull(Dept_Details.DepartmentName,'-') As Dept_Name, $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 = '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 = 'ST051' THEN 1 ELSE 0 END) AS Approver_Onhold,
SUM(CASE WHEN Mast.Status = 'ST052' THEN 1 ELSE 0 END) AS Releaser_Onhold, SUM(CASE WHEN Mast.Status = 'ST052' THEN 1 ELSE 0 END) AS Releaser_Onhold,
@ -1193,6 +1161,51 @@ if ($cname!= ''){
return $query->result(); 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(){ 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 $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.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.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),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 FROM T_PurchaseOrder_Master pm
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo 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_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) "; where pm.Status != 'ST030' and pm.PONO in (select PONO from T_IGR_Master) ";
if ($cname!= ''){ 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.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.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),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 FROM T_PurchaseOrder_Master pm
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo 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_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO
where where
pm.Status != 'ST030' "; pm.Status != 'ST030' ";
@ -1975,7 +1990,7 @@ if ($fa and $aa != ''){
$query = $this->db->query($sql); $query = $this->db->query($sql);
return $query->result(); return $query->result();
} }
//home --this month//
function monthexpensereport() function monthexpensereport()
{ {
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date, $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@ -2000,31 +2015,22 @@ if ($fa and $aa != ''){
return $query->result(); return $query->result();
} }
//home--this year//
function yearexpensereport() function yearexpensereport($fa,$aa)
{ {
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date, $sql="select monthname(date) as month,
ifnull(case sum(if(type='PAYMENT',total,0)) as exp,
when tinc.type = 'PAYMENT' sum(if(type='RECEIPT',total,0)) as inc,
then tinc.total sum(total) as total
end,'0') as expense, from t_income_expense
ifnull(case where date >= '".$fa."-04-01' and date <= '".$aa."-03-31'
when tinc.type = 'RECEIPT' group by month ";
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 ";
$query = $this->db->query($sql); $query = $this->db->query($sql);
return $query->result(); return $query->result();
} }
//home--report--Day Wise Report //
function today_data($value='') function today_data($value='')
{ {
$sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE"; $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(); return $query->result();
} }
//yearwise/month//
function yearmonthwise($sid='') function yearmonthwise($sid='')
{ {
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date, $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@ -2131,6 +2138,22 @@ function INRSymbol()
$query=$this->db->query($sql); $query=$this->db->query($sql);
return $query->result(); 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() function today()
{ {
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date, $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@ -2160,7 +2183,7 @@ function INRSymbol()
// $query = $this->db->query($sql); // $query = $this->db->query($sql);
// return $query->result(); // return $query->result();
//} //}
//for menu link in monthly payments//
function monthlypayments() 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"; $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(); 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, $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
ifnull(case ifnull(case
when tinc.type = 'PAYMENT' when tinc.type = 'PAYMENT'
@ -2190,10 +2214,25 @@ function INRSymbol()
when tinc.type = 'RECEIPT' when tinc.type = 'RECEIPT'
then tinc.towhom then tinc.towhom
end, '-') as receiptname, 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); $query = $this->db->query($sql);
//echo $fdate; //echo $fdate;
//print_r($this->db->last_query()); //print_r($this->db->last_query());
//echo $sql;
return $query->result(); return $query->result();
} }

View File

@ -791,7 +791,7 @@ function GetPOType($ReqNo)
Mat.UOM,Mat.HSNCODE,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , Mat.UOM,Mat.HSNCODE,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
ROUND(((AfterSGST + AfterCGST + ROUND(((AfterSGST + AfterCGST +
AfterIGST)) ,2)as Taxamount,AdvanceAmount, 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 FROM T_PurchaseOrder_LineItem LineItem
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo

View File

@ -163,64 +163,49 @@
foreach ($spurchse as $result) { ?> foreach ($spurchse as $result) { ?>
<tr> <tr>
<td style="text-align:left;"> <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>
<td style="text-align:left;"><?php <td style="text-align:left;"><?php
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";} if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
?></td> ?></td>
<td style="text-align:right;"><?php <td style="text-align:right;"><?php $apr= $apr + round($result->April); ?>
$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>
if(!empty($result->April)) { echo round($result->April); } else {echo "-";} </td>
?></td> <td style="text-align:right;"><?php $may= $may + round($result->May);?>
<td style="text-align:right;"><?php <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>
$may= $may + round($result->May); <td style="text-align:right;"><?php $jun= $jun + round($result->June);?>
if(!empty($result->May)) { echo round($result->May); } else {echo "-";} <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>
<td style="text-align:right;"><?php <td style="text-align:right;"><?php $jul= $jul + round($result->July);?>
$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 'July';?>"><?php echo round($result->July);?> </a>
if(!empty($result->June)) { echo round($result->June); } else {echo "-";} </td>
?></td> <td style="text-align:right;"><?php $aug= $aug + round($result->August); ?>
<td style="text-align:right;"><?php <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>
$jul= $jul + round($result->July); </td>
if(!empty($result->July)) { echo round($result->July); } else {echo "-";} <td style="text-align:right;"><?php $sep= $sep + round($result->September); ?>
?></td> <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 style="text-align:right;"><?php </td>
$aug= $aug + round($result->August); <td style="text-align:right;"><?php $oct= $oct + round($result->October); ?>
if(!empty($result->August)) { echo round($result->August); } else {echo "-";} <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> <td style="text-align:right;"><?php $nov= $nov + round($result->November); ?>
<td style="text-align:right;"><?php <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>
$sep= $sep + $result->September; </td>
if(!empty($result->September)) { echo round($result->September); } else {echo "-";} <td style="text-align:right;"><?php $dec= $dec + round($result->December); ?>
?></td> <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 style="text-align:right;"><?php </td>
$oct= $oct + round($result->October); <td style="text-align:right;"><?php $jan= $jan + round($result->January); ?>
if(!empty($result->October)) { echo round($result->October); } else {echo "-";} <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>
<td style="text-align:right;"><?php <td style="text-align:right;"><?php $feb= $feb + round($result->February); ?>
$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 'February';?>"><?php echo round($result->February);?> </a>
if(!empty($result->November)) { echo round($result->November); } else {echo "-";} </td>
?></td> <td style="text-align:right;"><?php $mar= $mar + round($result->March); ?>
<td style="text-align:right;"><?php <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>
$dec= $dec + round($result->December); </td>
if(!empty($result->December)) { echo round($result->December); } else {echo "-";} <td style="text-align:right;"><?php $tot= $tot + round($result->qtotal); ?>
?></td> <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 style="text-align:right;"><?php </td>
$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>
</tr> </tr>
<?php <?php
@ -407,63 +392,51 @@
$tot = 0; $tot = 0;
foreach ($spurchse as $result) { ?> foreach ($spurchse as $result) { ?>
<tr> <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 <td style="text-align:left;"><?php
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";} if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
?></td> ?></td>
<td style="text-align:right;"><?php <td style="text-align:right;"><?php $apr= $apr + number_format($result->vApril,2,'.',''); ?>
$apr= $apr + round($result->vApril); <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>
if(!empty($result->vApril)) { echo number_format($result->vApril,2,'.',''); } else {echo "-";} </td>
?></td> <td style="text-align:right;"><?php $may= $may + number_format($result->vMay,2,'.',''); ?>
<td style="text-align:right;"><?php <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>
$may= $may + round($result->vMay); </td>
if(!empty($result->vMay)) { echo number_format($result->vMay,2,'.',''); } else {echo "-";} <td style="text-align:right;"><?php $jun= $jun + number_format($result->vJune,2,'.',''); ?>
?></td> <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 style="text-align:right;"><?php </td>
$jun= $jun + round($result->vJune); <td style="text-align:right;"><?php $jul= $jul + number_format($result->vJuly,2,'.',''); ?>
if(!empty($result->vJune)) { echo number_format($result->vJune,2,'.',''); } else {echo "-";} <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>
<td style="text-align:right;"><?php <td style="text-align:right;"><?php $aug= $aug + number_format($result->vAugust,2,'.',''); ?>
$jul= $jul + round($result->vJuly); <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>
if(!empty($result->vJuly)) { echo number_format($result->vJuly,2,'.',''); } else {echo "-";} </td>
?></td> <td style="text-align:right;"><?php $sep= $sep + number_format($result->vSeptember,2,'.',''); ?>
<td style="text-align:right;"><?php <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>
$aug= $aug + round($result->vAugust); </td>
if(!empty($result->vAugust)) { echo number_format($result->vAugust,2,'.',''); } else {echo "-";} <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>
<td style="text-align:right;"><?php <td style="text-align:right;"><?php $nov= $nov + number_format($result->vNovember,2,'.',''); ?>
$sep= $sep + $result->vSeptember; <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>
if(!empty($result->vSeptember)) { echo number_format($result->vSeptember,2,'.',''); } else {echo "-";} </td>
?></td> <td style="text-align:right;"><?php $dec= $dec + number_format($result->vDecember,2,'.',''); ?>
<td style="text-align:right;"><?php <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>
$oct= $oct + round($result->vOctober); </td>
if(!empty($result->vOctober)) { echo number_format($result->vOctober,2,'.',''); } else {echo "-";} <td style="text-align:right;"><?php $jan= $jan + number_format($result->vJanuary,2,'.',''); ?>
?></td> <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 style="text-align:right;"><?php </td>
$nov= $nov + round($result->vNovember); <td style="text-align:right;"><?php $feb= $feb + number_format($result->vFebruary,2,'.',''); ?>
if(!empty($result->vNovember)) { echo number_format($result->vNovember,2,'.',''); } else {echo "-";} <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>
<td style="text-align:right;"><?php <td style="text-align:right;"><?php $mar= $mar + number_format($result->vMarch,2,'.',''); ?>
$dec= $dec + round($result->vDecember); <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>
if(!empty($result->vDecember)) { echo number_format($result->vDecember,2,'.',''); } else {echo "-";} </td>
?></td> <td style="text-align:right;"><?php $tot= $tot + number_format($result->vtotal,2,'.',''); ?>
<td style="text-align:right;"><?php <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>
$jan= $jan + round($result->vJanuary); </td>
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>
</tr> </tr>
<?php <?php

View 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 &nbsp;(<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>

View File

@ -172,7 +172,7 @@ $(document).ready(function() {
extend: 'excelHtml5', extend: 'excelHtml5',
footer: 'true', footer: 'true',
messageTop: $('h3').text(), messageTop: $('h3').text(),
title: 'REPORT-Consolidate Category-Wise', title: 'REPORT - Consolidate Inward',
exportOptions: { exportOptions: {
columns: ':visible' columns: ':visible'

View 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 &nbsp;(<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>

View File

@ -174,7 +174,7 @@ $(document).ready(function() {
extend: 'excelHtml5', extend: 'excelHtml5',
footer: 'true', footer: 'true',
messageTop: $('h3').text(), messageTop: $('h3').text(),
title: 'REPORT-Consolidate Category-Wise', title: 'REPORT - Consolidate Inward',
exportOptions: { exportOptions: {
columns: ':visible' columns: ':visible'

View File

@ -321,7 +321,16 @@ if(!empty($mms))
echo $rel->Package;?></span></td> echo $rel->Package;?></span></td>
<td style="text-align:right"><span><?php <td style="text-align:right"><span><?php
$tot_tot= $tot_tot + round($rel->total,2); $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(''); $('#mySelect').val('');
} }
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script> </script>

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,19 @@
<?php <?php
//print_r($getTotalServicePoCount); //print_r($getTotalServicePoCount);
$Empcnt = ''; $Empcnt = '';
//echo $DEPCode; //echo $DEPCode;
//echo ROLE_MANAGER; //echo ROLE_MANAGER;
if(!empty($EmpCount)) if(!empty($EmpCount))
{ {
foreach ($EmpCount as $Emp) foreach ($EmpCount as $Emp)
{ {
$Empcnt = $Emp->EmpCount; $Empcnt = $Emp->EmpCount;
} }
} }
?> ?>
@ -532,26 +533,31 @@ $("#monthabs").val('');
<!-- Dashboard for admin--> <!-- Dashboard for admin-->
<?php <?php
$user='';
if(!empty($UserCount))
{
foreach ($UserCount as $uc)
{
$user = $uc->users;
}
}
if($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR) if($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR)
{ {
?> ?>
<div class="content"> <div class="content-wrapper">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1> Admin Dashboard </h1> <h1> Admin Dashboard </h1>
</section> </section>
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
<div class="row"> <!-- Info boxes -->
<div class="row">
<!-- fix for small devices only -->
<!-- ./col -->
<div class=" col-xs-12 col-md-4 col-md-offset-4"> <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"> <div class="inner">
<h3>44</h3> <h3><?php echo $user ?></h3>
<p>User Registrations</p> <p>User Registrations</p>
</div> </div>
<div class="icon"> <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> <a href="<?php echo base_url(); ?>userListing" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
</div> </div>
</section>
<!-- ./col -->
</div>
</section>
<!-- /.content -->
</div> </div>
<?php <?php
} }
@ -574,7 +576,7 @@ $("#monthabs").val('');
<!-- Dashboard for Manager department--> <!-- Dashboard for Manager department-->
<?php <?php
if($role == ROLE_MANAGER && $DEPCode != MANAGEMENT) if($role == ROLE_MANAGER && $DEPCode != MANAGEMENT && $DEPCode != HR)
{ {
?> ?>
<div class="content-wrapper"> <div class="content-wrapper">
@ -789,7 +791,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<div class="col-md-12"> <div class="col-md-12">
<div class="box"> <div class="box">
<div class="box-header with-border"> <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"> <!--<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> <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="col-xs-6 col-md-3 text-center">
<div class="description-block border-right"> <div class="description-block border-right">
<?php foreach($servicebudgt as $service) <?php foreach($servicebudgt as $service)
if(!empty($servicebal)) if(!empty($typebal))
{ {
foreach($servicebal as $serviceb) foreach($typebal as $serviceb)
$sb=$service->totalservicebudget-$serviceb->service; $sb=$service->totalservicebudget-$serviceb->sr;
{ {
?> ?>
<div class="knob-label"><strong style="color:#00c0ef">SERVICE BUDGET</strong></div> <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 <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 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $service->totalservicebudget;?></strong></div> <div class="knob-label"><strong>TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $service->totalservicebudget;?></strong></div>
<div class="knob-label"><strong>BALANCE :&nbsp;<i class="fa fa-rupee " ></i> <?php <div class="knob-label"><strong>BALANCE :&nbsp;<i class="fa fa-rupee " ></i> <?php
echo $sb;?></strong></div> echo number_format($sb,2,'.','');?></strong></div>
</div> </div>
<?php <?php
} }
@ -962,18 +964,17 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
<?php // if(!empty($totalrevenuepo)) <?php // if(!empty($totalrevenuepo))
// { // {
foreach($revenuebudgt as $revenue) 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> <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 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $revenue->totalrevenuebudget;?> </strong> </div> <div class="knob-label"><strong>TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $revenue->totalrevenuebudget;?> </strong> </div>
<div class="knob-label"><strong>BALANCE :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $revenueb->balrevenuebudget;?></strong> </div> <div class="knob-label"><strong>BALANCE :&nbsp;<i class="fa fa-rupee " ></i> <?php echo number_format($rb,2,'.','');?></strong> </div>
<?php <?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="col-xs-6 col-md-3 text-center">
<div class="description-block border-right"> <div class="description-block border-right">
<?php foreach($importbudgt as $import) <?php foreach($importbudgt as $import)
if(!empty($importbal)){ if(!empty($typebal)){
foreach($importbal as $importb) foreach($typebal as $importb)
$im=$import->totalimportbudget-$importb->im;
{ {
?> ?>
<div class="knob-label"><strong style="color:#00a65a">IMPORT BUDGET</strong></div> <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 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $import->totalimportbudget;?> </strong></div> <div class="knob-label"><strong>TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $import->totalimportbudget;?> </strong></div>
<div class="knob-label"><strong>BALANCE :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $importb->balimportbudget;?> </strong></div> <div class="knob-label"><strong>BALANCE :&nbsp;<i class="fa fa-rupee " ></i> <?php echo number_format($im,2,'.','');?> </strong></div>
</div> </div>
<?php <?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="col-xs-6 col-md-3 text-center">
<div class="description-block border-right"> <div class="description-block border-right">
<?php foreach($capitalbud as $capital) <?php foreach($capitalbud as $capital)
if(!empty($capitalbal)){ if(!empty($typebal)){
foreach($capitalbal as $capitalb) foreach($typebal as $capitalb)
$ca=$capital->totalcapitalbudget-$capitalb->ca;
{ {
?> ?>
<div class="knob-label"><strong style="color:#f39c12">CAPITAL BUDGET</strong></div> <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 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $capital->totalcapitalbudget;?></strong></div> <div class="knob-label"><strong>TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $capital->totalcapitalbudget;?></strong></div>
<div class="knob-label"><strong>BALANCE :&nbsp;<i class="fa fa-rupee " ></i> <?php echo $capitalb->balcapitalbudget;?></strong> </div> <div class="knob-label"><strong>BALANCE :&nbsp;<i class="fa fa-rupee " ></i> <?php echo number_format($ca,2,'.','');?></strong> </div>
<?php <?php
} }
} }

View File

@ -67,6 +67,7 @@
$('#datatable').DataTable({ $('#datatable').DataTable({
"paging": true, "paging": true,
"responsive": true,
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,

File diff suppressed because it is too large Load Diff

View File

@ -444,10 +444,11 @@ function Redirect()
$('#Items').DataTable({ $('#Items').DataTable({
"paging": true, "paging": true,
"responsive": true,
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"info": true, "info": true,
"autoWidth": true "autoWidth": true
}); });

View File

@ -1267,7 +1267,7 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label>Permission Time</label> <label>Permission Time(Hours : Min)</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'Pretime','value' => set_value('Pretime',''),'id'=>'Pretime', 'class' => 'form-control' ,'readonly' => 'true'); $data = array('name' => 'Pretime','value' => set_value('Pretime',''),'id'=>'Pretime', 'class' => 'form-control' ,'readonly' => 'true');
@ -1311,13 +1311,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$('#timepicker1').timepicker({ $('#timepicker1').timepicker({
minuteStep: 1, minuteStep: 5,
defaultTime:'current' defaultTime:'current'
}); });
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
$('#timepicker2').timepicker({ $('#timepicker2').timepicker({
minuteStep: 1, minuteStep: 5,
defaultTime:'current' defaultTime:'current'
}); });
</script> </script>
@ -1364,17 +1364,28 @@ function calculateTime() {
var timeStart = new Date("01/01/2007 " + valuestart); var timeStart = new Date("01/01/2007 " + valuestart);
var timeEnd = new Date("01/01/2007 " + valuestop); var timeEnd = new Date("01/01/2007 " + valuestop);
var hourDiff = timeEnd-timeStart;
var hourDiff = timeEnd - timeStart;
var minites = hourDiff/ 60/ 60 /1000; var minites = hourDiff/ 60/ 60 /1000;
minites = minites.toFixed(2); minites = minites.toFixed(2);
// alert(minites); var resstr = minites.split(".");
$("#Pretime").val(minites); 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); $("#timepicker2").change(calculateTime);
// alert();
calculateTime(); calculateTime();
}); });
@ -1384,25 +1395,23 @@ $("#save").click(function(){
var emp = $("#emp").val(); var emp = $("#emp").val();
var shift = $("#shift").val(); var shift = $("#shift").val();
var res = $("#Reason").val();//alert(emp); var res = $("#Reason").val();//alert(emp);
var time1=$('#timepicker1').val();
var time2=$('#timepicker2').val();
if(emp == '-1'){ if(emp == '-1'){
alert('Please Select Employee'); swal('Please Select Employee');
return false; return false;
}else{ }else{
return true; return true;
} }
// if(!$.trim(shift) ==""){ if(time1 != time2)
// alert('Please Enter the Shift'); {
// return false; swal('Please Select To Time');
// }else{ return false;
// return true; }
// } else{
// if(res === 0){ return true;
// alert('Please Enter The Reason'); }
// return false;
// }else{
// return true;
// }
}); });
</script> </script>

View File

@ -262,7 +262,7 @@ $('#addspec').click(function(){
var customer = $('#customer').val(); var customer = $('#customer').val();
if(product == -1 || customer == -1) if(product == -1 || customer == -1)
{ {
alert('Please Select Product and Customer.'); swal('Please Select Product and Customer.');
} }
else else
{ {
@ -277,7 +277,7 @@ $('#addspec').click(function(){
var customerinward = $('#customerinward').val(); var customerinward = $('#customerinward').val();
if(productinward == -1 || customerinward == -1) if(productinward == -1 || customerinward == -1)
{ {
alert('Please Select Product and Customer.'); swal('Please Select Product and Customer.');
} }
else else
{ {
@ -302,7 +302,7 @@ function addNewRow()
if(sname == '' || uom =='' || min == '' || max == '' || temp == '') if(sname == '' || uom =='' || min == '' || max == '' || temp == '')
{ {
alert('Please Enter all specification'); swal('Please Enter all specification');
} }
else else
{ {
@ -351,7 +351,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
// alert(customer);exit(); // alert(customer);exit();
if(product == -1 || customer == -1) if(product == -1 || customer == -1)
{ {
alert('Please Select Product and Customer.'); swal('Please Select Product and Customer.');
} }
else{ else{
$('#content').loader('show'); $('#content').loader('show');
@ -364,7 +364,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
if(data) if(data)
{ {
alert(data); swal(data);
//console.log(data); //console.log(data);
window.location = "<?php echo base_url().'quality';?>"; window.location = "<?php echo base_url().'quality';?>";
$('#content').loader('hide'); $('#content').loader('hide');
@ -384,7 +384,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
var customer = $('#customer').val(); var customer = $('#customer').val();
if(product == -1 || customer == -1) if(product == -1 || customer == -1)
{ {
alert('Please Select Product and Customer.'); swal('Please Select Product and Customer.');
} }
else{ else{
var rowid = rowid; var rowid = rowid;
@ -407,7 +407,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
success:function(data){ success:function(data){
$('#content').loader('hide'); $('#content').loader('hide');
alert(data); swal(data);
} }
}); });

View File

@ -183,7 +183,7 @@ $('#addspec').click(function(){
var customer = $('#customer').val(); var customer = $('#customer').val();
if(product == -1 || customer == -1) if(product == -1 || customer == -1)
{ {
alert('Please Select Product and Customer.'); swal('Please Select Product and Customer.');
} }
else else
{ {
@ -203,7 +203,7 @@ function addNewRow()
if(sname == '' || uom =='' || min == '' || max == '') if(sname == '' || uom =='' || min == '' || max == '')
{ {
alert('Please Enter all specification'); swal('Please Enter all specification');
} }
else else
{ {
@ -239,7 +239,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
var customer = $('#customer').val(); var customer = $('#customer').val();
if(product == -1 || customer == -1) if(product == -1 || customer == -1)
{ {
alert('Please Select Product and Customer.'); swal('Please Select Product and Customer.');
} }
else{ else{
$('#content').loader('show'); $('#content').loader('show');
@ -252,7 +252,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
if(data) if(data)
{ {
$('#content').loader('hide'); $('#content').loader('hide');
alert(data); swal(data);
//console.log(data); //console.log(data);
@ -270,7 +270,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
var customer = $('#customer').val(); var customer = $('#customer').val();
if(product == -1 || customer == -1) if(product == -1 || customer == -1)
{ {
alert('Please Select Product and Customer.'); swal('Please Select Product and Customer.');
} }
else{ else{
var d=''; var d='';
@ -292,7 +292,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
success:function(data){ success:function(data){
$('#content').loader('hide'); $('#content').loader('hide');
alert(data); swal(data);
} }
}); });

View File

@ -405,14 +405,14 @@ function calculateMaster(id)
var SW12 = document.getElementById('12sw').textContent; var SW12 = document.getElementById('12sw').textContent;
if(SW12 != 100) if(SW12 != 100)
{ {
alert('AFS Details Sand Weight Total Should be 100..!'); swal('AFS Details Sand Weight Total Should be 100..!');
return false; return false;
} }
} }
if($('#invoiceno').val() == -1) if($('#invoiceno').val() == -1)
{ {
alert('Select Invoice No'); swal('Select Invoice No');
return false; return false;
} }
var cid = id; var cid = id;
@ -583,7 +583,7 @@ function calculateMaster(id)
if($('#invoiceno').val() == -1 || $('#reportdate').val() == '') if($('#invoiceno').val() == -1 || $('#reportdate').val() == '')
{ {
alert('Select Invoice No and Batch Date'); swal('Select Invoice No and Batch Date');
return false; return false;
} }
@ -601,13 +601,13 @@ function calculateMaster(id)
var total_sandweight = parseFloat(document.getElementById('12sw').textContent); var total_sandweight = parseFloat(document.getElementById('12sw').textContent);
if(flag != 0 || (total_sandweight!=100) ) if(flag != 0 || (total_sandweight!=100) )
{ {
alert('Test Failed, Cant Save Test Report!'); swal('Test Failed, Cant Save Test Report!');
return false; return false;
} }
if($('#approvedby').val() == -1) if($('#approvedby').val() == -1)
{ {
alert('Enter Approver Name'); swal('Enter Approver Name');
return false; return false;
} }
@ -632,7 +632,7 @@ function calculateMaster(id)
var customer = $('#customer').val(); var customer = $('#customer').val();
if(product == -1 || customer == -1) if(product == -1 || customer == -1)
{ {
alert('Please Select Product and Customer.'); swal('Please Select Product and Customer.');
} }
else{ else{
@ -646,7 +646,7 @@ function calculateMaster(id)
url:"<?php echo base_url() ?>quality/saveTestReportData", url:"<?php echo base_url() ?>quality/saveTestReportData",
success:function(data) { success:function(data) {
if(data){ if(data){
alert(data); swal(data);
$('.content').loader('hide'); $('.content').loader('hide');
window.location = "<?php echo base_url().'qualityreportlist';?>"; window.location = "<?php echo base_url().'qualityreportlist';?>";
} }
@ -668,7 +668,7 @@ function calculateMaster(id)
if($('#invoiceno').val() == -1) if($('#invoiceno').val() == -1)
{ {
alert('Select Invoice No'); swal('Select Invoice No');
return false; return false;
} }
var cid = cid; var cid = cid;

View File

@ -253,7 +253,7 @@ $("#myModal").on("shown.bs.modal", function(e) {
success:function(json) { success:function(json) {
// success:function(data) { // success:function(data) {
$('#content').loader('hide'); $('#content').loader('hide');
//alert(data);
$("#ReqType").val(json.Requist[0]['ReqType']); $("#ReqType").val(json.Requist[0]['ReqType']);
$("#ReqBy").val(json.Requist[0]['FirstName']); $("#ReqBy").val(json.Requist[0]['FirstName']);
$("#ReqDate").val(json.Requist[0]['CreatedDate']); $("#ReqDate").val(json.Requist[0]['CreatedDate']);
@ -285,7 +285,7 @@ function saveToDatabase(editableObj,column,ReqId,Index) {
var Remarks = $('#Remarks'+Index).val(); var Remarks = $('#Remarks'+Index).val();
if(Status == '3' && Remarks == '') if(Status == '3' && Remarks == '')
{ {
alert('Please enter remarks'); swal('Please enter remarks');
$('#status'+Index).val('1'); $('#status'+Index).val('1');
return false; return false;
@ -303,12 +303,12 @@ function saveToDatabase(editableObj,column,ReqId,Index) {
if(data) if(data)
{ {
$('#content').loader('hide'); $('#content').loader('hide');
alert(data); swal(data);
location.reload(); location.reload();
} }
else else
{ {
alert("Error"); swal("Error");
} }
} }

View File

@ -32,7 +32,7 @@
if(data) if(data)
{ {
$('#content').loader('hide'); $('#content').loader('hide');
alert(data); swal(data);
location.reload(); location.reload();
@ -40,7 +40,7 @@
} }
else else
{ {
alert("Error"); swal("Error");
} }
}}); }});

View File

@ -1,34 +1,22 @@
<!-- <?php <!-- <?php
$DraftCount = ''; $DraftCount = '';
$ReqNo = ''; $ReqNo = '';
if(!empty($Status)) if(!empty($Status))
{
foreach ($Status as $St)
{
{ //$DraftCount = $St->cnt;
//$ReqNo = $St->ReqNo;
foreach ($Status as $St) }
{ //echo $ReqNo;
//$DraftCount = $St->cnt;
//$ReqNo = $St->ReqNo;
}
//echo $ReqNo;
}?> --> }?> -->
<style>
<style>
span.highlight { span.highlight {
@ -39,123 +27,48 @@ span.highlight {
</style> </style>
<div class="content-wrapper"> <div class="content-wrapper">
<section class="content"> <section class="content">
<div class="row"> <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>
<div class="col-md-3 col-md-offset-3">
<div> <label>&nbsp;&nbsp;</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">&times;</button>
<a class="btn btn-info" onclick="Search()" >Search</a>
-->
</div>
</div>
<?php </div>
</div>
$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>&nbsp;&nbsp;</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">&times;</button>
<!--<a class="btn btn-info" onclick="Search()" >Search</a> -->
</div>
</div>
</div>
</div>
<!-- model to show Store requisition detail --> <!-- model to show Store requisition detail -->
<div class="modal fade" id="storereqdetail" role="dialog"> <div class="modal fade" id="storereqdetail" role="dialog">
<div class="modal-dialog">
<div class="modal-dialog"> <!-- Modal content-->
<form>
<!-- Modal content--> <div class="modal-content">
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
<form> <button type="button" class="close" data-dismiss="modal">&times;</button>
<center><h4> Store Requisition Number Details </h4></center>
<div class="modal-content"> </div>
<div align="left">
<div class="modal-header" style="background-color: #5d0411;color:#fff;"> <div class="col-md-12">
<div class="col-md-3">
<button type="button" class="close" data-dismiss="modal">&times;</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> <label>Requistion No</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'ReqNO','value' => set_value('ReqNO'),'id'=>'ReqNO', 'class' => 'form-control' ,'readonly' => 'true'); $data = array('name' => 'ReqNO','value' => set_value('ReqNO'),'id'=>'ReqNO', 'class' => 'form-control' ,'readonly' => 'true');
@ -165,371 +78,171 @@ span.highlight {
?> ?>
</div> </div>
</div>
</div> <div class="col-md-3">
<div class="col-md-3">
<label>Requested By</label> <label>Requested By</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'ReqBy','value' => set_value('ReqBy'),'id'=>'ReqBy', 'class' => 'form-control' ,'readonly' => 'true'); $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> </div>
<div class="col-md-6"> <div class="col-md-6">
<label>Department</label> <label>Department</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'Desigination','value' => set_value('Desigination'),'id'=>'Desigination', 'class' => 'form-control' ,'readonly' => 'true'); $data = array('name' => 'Desigination','value' => set_value('Desigination'),'id'=>'Desigination', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div>
</div>
</div> <div class="col-md-12">
<div class="col-md-6">
<label>Requested Date</label>
</div> <div class="form-group">
<?php
<div class="col-md-12">
<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'); $data = array('name' => 'ReqDate','value' => set_value('ReqDate'),'id'=>'ReqDate', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div>
</div> </div>
</div>
<div class="col-md-6">
<div class="col-md-6">
<label>Cost Center Name</label> <label>Cost Center Name</label>
<div class="form-group">
<div class="form-group"> <?php
$data = array('name' => 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
<?php </div>
$data = array('name' => 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div> </div>
</div>
<!-- <div class="col-md-4"> <table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<div align="right" style="padding-right:10px">
<label>Avl Budget Amt</label>&nbsp;<img id="AlertImg" src="<?php echo base_url(); ?>assets/dist/img/red.png" alt="your image" width="25px" style="display:none"/> <div class="modal fade" role="dialog">
<thead style="background-color:#ddf">
<div class="form-group"> <tr>
<th>SNo</th>
<?php <th>Item Code</th>
<th>Item Description</th>
$data = array('name' => 'AvlBudgetAmount','value' => set_value('AvlBudgetAmount'),'id'=>'AvlBudgetAmount', 'class' => 'form-control' ,'readonly' => 'true'); <th>UOM</th>
<th>Requested Quantity</th>
echo form_input($data); <th>Issued Quantity</th>
<th>Remarks</th>
?> </tr>
</thead>
</div> <tbody id="tbleAppend">
</tbody>
</div> --> </div>
</div>
</table>
</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>
<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> </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>
</form>
</div> </div>
</div>
</form>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class=" container-fluid"> <div class=" container-fluid">
<div class="box-header"> <div class="box-header">
<CENTER><h3 class="box-title">Resico Industries - Store Requisition Listing</h3></CENTER> <CENTER><h3 class="box-title">Resico Industries - Store Requisition Listing</h3></CENTER>
</div> </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"> <thead style="background-color:#ddf">
<tr> <tr>
<th>Store Requisition No</th> <th>Store Requisition No</th>
<th>Requested Department</th> <th>Requested Department</th>
<th>Requested By</th> <th>Requested By</th>
<th>Requested Date</th> <th>Requested Date</th>
<th>Status</th> <th>Status</th>
<th>Approver Comments</th> <th>Approver Comments</th>
</tr> </tr>
</thead>
</thead> <tbody>
<tbody>
<?php <?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>
{ <td><?php echo $record->StatusName ?></td>
<td><?php echo $record->Remarks ?></td>
$index = 0; </tr>
<?php
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>
</tbody>
</table>
<div id="content"></div>
</div>
</div>
</div>
</div>
</section>
</div> </div>
<script> <script>
var startDate = ''; var startDate = '';
var endDate = ''; var endDate = '';
function SaveIssueQuantity(rowid) function SaveIssueQuantity(rowid)
{ {
var IssueQty = $("#IssuedQuantity"+RowId).val(); var IssueQty = $("#IssuedQuantity"+RowId).val();
if( IssueQty != '') if( IssueQty != '')
{ {
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:IssueQty}, data:{id:IssueQty},
type:"POST", type:"POST",
url:"<?php echo base_url() ?>storerequisitionlist/SaveIssuedQuantity", url:"<?php echo base_url() ?>storerequisitionlist/SaveIssuedQuantity",
success:function(data) { success:function(data) {
$('#content').loader('hide'); $('#content').loader('hide');
swal(data);
alert(data);
location.reload(); location.reload();
} }
@ -541,260 +254,124 @@ span.highlight {
} }
function Reset() function Reset()
{ {
$('#RequisitionStatus').val("-1"); $('#RequisitionStatus').val("-1");
$('#SearchDate').val(''); $('#SearchDate').val('');
} }
$("#storereqdetail").on("shown.bs.modal", function(e) { $("#storereqdetail").on("shown.bs.modal", function(e) {
var ReqId = $(e.relatedTarget).data('userid'); var ReqId = $(e.relatedTarget).data('userid');
$('#ReqNO').val(ReqId); $('#ReqNO').val(ReqId);
$("#CostCenter").val(''); $("#CostCenter").val('');
$("#tbleAppend").empty(); $("#tbleAppend").empty();
$("#ReqDate").val('');
$("#ReqDate").val('');
$("#Desigination").val(''); $("#Desigination").val('');
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:ReqId}, data:{id:ReqId},
type:"POST", type:"POST",
dataType: 'json', dataType: 'json',
url:"<?php echo base_url() ?>storerequisitionlist/ViewRequest", url:"<?php echo base_url() ?>storerequisitionlist/ViewRequest",
success:function(json) { success:function(json) {
// success:function(data) {
$('#content').loader('hide'); $('#content').loader('hide');
// alert(data) ;
$("#ReqBy").val(json.Requist[0]['Requestedby']); $("#ReqBy").val(json.Requist[0]['Requestedby']);
$("#ReqDate").val(json.Requist[0]['ReqDate']); $("#ReqDate").val(json.Requist[0]['ReqDate']);
$("#Desigination").val(json.Requist[0]['DepartmentName']); $("#Desigination").val(json.Requist[0]['DepartmentName']);
$("#CostCenter").val(json.Requist[0]['CostCenterName']); $("#CostCenter").val(json.Requist[0]['CostCenterName']);
$("#tbleAppend").append(json.Items); $("#tbleAppend").append(json.Items);
}
});
}
});
}); });
</script>
<script>
function DeleteRow(rowid) function DeleteRow(rowid)
{ {
id = rowid; id = rowid;
var answer = confirm(" Do you want to delete the Requisition?") var answer = confirm(" Do you want to delete the Requisition?")
if (answer) if (answer)
{ {
$.ajax({ $.ajax({
data:{id:id}, data:{id:id},
type:"POST", type:"POST",
url:"<?php echo base_url() ?>storerequisitionlist/DeleteReqNo", url:"<?php echo base_url() ?>storerequisitionlist/DeleteReqNo",
success:function(data) { success:function(data) {
if(data) if(data)
{ {
$('#content').loader('hide'); $('#content').loader('hide');
swal(data);
alert(data); location.reload();
location.reload();
} }
else else
{ {
swal("Error");
alert("Error");
} }
}}); }});
}
} }
}
</script>
<script>
$(function() { $(function() {
var d = new Date(); var d = new Date();
var month = d.getMonth(); var month = d.getMonth();
var day = d.getDate(); var day = d.getDate();
var year = d.getFullYear() ; var year = d.getFullYear() ;
var SIAStartYear = year - 2015; var SIAStartYear = year - 2015;
var mindt = year-70; var mindt = year-70;
var maxdt = year-15; var maxdt = year-15;
$( ".datePicker" ).datepicker( $( ".datePicker" ).datepicker(
{ {
minDate : new Date(year-SIAStartYear,1,1), minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now', maxDate :'now',
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true, dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,
} }
); );
//$('#SearchDate').daterangepicker( );
//Initialize Select2 Elements
$(".select2").select2(); $(".select2").select2();
//$('#SearchDate').val('');
$('#SearchDate').daterangepicker( $('#SearchDate').daterangepicker(
{
{ locale: {
format: 'DD-MM-YYYY'
locale: {
format: 'DD-MM-YYYY'
}, },
showDropdowns: true
showDropdowns: true
}, },
function(start, end, label) { function(start, end, label) {
startDate = start.format('DD-MM-YYYY');
endDate = end.format('DD-MM-YYYY');
$('#FromDate').val(startDate);
$('#ToDate').val(endDate);
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'));
}); });
}); });
$(function () { $(function () {
$('#Requisition').DataTable({ $('#Requisition').DataTable({
"paging": true, "paging": true,
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"info": true, "info": true,
"autoWidth": true "autoWidth": true
}); });
}); });
</script> </script>