diff --git a/application/controllers/MRIRcontroller.php b/application/controllers/MRIRcontroller.php
index 2d9903df..c3fefba0 100644
--- a/application/controllers/MRIRcontroller.php
+++ b/application/controllers/MRIRcontroller.php
@@ -58,7 +58,7 @@ class MRIRcontroller extends BaseController
$MrirNo = $_GET['MRIRNO'];
- $this->global['pageTitle'] = 'Resico : MRIR Pdf ';
+ //$this->global['pageTitle'] = 'Resico : MRIR Pdf ';
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
$data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);
$this->load->View("Mrirprintpdf",$data, NULL);
@@ -72,6 +72,8 @@ class MRIRcontroller extends BaseController
$mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10,10, 38, 4, 6);
$HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true);
$mpdf->SetDisplayMode('fullpage');
+
+ $mpdf->SetTitle('Resico : MRIR PDF');
$mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('Mrirprintpdf',$data,true);
$mpdf->SetDisplayMode('fullpage');
diff --git a/application/controllers/monthlypay.php b/application/controllers/monthlypay.php
index 2f26718a..311bfd5c 100755
--- a/application/controllers/monthlypay.php
+++ b/application/controllers/monthlypay.php
@@ -438,11 +438,23 @@ class monthlypay extends BaseController
function permissionpdf($SNO){
$data['per'] = $this->monthlypay_model->pdf($SNO);
-
+ $id='';
+ $name ='';
+ $permissionpdf='';
+ $date = '';
+
+ foreach($data['per'] as $record){
+ $id= $record ->EmpID;
+ $name =$record ->FirstName;
+ $date =date_format(date_create($record ->date),'d-m-Y');
+ }
+
+ $permissionpdf = $id.'-'.$name.'-'.$date;
$this->load->view($this->config->item('admin_folder') .'/permissionpdf',$data);
$mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 38, 4, 6);
$mpdf->SetDisplayMode('fullpage');
+ $mpdf->SetTitle('Resico : Permission');
$mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('permissionpdf',$data,true);
@@ -451,7 +463,7 @@ class monthlypay extends BaseController
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($html);
- $mpdf->Output("Permission".$data.'.pdf','I',$php);
+ $mpdf->Output('Permissionslip'.$permissionpdf.'.pdf','I',$php);
}
diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php
index e2db1ba3..a2fec7d0 100755
--- a/application/controllers/payslip.php
+++ b/application/controllers/payslip.php
@@ -340,6 +340,7 @@ class payslip extends BaseController
$mpdf=new mPDF('utf-8','A4-P',10, 12,12, 10, 10, 38, 4, 6);
$HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true);
$mpdf->SetDisplayMode('fullpage');
+ /*$mpdf->SetTitle('Resico : PDF'.$filename);*/
//$mpdf->SetHTMLHeader($HtmlHeading);
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
// $mpdf->setFooter("Page {PAGENO} of {nb}");
@@ -767,7 +768,7 @@ class payslip extends BaseController
$mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 24, 4, 6);
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetHTMLHeader($HtmlHeading);
- $mpdf->addFavicon('icons');
+ /*$mpdf->SetTitle('Resico : PDF');*/
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
$mpdf->setFooter("Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1;
diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php
index fbf24010..2bd1b15d 100644
--- a/application/controllers/purchaseorder.php
+++ b/application/controllers/purchaseorder.php
@@ -1235,7 +1235,7 @@ class purchaseorder extends BaseController
$PoStatus='';
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformationforPDF();
- $data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
+ $data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR');
@@ -1287,12 +1287,12 @@ $AdvanceAmount=0.00;
$mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('revenuepopdf',$data,true);
-
+ $mpdf->SetTitle('Resico : PO PDF');
$mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1;
- $mpdf->setAutoTopMargin = 'stretch';
+ $mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($html);
@@ -1372,7 +1372,7 @@ $AdvanceAmount=0.00;
$mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('servicepopdf',$data,true);
-
+ $mpdf->SetTitle('Resico : PO PDF');
$mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
@@ -1512,7 +1512,7 @@ public function importpoprint($PONO)
$mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
-
+ $mpdf->SetTitle('Resico : PO PDF');
$mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
@@ -2746,7 +2746,7 @@ function addNewImportPurchaseOrder()
$mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('capitalpopdf',$data,true);
-
+ $mpdf->SetTitle('Resico : PO PDF');
$mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
diff --git a/application/controllers/quality.php b/application/controllers/quality.php
index ca786565..443bc7a5 100644
--- a/application/controllers/quality.php
+++ b/application/controllers/quality.php
@@ -212,7 +212,7 @@ class quality extends BaseController
require APPPATH . '/third_party/mpdf/mpdf.php';
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
$mpdf->SetDisplayMode('fullpage');
-
+ /*$mpdf->SetTitle('Resico : PDF');*/
$mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
diff --git a/application/controllers/report.php b/application/controllers/report.php
index 3fdde19c..7dc2a722 100755
--- a/application/controllers/report.php
+++ b/application/controllers/report.php
@@ -498,7 +498,62 @@ class report extends BaseController
$this->loadViews("access", $this->global, $data, NULL);
}
- }
+ }
+
+
+ public function consolidate_month()
+ {
+
+ $this->global['pageTitle'] = 'Resico : Reports';
+ $sid=$this->input->get('sid');
+ $mid = $this->input->get('mid');
+ $cname = $this->input->get('cname');
+ $prod = $this->input->get('prod');
+ $m = $this->input->get('m');
+ $ab=$this->input->get('ab');
+ $fa=substr($ab,0,-5);
+ $aa=substr($ab,5,5);
+
+ $data['material']=$this->dahsboard_Model->material_name();
+ $data['cust']=$this->dahsboard_Model->customer_name();
+ $data['finyear']=$this->dahsboard_Model->report_finyear();
+ $data['spurchse']=$this->dahsboard_Model->consolidate_month($m,$cname,$mid,$fa,$aa);
+ if($this->DEPCode == MANAGEMENT)
+ {
+ $this->loadviews("Report_consolidate_m",$this->global,$data, NULL);
+ }
+ else
+ {
+ $this->loadViews("access", $this->global, $data, NULL);
+ }
+ }
+
+ public function consolidate_year()
+ {
+ $this->global['pageTitle'] = 'Resico : Reports';
+ $sid=$this->input->get('sid');
+ $mid = $this->input->get('mid');
+ $cname = $this->input->get('cname');
+ $prod = $this->input->get('prod');
+ $ab=$this->input->get('ab');
+ $fa=substr($ab,0,-5);
+ $aa=substr($ab,5,5);
+
+ $data['material']=$this->dahsboard_Model->material_name();
+ $data['cust']=$this->dahsboard_Model->customer_name();
+ $data['finyear']=$this->dahsboard_Model->report_finyear();
+ $data['spurchse']=$this->dahsboard_Model->consolidate_year($cname,$mid,$fa,$aa);
+ if($this->DEPCode == MANAGEMENT)
+ {
+ $this->loadviews("Report_consolidate_y",$this->global,$data, NULL);
+ }
+ else
+ {
+ $this->loadViews("access", $this->global, $data, NULL);
+ }
+ }
+
+
public function cumulative()
{
@@ -811,7 +866,7 @@ class report extends BaseController
public function i_consolidate_month()
{
- $this->global['pageTitle'] = 'Siddharth : Reports';
+ $this->global['pageTitle'] = 'Resico : Reports';
//$this->input->post('btn_submit');
$sid=$this->input->get('sid');
$mid = $this->input->get('mid');
@@ -843,7 +898,7 @@ class report extends BaseController
public function i_consolidate_year()
{
- $this->global['pageTitle'] = 'Siddharth : Reports';
+ $this->global['pageTitle'] = 'Resico : Reports';
//$this->input->post('btn_submit');
$sid=$this->input->get('sid');
$mid = $this->input->get('mid');
diff --git a/application/controllers/storestatus.php b/application/controllers/storestatus.php
index b613160c..748ded91 100644
--- a/application/controllers/storestatus.php
+++ b/application/controllers/storestatus.php
@@ -1,11 +1,6 @@
load->model('store_model');
-
- $this->load->library('form_validation');
-
-
-
-
-
+ $this->load->library('form_validation');
$this->isLoggedIn();
}
@@ -46,11 +34,8 @@ class storestatus extends BaseController
{
- $this->global['pageTitle'] = 'Siddharth Industries : Store Status';
-
-
-
- $this->loadViews("storestatus", $this->global, NULL , NULL);
+ $this->global['pageTitle'] = 'Resico : Store Status';
+ $this->loadViews("storestatus", $this->global, NULL , NULL);
}
@@ -61,219 +46,133 @@ class storestatus extends BaseController
*/
function storeavailability()
{
-
-
- $this->global['pageTitle'] = 'Siddharth Industries : Store Status';
- $data['Stock'] = $this->store_model->viewStock();
+ $this->global['pageTitle'] = 'Resico : Store Status';
+ $data['Stock'] = $this->store_model->viewStock();
$data['MaterialList'] = $this->store_model->GetAllMaterialList();
$data['StockStatus'] = $this->store_model->GetConfigValue('C021');
if($this->DEPCode == STORE)
- {
- $this->loadViews("storestatus", $this->global, $data,null);
- }
- else
- {
+ {
+ $this->loadViews("storestatus", $this->global, $data,null);
+ }
+ else
+ {
$this->loadViews("access", $this->global, $data,null);
- }
+ }
}
-
/**
* Its handles add stock details Operation.
*/
function AddStock()
-
{
-
-
$MaterialCode = $this->input->post('MaterialCode');
-
$AvailableQty = $this->input->post('AddAvailableStock');
-
$AvailbilityStatus = $this->input->post('StockAvail');
-
$Remarks = $this->input->post('Remarks');
-
$CreatedBy = $this->session->userdata('EmpID');
-
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
-
$createddt = $dt->format('Y-m-d H:i:s');
-
- $Status = 1;
-
+ $Status = 1;
+
if(trim($AvailbilityStatus) == 'YES')
-
{
$Status = 0;
}
+ /* this array to store the value in master table.. */
+ $Stockdetails = array('MaterialCode'=>$MaterialCode,'Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt);
+ $data['Stock'] = $this->store_model->addStock($Stockdetails);
-
-
- //this array to store the value in master table..
-
- $Stockdetails = array('MaterialCode'=>$MaterialCode,'Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt);
-
-
-
- $data['Stock'] = $this->store_model->addStock($Stockdetails);
-
- echo 'Stock Added successfully';
-
-
-
-
+ echo 'Stock Added successfully';
}
- /**
+ /**
* Its handles updated stock details Operations.
*/
function UpdateStock()
-
{
-
-
$MaterialCode = $this->input->post('EditMaterialCode');
-
$AvailableQty = $this->input->post('EditAvailableStock');
-
$AvailbilityStatus = $this->input->post('EditStockAvail');
-
$Remarks = $this->input->post('EditRemarks');
-
$CreatedBy = $this->session->userdata('EmpID');
-
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
-
$createddt = $dt->format('Y-m-d H:i:s');
-
$Status = 1;
if(trim($AvailbilityStatus) == 'YES')
-
{
$Status = 0;
}
+ /*this array to store the value in master table..*/
+ $Stockdetails = array('Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'UpdatedBy'=>$CreatedBy,'updatedOn'=>$createddt);
-
+ $data['Stock'] = $this->store_model->UpdateStock($Stockdetails,$MaterialCode);
- //this array to store the value in master table..
-
- $Stockdetails = array('Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'UpdatedBy'=>$CreatedBy,'updatedOn'=>$createddt);
-
-
-
- $data['Stock'] = $this->store_model->UpdateStock($Stockdetails,$MaterialCode);
-
- echo 'Stock updated successfully';
-
-
-
-
+ echo 'Stock updated successfully';
}
- /**
+ /**
* Its handles view all stock details.
*/
- function viewStockHistory()
-
- {
-
-
-
- $MaterialCode= $this->input->post('id');
-
-
-
- $result = $this->store_model->GetStockHisory($MaterialCode);
-
-
-
- $TotalStock = 0;
-
- $HTML="";
-
- for ($i = 0; $i < count($result); $i++)
-
- {
-
+ function viewStockHistory()
+ {
+ $MaterialCode= $this->input->post('id');
+ $result = $this->store_model->GetStockHisory($MaterialCode);
+ $TotalStock = 0;
+ $HTML="";
+ for ($i = 0; $i < count($result); $i++)
+ {
$SNo = $i + 1;
-
-
-
$AvailableQty = $result[$i]['Quantity'];
-
$UpdatedStock = $result[$i]['ActualQuantity'];
-
$Remarks = $result[$i]['Remarks'];
-
$Updatedon= new DateTime($result[$i]['updatedOn']);
-
-
-
-
$HTML.="
| ".$SNo." |
-
". $AvailableQty." |
-
-
-
".$UpdatedStock." |
-
".$Updatedon->format('d-m-Y')." |
-
".$Remarks." |
-
-
-
-
";
- $TotalStock = $TotalStock + $UpdatedStock;
+ $TotalStock = $TotalStock + $UpdatedStock;
}
die(json_encode(array('History' =>$HTML,'AvalStock'=>$TotalStock)));
-
-}
+
+ }
-/**
+ /**
* To load pagenotfound view
*/
function pageNotFound()
-
{
- $this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
-
-
-
+ $this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
$this->loadViews("404", $this->global, NULL, NULL);
}
}
-
-
?>
\ No newline at end of file
diff --git a/application/controllers/user.php b/application/controllers/user.php
index cb559e4d..5cdd43a4 100755
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -36,8 +36,8 @@ class user extends BaseController
$this->load->model('dahsboard_Model');
- $data['EmpCount'] = $this->employeedetails_model->getEmployeeCount();
-
+ $data['EmpCount'] = $this->employeedetails_model->getEmployeeCount();
+ $data['UserCount'] = $this->dahsboard_Model->getUserCount();
$data['totalpurchaseorder']=$this->dahsboard_Model->totalpurchaseorder();
//print_r( $data['totalpurchaseorder']);
@@ -72,13 +72,15 @@ class user extends BaseController
//dashboard pie chart
$data['importbudgt'] = $this->dahsboard_Model->importbudgt();
- $data['importbal'] = $this->dahsboard_Model->importbal();
+ //$data['importbal'] = $this->dahsboard_Model->importbal();
$data['servicebudgt'] = $this->dahsboard_Model->servicebudgt();
- $data['servicebal'] = $this->dahsboard_Model->servicebal();
+ //$data['servicebal'] = $this->dahsboard_Model->servicebal();
$data['revenuebudgt'] = $this->dahsboard_Model->revenuebudgt();
- $data['revenuebal'] = $this->dahsboard_Model->revenuebal();
+ //$data['revenuebal'] = $this->dahsboard_Model->revenuebal();
$data['capitalbud'] = $this->dahsboard_Model->capitalbud();
- $data['capitalbal'] = $this->dahsboard_Model->capitalbal();
+ //$data['capitalbal'] = $this->dahsboard_Model->capitalbal();
+ $data['typebal'] = $this->dahsboard_Model->typebal();
+
/* HR DASHBOARD Controller Start*/
@@ -202,8 +204,8 @@ class user extends BaseController
$Basic_Pay = $totalEmployeePersent[0]->Basic_Pay;
$totalsalary = $totalEmployeePersent[0]->TotalSalary;
$dayFoodAmt = $totalEmployeePersent[0]->Food_Allowances;
-
-
+ //$allowances =$totalEmployeePersent[0]->Allowances;
+ //$Allowances = $allowances * $values;
$Food_Allowances = $dayFoodAmt * $values;
$daySalary = $Basic_Pay / $CUR_month;
@@ -227,7 +229,7 @@ class user extends BaseController
$currentDayHra = $dayHra * $values;
/** total working days hra calculations**/
// echo $currentDayHra.'
';
- $currentDatePF = $currentDaySalary + $currentDayHra;
+ $currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
/** current date pf calculation**/
if ($totalsalary <= 20000) {
@@ -240,8 +242,8 @@ class user extends BaseController
/** pf amount per day**/
//echo $totalothour;die;
- $salaryInCurrentday = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances;
-
+ $salaryInCurrentdays = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances;
+ $salaryInCurrentday = $salaryInCurrentdays - ($esiAmount + $pfAmount);
$employeeSalary += round($salaryInCurrentday);
}
@@ -316,8 +318,8 @@ class user extends BaseController
$Basic_Pay = $totalEmployeePersent[0]->Basic_Pay;
$totalsalary = $totalEmployeePersent[0]->TotalSalary;
$dayFoodAmt = $totalEmployeePersent[0]->Food_Allowances;
-
-
+ //$allowances =$totalEmployeePersent[0]->Allowances;
+ //$Allowances = $allowances * $values;
$Food_Allowances = $dayFoodAmt * $values;
$daySalary = $Basic_Pay / $CUR_month;
@@ -341,7 +343,7 @@ class user extends BaseController
$currentDayHra = $dayHra * $values;
/** total working days hra calculations**/
// echo $currentDayHra.'
';
- $currentDatePF = $currentDaySalary + $currentDayHra;
+ $currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
/** current date pf calculation**/
if ($totalsalary <= 20000) {
@@ -354,8 +356,8 @@ class user extends BaseController
/** pf amount per day**/
//echo $totalothour;die;
- $salaryInCurrentday = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances;
-
+ $salaryInCurrentdays = $currentDaySalary + $totSalayOT + $currentDayHra + $Food_Allowances; /* + $Allowances;*/
+ $salaryInCurrentday = $salaryInCurrentdays -($esiAmount+$pfAmount);
$totalSalarys = $totalSalary + $salaryInCurrentday;
diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php
index 0c50b998..f7a19c5a 100755
--- a/application/models/dahsboard_model.php
+++ b/application/models/dahsboard_model.php
@@ -2,7 +2,16 @@
class dahsboard_Model extends CI_Model
{
-
+ /*Admin Dashboard - To get User count */
+ function getUserCount()
+ {
+
+ $sql="select count(userId) as users FROM tbl_users where isDeleted ='0'";
+ $query =$this->db->query($sql);
+ return $query->result();
+
+ }
+
/* HR DASHBOART Model START*/
function totemp()
@@ -13,8 +22,7 @@ class dahsboard_Model extends CI_Model
return $query->result();
}
-
-
+
function totloan()
{
@@ -304,9 +312,7 @@ function getTotalServicePoCount(){
$sql="SELECT count(cmast.PONO) as totalService FROM T_PurchaseOrder_Master cmast
- left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
- left join T_Requestion_Master req on req.ReqNo=line.ReqNo
- where ReqType='SERVICE' and month(PODate) = $i
+ where POType='SERVICE' and Status != 'ST030' and month(PODate) = $i
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
$query = $this->db->query($sql);
@@ -334,9 +340,7 @@ function getTotalimportPoCount(){
$sql="SELECT count(cmast.PONO) as totalImport FROM T_PurchaseOrder_Master cmast
- left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
- left join T_Requestion_Master req on req.ReqNo=line.ReqNo
- where ReqType='IMPORT' and month(PODate) = $i
+ where POType='IMPORT' and Status != 'ST030' and month(PODate) = $i
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
$query = $this->db->query($sql);
@@ -362,9 +366,7 @@ function getTotalcapitalPoCount(){
while($i<=12){
$sql="SELECT count(cmast.PONO) as totalcapital FROM T_PurchaseOrder_Master cmast
- left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
- left join T_Requestion_Master req on req.ReqNo=line.ReqNo
- where ReqType='CAPITAL' and month(PODate) = $i
+ where POType='CAPITAL' and Status != 'ST030' and month(PODate) = $i
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
$query = $this->db->query($sql);
@@ -390,9 +392,7 @@ $i++;
while($i<=12){
$sql="SELECT count(cmast.PONO) as totalrevenue FROM T_PurchaseOrder_Master cmast
- left join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
- left join T_Requestion_Master req on req.ReqNo=line.ReqNo
- where ReqType='REVENUE' and month(PODate) = $i
+ where POType='REVENUE' and Status != 'ST030' and month(PODate) = $i
and date(cmast.PODate) >= '".$fa."-04-01' and date(cmast.PODate) <= '".$aa."-03-31'";
$query = $this->db->query($sql);
@@ -486,81 +486,49 @@ function importbudgt ()
$query = $this->db->query($sql);
return $query->result();
}
-function importbal ()
-{
- $sql="SELECT ROUND(sum(BudgetAmount)-(SELECT
-ifnull((sum(distinct(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)
-as Util_Amount
-from T_CostCenter_Budget Cost_Center_Budget
-join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
-JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.POType=Cost_Center_Budget.BudgetType
-WHERE Cost_Center_Budget.BudgetType='IMPORT' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())),2) as balimportbudget FROM T_CostCenter_Budget where BudgetType ='IMPORT' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW()) ";
- $query = $this->db->query($sql);
- return $query->result();
-}
+
function capitalbud ()
{
$sql="SELECT sum(BudgetAmount) as totalcapitalbudget FROM T_CostCenter_Budget where BudgetType ='CAPITAL' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW()) ";
$query = $this->db->query($sql);
return $query->result();
}
-function capitalbal ()
-{
- $sql="SELECT ROUND(sum(BudgetAmount)-(SELECT
-ifnull(sum(distinct if(CapitalRange=0,(( PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate),( PO_Line_Item.Quantity * PO_Line_Item.Rate) - st.Afterdiscountval)),0)
-as Util_Amount
-from T_CostCenter_Budget Cost_Center_Budget
-join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
-JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.POType=Cost_Center_Budget.BudgetType and po.Status !='ST030'
-left JOIN T_Service_Tax st on st.LineItemNo = PO_Line_Item.LineItemNo
-WHERE Cost_Center_Budget.BudgetType='CAPITAL' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())),2) as balcapitalbudget FROM T_CostCenter_Budget where BudgetType ='CAPITAL' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())
-";
- $query = $this->db->query($sql);
- return $query->result();
-}
+
function servicebudgt ()
{
$sql="SELECT ROUND(sum(BudgetAmount),2) as totalservicebudget FROM T_CostCenter_Budget where BudgetType ='SERVICE' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())";
$query = $this->db->query($sql);
return $query->result();
}
-function servicebal ()
-{
- $sql="SELECT Cost_Center_Budget.CostCenterCode as Cost_Center_Code, CostCenterName as Cost_Center_Name,group_concat(distinct Dept_Details.DepartmentName) as Dept_Name,Cost_Center_Budget.BudgetType as BudgetType,Cost_Center_Budget.BudgetYear as BudgetYear,
-case Cost_Center_Budget.BudgetType
-when 'SERVICE'
-then ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)
-end as service
-from T_CostCenter_Budget Cost_Center_Budget
-left join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
-left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.Status !='ST030'
-left JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo
-JOIN T_CostCenter_Master Cost_Mast on Cost_Center_Budget.CostCenterCode=Cost_Mast.CostCenterCode
-JOIN T_CostCenter_Departments CostCentDept on CostCentDept.CostCenterCode=Cost_Mast.CostCenterCode
-JOIN T_DepartmentDetails Dept_Details on Dept_Details.DEPCode= CostCentDept.DEPCode
-left JOIN T_Service_Tax st on st.LineItemNo = PO_Line_Item.LineItemNo
-WHERE Cost_Center_Budget.BudgetType = po.POType and date(po.PODate) >= '2017-04-01' and date(po.PODate) <= '2018-03-31'
-group by
-Cost_Center_Budget.BudgetType
-";
- $query = $this->db->query($sql);
- return $query->result();
-}
+
function revenuebudgt ()
{
$sql="SELECT ROUND(sum(BudgetAmount),2) as totalrevenuebudget FROM T_CostCenter_Budget where BudgetType ='REVENUE' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())";
$query = $this->db->query($sql);
return $query->result();
}
-function revenuebal ()
+function typebal ()
{
- $sql="SELECT ROUND(sum(BudgetAmount)-(SELECT
-ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(distinct T_Rev_Tax.AfterDiscount)),0)
-as Util_Amount
+ $sql="SELECT Cost_Center_Budget.BudgetYear as BudgetYear,
+sum(if(Cost_Center_Budget.BudgetType='IMPORT',
+(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate,0)) as im,
+sum(if(Cost_Center_Budget.BudgetType='CAPITAL',
+if(CapitalRange=0,(( PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate),( PO_Line_Item.Quantity * PO_Line_Item.Rate) - st.Afterdiscountval),0)) as ca,
+sum(if(Cost_Center_Budget.BudgetType='SERVICE',
+PO_Line_Item.Quantity * PO_Line_Item.Rate,0)) as sr,
+sum(if(Cost_Center_Budget.BudgetType='REVENUE',
+(PO_Line_Item.Quantity * PO_Line_Item.Rate)-T_Rev_Tax.AfterDiscount,0)) as rv
+
from T_CostCenter_Budget Cost_Center_Budget
-join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
-JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo
-WHERE Cost_Center_Budget.BudgetType='REVENUE' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())),2) as balrevenuebudget FROM T_CostCenter_Budget where BudgetType ='REVENUE' and YEAR(STR_TO_DATE(`BudgetYear`,'%Y')) = YEAR(NOW())";
+left join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
+left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.Status !='ST030'
+left JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo
+JOIN T_CostCenter_Master Cost_Mast on Cost_Center_Budget.CostCenterCode=Cost_Mast.CostCenterCode
+left JOIN T_Service_Tax st on st.LineItemNo = PO_Line_Item.LineItemNo
+WHERE Cost_Center_Budget.BudgetType = po.POType and date(po.PODate) >= '2017-04-01' and date(po.PODate) <= '2018-03-31'
+group by
+Cost_Center_Budget.BudgetYear
+";
$query = $this->db->query($sql);
return $query->result();
}
@@ -696,7 +664,7 @@ if ($fa and $aa != ''){
$sql="select ifnull(Dept_Details.DepartmentName,'-') As Dept_Name,
- SUM(CASE WHEN Mast.Status = 'ST015' THEN 1 ELSE 0 END) AS PO_Created,
+ SUM(CASE WHEN Mast.Status = 'ST015' or Mast.Status = 'ST024' THEN 1 ELSE 0 END) AS PO_Created,
SUM(CASE WHEN Mast.Status = 'ST025' THEN 1 ELSE 0 END) AS Approved,
SUM(CASE WHEN Mast.Status = 'ST051' THEN 1 ELSE 0 END) AS Approver_Onhold,
SUM(CASE WHEN Mast.Status = 'ST052' THEN 1 ELSE 0 END) AS Releaser_Onhold,
@@ -1193,6 +1161,51 @@ if ($cname!= ''){
return $query->result();
}
+ function consolidate_month($m=null,$cname=null,$mid=null,$fa=null,$aa=null){
+
+ $sql="select mm.Category as category,sd.SupplierID as sid,sd.SupplierName as supplier_name,mm.MaterialCode as mid,mm.MaterialName as material_name,
+sum(pl.Quantity) as quantity,
+sum(pl.Quantity * pl.Rate) as total
+FROM T_PurchaseOrder_Master pm
+join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
+join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
+join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
+left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
+left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
+where pm.Status != 'ST030' and pm.Status != 'ST056' and
+monthname(pm.PODate) = '".$m."' and sd.SupplierName = '".$cname."' and mm.MaterialCode = '".$mid."' ";
+if ($fa and $aa != ''){
+
+ $sql.=" and (pm.PODate >= '".$fa."-04-01' and pm.PODate <= '".$aa."-03-31')";
+
+ }
+ $sql.= "group by supplier_name,material_name";
+ $query = $this->db->query($sql);
+ //echo $sql;
+ return $query->result();
+ }
+ function consolidate_year($cname=null,$mid=null,$fa=null,$aa=null){
+
+ $sql="select mm.Category as category,sd.SupplierID as sid,sd.SupplierName as supplier_name,mm.MaterialCode as mid,mm.MaterialName as material_name,
+sum(pl.Quantity) as quantity,
+sum(pl.Quantity * pl.Rate) as total
+FROM T_PurchaseOrder_Master pm
+join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
+join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
+join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
+left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
+left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
+where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName = '".$cname."' and mm.MaterialCode = '".$mid."' ";
+if ($fa and $aa != ''){
+
+ $sql.=" and (pm.PODate >= '".$fa."-04-01' and pm.PODate <= '".$aa."-03-31')";
+
+ }
+ $sql.= "group by supplier_name,material_name";
+ $query = $this->db->query($sql);
+ //echo $sql;
+ return $query->result();
+ }
function report_cumulative(){
$sql="SELECT year.sid as sid,year.mid as mid,year.supplier_name as supplier_name,year.material_name as material_name,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
@@ -1302,13 +1315,14 @@ ifnull(sum(pl.Quantity * pl.Rate),0)))
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0)
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0)
-- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total
+- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total,pb.FilePath as file
FROM T_PurchaseOrder_Master pm
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
+left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO
where pm.Status != 'ST030' and pm.PONO in (select PONO from T_IGR_Master) ";
if ($cname!= ''){
@@ -1380,13 +1394,14 @@ ifnull(sum(pl.Quantity * pl.Rate),0)))
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0)
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0)
-- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total
+- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total,pb.FilePath as file
FROM T_PurchaseOrder_Master pm
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
+left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO
where
pm.Status != 'ST030' ";
@@ -1975,7 +1990,7 @@ if ($fa and $aa != ''){
$query = $this->db->query($sql);
return $query->result();
}
-
+ //home --this month//
function monthexpensereport()
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@@ -2000,31 +2015,22 @@ if ($fa and $aa != ''){
return $query->result();
}
-
- function yearexpensereport()
- {
- $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
- ifnull(case
- when tinc.type = 'PAYMENT'
- then tinc.total
- end,'0') as expense,
- ifnull(case
- when tinc.type = 'RECEIPT'
- then tinc.total
- end, '0') as income,
- ifnull(case
- when tinc.type = 'PAYMENT'
- then tinc.towhom
- end,'-') as paymentname,
- ifnull(case
- when tinc.type = 'RECEIPT'
- then tinc.towhom
- end, '-') as receiptname,
- date_format(date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.towhom,tinc.description,tinc.account_code,monthname(tinc.date)as month FROM t_income_expense tinc where year(date)= year(current_date()) group by month order by total desc limit 10 ";
+ //home--this year//
+ function yearexpensereport($fa,$aa)
+ {
+ $sql="select monthname(date) as month,
+ sum(if(type='PAYMENT',total,0)) as exp,
+ sum(if(type='RECEIPT',total,0)) as inc,
+ sum(total) as total
+ from t_income_expense
+ where date >= '".$fa."-04-01' and date <= '".$aa."-03-31'
+ group by month ";
$query = $this->db->query($sql);
return $query->result();
}
+
+ //home--report--Day Wise Report //
function today_data($value='')
{
$sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE";
@@ -2078,6 +2084,7 @@ if ($fa and $aa != ''){
return $query->result();
}
+ //yearwise/month//
function yearmonthwise($sid='')
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@@ -2131,6 +2138,22 @@ function INRSymbol()
$query=$this->db->query($sql);
return $query->result();
}
+
+ function cashbookfinyear(){
+
+
+ $sql="SELECT
+ CASE WHEN MONTH(date)>=4 THEN
+ concat(YEAR(date), '-',YEAR(date)+1)
+ ELSE concat(YEAR(date)-1,'-', YEAR(date)) END AS financial_year
+ FROM t_income_expense
+ GROUP BY financial_year";
+ $query = $this->db->query($sql);
+ return $query->result();
+
+
+
+ }
function today()
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
@@ -2160,7 +2183,7 @@ function INRSymbol()
// $query = $this->db->query($sql);
// return $query->result();
//}
- //for menu link in monthly payments//
+
function monthlypayments()
{
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code WHERE MONTH(date) = MONTH(curdate()) group by account_code";
@@ -2169,10 +2192,11 @@ function INRSymbol()
return $query->result();
}
- function departmentmenu($fdate,$tdate)
+
+ //home page --Reports//
+ function departmentmenu($fdate,$tdate,$fa,$aa)
{
- $fdate= date("Y-m-d",strtotime($fdate));
- $tdate=date("Y-m-d",strtotime($tdate));
+
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
ifnull(case
when tinc.type = 'PAYMENT'
@@ -2190,10 +2214,25 @@ function INRSymbol()
when tinc.type = 'RECEIPT'
then tinc.towhom
end, '-') as receiptname,
- tinc.total,tinc.towhom,tinc.description,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.date >= '".$fdate."' and tinc.date <= '".$tdate."'";
+ tinc.total,tinc.towhom,tinc.description,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.date !=0 ";
+ if ($fdate and $tdate != ''){
+ $fdate= date("Y-m-d",strtotime($fdate));
+ $tdate=date("Y-m-d",strtotime($tdate));
+
+ $sql.="and date(tinc.date) >= '".$fdate."'
+ and date(tinc.date) <= '".$tdate."'";
+ }
+ if ($fa and $aa != ''){
+
+ $sql.=" and (tinc.date >= '".$fa."-04-01' and tinc.date <= '".$aa."-03-31')";
+
+ }
+
+
$query = $this->db->query($sql);
//echo $fdate;
//print_r($this->db->last_query());
+ //echo $sql;
return $query->result();
}
diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php
index 1cdb22e3..867ba4ee 100755
--- a/application/models/purchaseorder_model.php
+++ b/application/models/purchaseorder_model.php
@@ -791,7 +791,7 @@ function GetPOType($ReqNo)
Mat.UOM,Mat.HSNCODE,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
ROUND(((AfterSGST + AfterCGST +
AfterIGST)) ,2)as Taxamount,AdvanceAmount,
- TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,sup.SupplierID,sup.ContactNumber,sup.EmailAddress,sup.PAN,sup.GSTNO,LineItem.AmendedDetails as LineAmend,Payment.PaymentTerms,
+ TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,sup.SupplierID,sup.ContactNumber,sup.EmailAddress,sup.PAN,sup.GSTNO,LineItem.AmendedDetails as LineAmend,Payment.PaymentTerms
FROM T_PurchaseOrder_LineItem LineItem
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
diff --git a/application/views/Report_consolidate.php b/application/views/Report_consolidate.php
index 9eb77ea2..fc1b64c4 100644
--- a/application/views/Report_consolidate.php
+++ b/application/views/Report_consolidate.php
@@ -163,64 +163,49 @@
foreach ($spurchse as $result) { ?>
|
- supplier_name;?>
+ supplier_name;?>
|
material_name)) { echo $result->material_name ; } else {echo "-";}
?> |
- April);
- if(!empty($result->April)) { echo round($result->April); } else {echo "-";}
- ?> |
- May);
- if(!empty($result->May)) { echo round($result->May); } else {echo "-";}
- ?> |
- June);
- if(!empty($result->June)) { echo round($result->June); } else {echo "-";}
- ?> |
- July);
- if(!empty($result->July)) { echo round($result->July); } else {echo "-";}
- ?> |
- August);
- if(!empty($result->August)) { echo round($result->August); } else {echo "-";}
-
- ?> |
- September;
- if(!empty($result->September)) { echo round($result->September); } else {echo "-";}
- ?> |
- October);
- if(!empty($result->October)) { echo round($result->October); } else {echo "-";}
- ?> |
- November);
- if(!empty($result->November)) { echo round($result->November); } else {echo "-";}
- ?> |
- December);
- if(!empty($result->December)) { echo round($result->December); } else {echo "-";}
- ?> |
- January);
- if(!empty($result->January)) { echo round($result->January); } else {echo "-";}
- ?> |
- February);
- if(!empty($result->February)) { echo round($result->February); } else {echo "-";}
- ?> |
- March);
- if(!empty($result->March)) { echo round($result->March); } else {echo "-";}
- ?> |
- qtotal);
- if(!empty($result->qtotal)) { echo round($result->qtotal); } else {echo "-";}
- ?> |
+ April); ?>
+ April);?>
+ |
+ May);?>
+ May);?> |
+ June);?>
+ June);?>
+ |
+ July);?>
+ July);?>
+ |
+ August); ?>
+ August);?>
+ |
+ September); ?>
+ September);?>
+ |
+ October); ?>
+ October);?>
+ |
+ November); ?>
+ November);?>
+ |
+ December); ?>
+ December);?>
+ |
+ January); ?>
+ January);?>
+ |
+ February); ?>
+ February);?>
+ |
+ March); ?>
+ March);?>
+ |
+ qtotal); ?>
+ qtotal);?>
+ |
- | supplier_name;?> |
+
+ supplier_name;?>
+ |
material_name)) { echo $result->material_name ; } else {echo "-";}
?> |
- vApril);
- if(!empty($result->vApril)) { echo number_format($result->vApril,2,'.',''); } else {echo "-";}
- ?> |
- vMay);
- if(!empty($result->vMay)) { echo number_format($result->vMay,2,'.',''); } else {echo "-";}
- ?> |
- vJune);
- if(!empty($result->vJune)) { echo number_format($result->vJune,2,'.',''); } else {echo "-";}
- ?> |
- vJuly);
- if(!empty($result->vJuly)) { echo number_format($result->vJuly,2,'.',''); } else {echo "-";}
- ?> |
- vAugust);
- if(!empty($result->vAugust)) { echo number_format($result->vAugust,2,'.',''); } else {echo "-";}
-
- ?> |
- vSeptember;
- if(!empty($result->vSeptember)) { echo number_format($result->vSeptember,2,'.',''); } else {echo "-";}
- ?> |
- vOctober);
- if(!empty($result->vOctober)) { echo number_format($result->vOctober,2,'.',''); } else {echo "-";}
- ?> |
- vNovember);
- if(!empty($result->vNovember)) { echo number_format($result->vNovember,2,'.',''); } else {echo "-";}
- ?> |
- vDecember);
- if(!empty($result->vDecember)) { echo number_format($result->vDecember,2,'.',''); } else {echo "-";}
- ?> |
- vJanuary);
- if(!empty($result->vJanuary)) { echo number_format($result->vJanuary,2,'.',''); } else {echo "-";}
- ?> |
- vFebruary);
- if(!empty($result->vFebruary)) { echo number_format($result->vFebruary,2,'.',''); } else {echo "-";}
- ?> |
- vMarch);
- if(!empty($result->vMarch)) { echo number_format($result->vMarch,2,'.',''); } else {echo "-";}
- ?> |
- vtotal);
- if(!empty($result->vtotal)) { echo number_format($result->vtotal,2,'.',''); } else {echo "-";}
- ?> |
+ vApril,2,'.',''); ?>
+ vApril,2,'.','');?>
+ |
+ vMay,2,'.',''); ?>
+ vMay,2,'.','');?>
+ |
+ vJune,2,'.',''); ?>
+ vJune,2,'.','');?>
+ |
+ vJuly,2,'.',''); ?>
+ vJuly,2,'.','');?>
+ |
+ vAugust,2,'.',''); ?>
+ vAugust,2,'.','');?>
+ |
+ vSeptember,2,'.',''); ?>
+ vSeptember,2,'.','');?>
+ |
+ vOctober,2,'.',''); ?>
+ vOctober,2,'.','');?>
+ |
+ vNovember,2,'.',''); ?>
+ vNovember,2,'.','');?>
+ |
+ vDecember,2,'.',''); ?>
+ vDecember,2,'.','');?>
+ |
+ vJanuary,2,'.',''); ?>
+ vJanuary,2,'.','');?>
+ |
+ vFebruary,2,'.',''); ?>
+ vFebruary,2,'.','');?>
+ |
+ vMarch,2,'.',''); ?>
+ vMarch,2,'.','');?>
+ |
+ vtotal,2,'.',''); ?>
+ vtotal,2,'.','');?>
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Supplier Name |
+ Material Name |
+ |
+
+
+ | Quantity |
+ Value () |
+
+
+
+
+
+ input->get('ab');
+ $month=date('F');
+ $m = $this->input->get('m');
+ //echo $month;
+ foreach($spurchse as $rel)
+ {
+ ?>
+
+
+ |
+ supplier_name;?>
+ |
+ material_name;?> |
+ quantity);
+ echo round($rel->quantity);?> |
+ total,2,'.','');
+ echo number_format($rel->total,2,'.','');?> |
+
+
+
+
+
+
+
+ | Total |
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/Report_consolidate_month_inward.php b/application/views/Report_consolidate_month_inward.php
index c8c50fdb..fce38948 100755
--- a/application/views/Report_consolidate_month_inward.php
+++ b/application/views/Report_consolidate_month_inward.php
@@ -172,7 +172,7 @@ $(document).ready(function() {
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
- title: 'REPORT-Consolidate Category-Wise',
+ title: 'REPORT - Consolidate Inward',
exportOptions: {
columns: ':visible'
diff --git a/application/views/Report_consolidate_y.php b/application/views/Report_consolidate_y.php
new file mode 100644
index 00000000..8207e0dc
--- /dev/null
+++ b/application/views/Report_consolidate_y.php
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Supplier Name |
+ Material Name |
+ |
+
+
+ | Quantity |
+ Value () |
+
+
+
+
+
+ input->get('ab');
+
+ $month=date('F');
+ //echo $month;
+ foreach($spurchse as $rel)
+ {
+ ?>
+
+
+ |
+ supplier_name;?>
+
+ |
+ material_name;?> |
+ quantity);
+ echo round($rel->quantity);?> |
+ total,2,'.','');
+ echo number_format($rel->total,2,'.','');?> |
+
+
+
+
+
+
+
+ | Total |
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/Report_consolidate_year_inward.php b/application/views/Report_consolidate_year_inward.php
index c38b9350..c97d2da3 100755
--- a/application/views/Report_consolidate_year_inward.php
+++ b/application/views/Report_consolidate_year_inward.php
@@ -174,7 +174,7 @@ $(document).ready(function() {
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
- title: 'REPORT-Consolidate Category-Wise',
+ title: 'REPORT - Consolidate Inward',
exportOptions: {
columns: ':visible'
diff --git a/application/views/Report_purchase_inward.php b/application/views/Report_purchase_inward.php
index b624122e..89c92e64 100644
--- a/application/views/Report_purchase_inward.php
+++ b/application/views/Report_purchase_inward.php
@@ -321,7 +321,16 @@ if(!empty($mms))
echo $rel->Package;?>
total,2);
- echo number_format($rel->total,2,'.','');?> |
+
+ if(!empty($rel->file)){ ?>
+ total,2,'.','');?>
+ total,2,'.','');
+ }
+ ?>
+
@@ -573,6 +582,11 @@ buttons: [
$('#mySelect').val('');
}
+$(document).ready(function(){
+
+ $('[data-toggle="tooltip"]').tooltip();
+
+});
diff --git a/application/views/ViewPurchaseOrder.php b/application/views/ViewPurchaseOrder.php
deleted file mode 100644
index e69de29b..00000000
diff --git a/application/views/addstorerequisitionslip.php b/application/views/addstorerequisitionslip.php
index a1ee1365..f497bf91 100644
--- a/application/views/addstorerequisitionslip.php
+++ b/application/views/addstorerequisitionslip.php
@@ -1,716 +1,1492 @@
format('d-m-Y');
+
+
+// print_r($cost);die();
+
?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
'form-label-left requistion ','name' => 'requistion','id' => 'requistion');
+
+ $attributes = array('class' => 'form-label-left requistion ','name' => 'requistion','id' => 'requistion');
+
+
+
echo form_open($this->config->base_url().'storerequisitionlist
+
/ addstores',$attributes); ?>
+
+
+
+
+
+
+
+
+
+
'RequestedBy','value' => set_value('RequestedBy',$name) ,'id'=>'RequestedBy','class' => 'form-control num' ,'required' => 'true' ,'readonly' => 'true');
+
echo form_input($data);
+
?>
+
+
+
+
'DepartmentName','value' => set_value('DepartmentName',$DEPCode . "-".$DepName), 'id'=>'DepartmentName','class' => 'form-control num' ,'required' => 'true' ,'readonly' => 'true');
+
echo form_input($data);
+
?>
+
+
+
+
+
+
+
+
+
'Date','value' => set_value('Date',$CurrentDate), 'id' =>"Date", 'class' => 'form-control num' ,'required' => 'true');
+
echo form_input($data);
+
?>
+
+
+
+
+
+
+
+
+
+
+
'Select Cost Center Name');
+
//print_r( $options);
+
+
+
if(!empty($cost))
+
{
+
foreach ($cost as $SID):
+
// echo $SID->ConfigValue;
+
$Costs[$SID->CostCenterCode] = $SID->CostCenterCode .'-'. $SID->CostCenterName ;
+
+
+
endforeach;
+
+
+
}
+
echo form_dropdown('CostCenter', $Costs,set_value('CostCenter'),'id="CostCenter"' ,'class="form-control select2"' );
+
+
+
?>
+
+
-
+
+
+
+
+
+
+
+
+
Add Line Item
+
+
+
+
+
+
+
+
+
+
+
+
+
'Select Material Code');
+
//print_r( $options);
+
+
+
if(!empty($MaterialList))
+
{
+
foreach ($MaterialList as $MID):
+
+
+
+
+
$options[$MID->MaterialCode] = $MID->MaterialCode.' '.' - '.' '.$MID->MaterialName;
+
+
+
endforeach;
+
}
+
+
+
echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class="form-control"');
+
+
+
?>
+
+
+
+
+
+
+
'Description','value' => set_value('Description'),'id'=>'Description', 'class' => 'form-control','readonly' => 'true' );
+
echo form_input($data);
+
?>
+
+
+
+
+
'UOM','value' => set_value('UOM'),'id'=>'UOM', 'class' => 'form-control','readonly' => 'true' );
+
echo form_input($data);
+
?>
-
+
+
+
+
+
+
+
+
'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event)','maxlength'=>'20');
+
echo form_input($data);
+
?>
+
+
-
+
+
+
+
+
'Remarks','value' => set_value('Remarks'),'id'=>'Remarks', 'class' => 'form-control');
+
echo form_input($data);
+
?>
+
+
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
'EditMaterialCode','value' => set_value('EditMaterialCode'),'id'=>'EditMaterialCode', 'class' => 'form-control','readonly' => 'true' );
+
echo form_input($data);
-
+
+
+
?>
+
+
+
+
+
+
'EditDescription','value' => set_value('EditDescription'),'id'=>'EditDescription', 'class' => 'form-control','readonly' => 'true' );
+
echo form_input($data);
+
?>
+
+
+
+
+
+
'EditUOM','value' => set_value('EditUOM'),'id'=>'EditUOM', 'class' => 'form-control','readonly' => 'true' );
+
echo form_input($data);
+
?>
+
-
-
+
+
+
+
+
+
+
'EditQuantity','value' => set_value('EditQuantity'),'id'=>'EditQuantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event)','maxlength'=>'20');
+
echo form_input($data);
+
?>
+
+
+
+
+
+
+
'EditRemarks','value' => set_value('EditRemarks'),'id'=>'EditRemarks', 'class' => 'form-control');
+
echo form_input($data);
+
?>
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
| S.No |
+
Item Code |
+
Description |
+
UOM |
+
Quantity |
+
Remarks |
+
Action |
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+
+
+
+
diff --git a/application/views/dashboard.php b/application/views/dashboard.php
index 2a0dc9c1..298b991d 100755
--- a/application/views/dashboard.php
+++ b/application/views/dashboard.php
@@ -1,18 +1,19 @@
EmpCount;
- }
-
-
+ }
}
+
?>
@@ -532,26 +533,31 @@ $("#monthabs").val('');
users;
+ }
+ }
if($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR)
{
?>
-
+
-
-
-
-
+
+
+
-
-
+
-
44
-
+
User Registrations
@@ -560,13 +566,9 @@ $("#monthabs").val('');
-
-
-
-
-
+
-
+
@@ -789,7 +791,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled: