From 385fb1d7fe56387f6a64d41301bdb2dc4cdf76e3 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 6 Dec 2017 14:27:23 +0530 Subject: [PATCH] reports list --- application/config/routes.php | 4 + application/controllers/monthlypay.php | 15 +- application/controllers/payslip.php | 76 ++- application/controllers/report.php | 133 ++++- .../controllers/reportlistcontroller.php | 39 ++ application/models/dahsboard_model.php | 275 +++++++++-- application/models/monthlypay_model.php | 6 +- application/models/payroll_model.php | 8 - application/views/Report_purchase.php | 135 ++++- application/views/Reportcashbook.php | 462 ++++++++++++++++++ application/views/addMontly.php | 0 application/views/attendance.php | 5 +- application/views/cashbookmonthlydep.php | 135 +++++ application/views/cashbookmonthlyexpenses.php | 138 ++++++ application/views/cashbookmonthmenu.php | 83 ++++ application/views/cashbooktoday.php | 82 ++++ application/views/cashbookyearlyexpenses.php | 121 +++++ application/views/cashbookyearmonthwise.php | 126 +++++ application/views/editOldmonthly.php | 0 application/views/editPayslip.php | 0 application/views/includes/header.php | 38 +- application/views/monthlyListing.php | 0 application/views/monthlypayinputs.php | 61 ++- application/views/payslipeditable.php | 2 +- application/views/payslipgenerate.php | 7 +- application/views/payslipgenerateprint.php | 8 +- application/views/payslipupload.php | 2 +- application/views/payslipupload2.php | 2 +- application/views/reportslink.php | 424 ++++++++++++++++ 29 files changed, 2197 insertions(+), 190 deletions(-) mode change 100644 => 100755 application/controllers/monthlypay.php mode change 100644 => 100755 application/controllers/payslip.php mode change 100644 => 100755 application/controllers/report.php create mode 100644 application/controllers/reportlistcontroller.php mode change 100644 => 100755 application/models/payroll_model.php mode change 100644 => 100755 application/views/Report_purchase.php create mode 100644 application/views/Reportcashbook.php mode change 100644 => 100755 application/views/addMontly.php create mode 100644 application/views/cashbookmonthlydep.php create mode 100644 application/views/cashbookmonthlyexpenses.php create mode 100644 application/views/cashbookmonthmenu.php create mode 100644 application/views/cashbooktoday.php create mode 100644 application/views/cashbookyearlyexpenses.php create mode 100644 application/views/cashbookyearmonthwise.php mode change 100644 => 100755 application/views/editOldmonthly.php mode change 100644 => 100755 application/views/editPayslip.php mode change 100644 => 100755 application/views/monthlyListing.php mode change 100644 => 100755 application/views/payslipeditable.php mode change 100644 => 100755 application/views/payslipgenerate.php mode change 100644 => 100755 application/views/payslipgenerateprint.php mode change 100644 => 100755 application/views/payslipupload.php mode change 100644 => 100755 application/views/payslipupload2.php create mode 100644 application/views/reportslink.php diff --git a/application/config/routes.php b/application/config/routes.php index 04f9264b..ee3af1c1 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -47,6 +47,7 @@ $route['404_override'] = 'error'; $route['loginMe'] = 'login/loginMe'; $route['dashboard'] = 'user'; $route['logout'] = 'user/logout'; +$route['reports']='reportlistcontroller'; //<-----------Application listing Routes------------> @@ -223,6 +224,9 @@ $route['Report_year_wise'] = "report/year_wise"; $route['Report_supplier'] = "report/purchase_supplier"; $route['Report_consolidate'] = "report/consolidate"; $route['Report_cumulative'] = "report/cumulative"; +$route['cashbookreport']="report/cashbook"; +$route['cashbookmonthlyexpenses']="report/monthexpenses"; +$route['cashbookyearlyexpenses']="report/yearexpenses"; // Company Information $route['companyview'] = 'companycontroller/companyview'; diff --git a/application/controllers/monthlypay.php b/application/controllers/monthlypay.php old mode 100644 new mode 100755 index 12c12344..eb369018 --- a/application/controllers/monthlypay.php +++ b/application/controllers/monthlypay.php @@ -3,11 +3,11 @@ require APPPATH . '/libraries/BaseController.php'; /** - * Class : monthlypay (Monthly Payment Details - Controller) + * Class : Cost Center (Cost Center Controller) * User Class to control all user related operations. - * @author : Venba Info Tech - + * @author : Venba Info Tech - Saravana kumar * @version : 1.1 - * @since :18 November 2017 + * @since : 18 November 2017 */ class monthlypay extends BaseController { @@ -29,7 +29,7 @@ class monthlypay extends BaseController */ public function index() { - $this->global['pageTitle'] = 'Resico: Monthly Pay Details'; + $this->global['pageTitle'] = 'Resico : Monthly Pay Details'; $this->loadviews('monthlyListing',$this->global); } @@ -47,6 +47,7 @@ class monthlypay extends BaseController function deletePublicHoliday() { $d = $this->input->post('param1'); + $res = $this->monthlypay_model->deleteHoliday($d); if($res == 1){ echo "Deleted Successfully..!"; @@ -62,6 +63,7 @@ class monthlypay extends BaseController foreach($phpdata as $d) { + if(!empty($d->Holiday_Name)){ $hname = $d->Holiday_Name; $hdate = date_format(date_create($d->Date),'Y-m-d'); @@ -79,7 +81,7 @@ class monthlypay extends BaseController $count = $this->monthlypay_model->saveHolidays($tostore,'u'); $total = $total + $count; } - + } } echo $total . "-Holiday(s) Saved Successfully..!"; @@ -88,6 +90,7 @@ class monthlypay extends BaseController function attendanceLoad() { + $month['month'] = ''; $monthdays = 0; $begin = 0; @@ -117,6 +120,8 @@ class monthlypay extends BaseController $begin = new DateTime($year.'-'.$month.'-01'); $end = new DateTime($year.'-'.$month.'-'.$monthdays); } + + $sundayarray =array(); while ($begin <= $end) { diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php old mode 100644 new mode 100755 index a0315640..01570f64 --- a/application/controllers/payslip.php +++ b/application/controllers/payslip.php @@ -5,9 +5,9 @@ require APPPATH . '/third_party/mpdf/mpdf.php'; /** - * Class : payslip (Pay Slip - Controller) + * Class : Employee (Employee Controller) * User Class to control all user related operations. - * @author : Venba Info Tech - Gandhimathi + * @author : Venba Info Tech * @version : 1.1 * @since : 18 November 2017 */ @@ -63,7 +63,7 @@ function phpAlert($msg) { $y = substr($payon,3); $month = $monthsoptions[$m]."-".$y; $excel = $this->input->post('excel'); - $HTML=""; + $HTML = ''; //echo $excel; // if(empty($excel)) // { @@ -92,13 +92,12 @@ function phpAlert($msg) { } $totamtwords = $this->convertNumber($totalamt); $data['bankdetails']=$this->payroll_model->getBankInfo($bank); - $data['companyinformation']=$this->payroll_model->getCompanyInfo(); $data['Totalamount']=$totalamt; $data['Totalamtwords']=$totamtwords; $data['PayMonth']=$month; $filename = 'Bank Report for'.$payon.'pdf' ; - $HTML = $this->load->View("bankreportprint",$data,true); + $HTML = $this->load->view("bankreportprint",$data,true); } if($this->input->post('PF_Report')) { @@ -126,7 +125,7 @@ function phpAlert($msg) { $data['Totalamtwords']=$totamtwords; if(empty($excel)){ $filename = 'PF Report for'.$payon.'pdf' ; - $HTML = $this->load->View("pfreportprint",$data,true); + $HTML = $this->load->view("pfreportprint",$data,true); // echo "PDF PART 1"; } else{ @@ -260,7 +259,7 @@ function phpAlert($msg) { if(empty($excel)){ $filename = 'ESI Report for'.$payon.'pdf'; - $HTML = $this->load->View("esireportprint",$data,true); + $HTML = $this->load->view("esireportprint",$data,true); // echo "PDF PART 1"; } else{ @@ -355,9 +354,9 @@ function phpAlert($msg) { if(empty($excel)){ - // $php = $this->output->get_output(); + // $php = $this->output->get_output(); - // // Load library + // Load library // $this->load->library('dompdf_gen'); // require_once(APPPATH .'third_party/dompdf/dompdf_config.inc.php'); @@ -376,7 +375,8 @@ function phpAlert($msg) { // $font, 6, array(0,0,0)); // $dompdf->stream($filename); - // //echo "PDF PART 2"; + //echo "PDF PART 2"; + $mpdf=new mPDF('utf-8','A4-P',9, 12,12, 10, 82, 38, 4, 6); $mpdf->SetDisplayMode('fullpage'); $mpdf->SetHTMLHeader($HtmlHeading); @@ -389,7 +389,6 @@ function phpAlert($msg) { $mpdf->WriteHTML($HTML); $mpdf->Output("".$filename.'.pdf','I',$php); - } } @@ -437,24 +436,14 @@ function phpAlert($msg) { if(empty($this->input->post('finyear'))) { - // echo "DEFAULT LOAD"; + //echo "DEFAULT LOAD"; $year = date("Y"); $month = date("m"); $currentyear = ''; $nxtyear = ''; $source = $this->input->post('source'); $data['selsource'] = 'Company'; - - // if($month >= 4) - // { - // $currentyear = $year; - // $nxtyear = ($year+1); - // } - // else - // { - // $currentyear =($year-1); - // $nxtyear = $year; - // } + } else @@ -774,7 +763,7 @@ function getEmployee() */ public function PrintPdf() { - + $html=""; $All = $this->input->post('All'); if($All == '') { @@ -796,25 +785,32 @@ function getEmployee() { $result = $this->payroll_model->getEmpAll($Payon); - //print_r($result); - //echo "-----------------------------------------"; + // print_r($result); + // die(); if($result > 0 ) { - for($i=0;$i payroll_model->GetPayslipdata($Payon,$EmpID); - - + // + $totalsalary =$Data['PayDetails'][0]->LessAdvance; $totalsalaryinwords = $this->convertNumber(round($totalsalary)); $Data['amtinwords']=$totalsalaryinwords; + // print_r ($Data); + // exit(); //$Data['Count'] = $i; - $html.= $this->load->View("payslipgenerateprint", $Data ,true); - + $html.=$this->load->view("payslipgenerateprint", $Data,true ); + + // print_r ($Data); + // exit(); } } @@ -828,8 +824,9 @@ function getEmployee() $totalsalary =$Data['PayDetails'][0]->LessAdvance; $totalsalaryinwords = $this->convertNumber(round($totalsalary)); $Data['amtinwords']=$totalsalaryinwords; - - $html = $this->load->View("payslipgenerateprint", $Data,true ); + //print_r ($Data); + //exit(); + $html=$this->load->view("payslipgenerateprint", $Data,true ); } @@ -837,7 +834,7 @@ function getEmployee() // $php = $this->output->get_output(); // // Load library - // $this->load->library('dompdf_gen'); + // $this->load->library('dompdf_gen'); // if($All != '') // { @@ -859,12 +856,13 @@ function getEmployee() // $canvas = $dompdf->get_canvas(); // $font = Font_Metrics::get_font("helvetica", "bold"); - // // the same call as in my previous example + // // the same call as in my previous example // $canvas->page_text(72, 18, "Page: {PAGE_NUM} of {PAGE_COUNT}", // $font, 6, array(0,0,0)); // $dompdf->stream($filename); // } + $mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 24, 4, 6); $mpdf->SetDisplayMode('fullpage'); $mpdf->SetHTMLHeader($HtmlHeading); @@ -875,9 +873,9 @@ function getEmployee() $mpdf->setAutoBottomMargin = 'stretch'; $mpdf->WriteHTML($html); $mpdf->Output("".$filename.'.pdf','I',$php); - } - } + } +} function updatePayslip() { @@ -1063,8 +1061,8 @@ function getEmployee() { $loanRecovered = strtoupper($loanRecovered); } - $Incentive =$sheet->getCell('H'.$x)->getValue(); - $Other_Deductions =$sheet->getCell('I'.$x)->getValue(); + $Incentive =$sheet->getCell('G'.$x)->getValue(); + $Other_Deductions =$sheet->getCell('H'.$x)->getValue(); if( $EmpId != '') { diff --git a/application/controllers/report.php b/application/controllers/report.php old mode 100644 new mode 100755 index 54e6001a..123381c0 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -62,29 +62,40 @@ class report extends BaseController public function TotalOrd() { - $this->global['pageTitle'] = 'Total Orders Reports -'; + $this->global['pageTitle'] = 'Total Orders Reports'; - - - $data['Total']=$this->dahsboard_Model->report_total(); - - - $this->loadviews("Report_totalorders",$this->global,$data, NULL); - + if ($this->input->post('financialyear')) { + $ab = $this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['Total']=$this->dahsboard_Model->report_total($fa,$aa); + } + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $this->loadviews("Report_totalorders",$this->global,$data, NULL); + } public function ccr() { - $this->global['pageTitle'] = 'Cost Center Reports -'; + $this->global['pageTitle'] = 'Cost Center Reports -'; + if ($this->input->post('financialyear')) { + $ab = $this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['ccrpt']=$this->dahsboard_Model->report_ccr($fa,$aa); + + } + $data['finyear']=$this->dahsboard_Model->report_finyear(); + + $this->loadviews("Report_costcenter",$this->global,$data, NULL); + + + } - - $data['ccrpt']=$this->dahsboard_Model->report_ccr(); - - - $this->loadviews("Report_costcenter",$this->global,$data, NULL); - - } public function MM_Supplier() { @@ -336,15 +347,93 @@ class report extends BaseController $this->loadviews("Report_cumulative_day",$this->global,$data, NULL); } + public function cashbook() + { + + $this->global['pageTitle'] = 'Cashbook - Cashbook Reports - '; + + + $data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount(); + $data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount(); + $data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount(); + $data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount(); + $data['cashbook']=$this->dahsboard_Model->cashbook(); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + + + $income="INCOME"; + $expense="EXPENSE"; + $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income); + $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense); + $data['todayincome']=$this->dahsboard_Model->today_data($income); + $data['todayexpense']=$this->dahsboard_Model->today_data($expense); + $data['yearincome']=$this->dahsboard_Model->yearwise_data($income); + $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); + + $this->loadviews("Reportcashbook",$this->global,$data, NULL); - - - - - - + } + public function monthexpenses() + { + + $this->global['pageTitle'] = 'Cashbook - monthly expenses Reports - '; + + + + $data['monthlyreport']=$this->dahsboard_Model->monthexpensereport(); + // $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport(); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + $this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL); + } + public function yearexpenses() + { + + $this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - '; + + + //$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport(); + $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport(); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + + $this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL); + } + public function cashbookdepartment() + { + $sid=$_GET['sid']; + $this->global['pageTitle'] = 'Cashbook - department - '; + $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + //print_r($data['departmentwise']); + $this->loadviews("cashbookmonthlydep",$this->global,$data, NULL); + } + //for cashbook menu link// + public function cashbookmonthmenu() + { + + $this->global['pageTitle'] = 'Cashbook - department - '; + $data['monthlymenupayments']=$this->dahsboard_Model->monthlypayments(); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + //print_r($data['departmentwise']); + $this->loadviews("cashbookmonthmenu",$this->global,$data, NULL); + } + public function yearmonthwise() + { + $sid=$_GET['sid']; + $this->global['pageTitle'] = 'Cashbook - yearmonthwise - '; + $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise($sid); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + //print_r($data['departmentwise']); + $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); + } +public function Viewtoday() + { + $this->global['pageTitle'] = 'Cashbook - viewtoday '; + $data['tdy']=$this->dahsboard_Model->today(); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + $this->loadviews("cashbooktoday",$this->global,$data, NULL); + } } ?> \ No newline at end of file diff --git a/application/controllers/reportlistcontroller.php b/application/controllers/reportlistcontroller.php new file mode 100644 index 00000000..172f4756 --- /dev/null +++ b/application/controllers/reportlistcontroller.php @@ -0,0 +1,39 @@ +load->model('user_model'); + $this->load->library('form_validation'); + + $this->isLoggedIn(); + } + + /** + * This function used to load the first screen of the user + */ + public function index() + { + $this->global['pageTitle'] = 'Reports list '; + $this->loadViews("reportslink", $this->global , NULL); + } + + + +} + +?> diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index db58c8ae..f7c6ee4b 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -2,6 +2,9 @@ class dahsboard_Model extends CI_Model { + + + function totalpurchaseorder(){ @@ -376,7 +379,7 @@ group by PONO,POType,Dept_Name"; } - function report_total(){ + function report_total($fa,$aa){ $sql="select Dept_Details.DepartmentName As Dept_Name, @@ -388,11 +391,13 @@ group by PONO,POType,Dept_Name"; SUM(CASE WHEN Mast.Status = 'ST026' THEN 1 ELSE 0 END) AS Released, SUM(CASE WHEN Mast.Status = 'ST027' THEN 1 ELSE 0 END) AS IGR_Created, SUM(CASE WHEN Mast.Status = 'ST044' THEN 1 ELSE 0 END) AS MRIR_Approved, - SUM(CASE WHEN Mast.Status = 'ST045' THEN 1 ELSE 0 END) AS MRIR_Rejected + SUM(CASE WHEN Mast.Status = 'ST045' THEN 1 ELSE 0 END) AS MRIR_Rejected, +SUM(CASE WHEN Mast.Status = 'ST056' THEN 1 ELSE 0 END) AS Special_po from T_PO_Detail Mast JOIN T_Requestion_Master as Req on Req.ReqNo=Mast.ReqNo JOIN T_Employee_Details as Emp_Det on Emp_Det.EmpID=Req.RequestedBy JOIN T_DepartmentDetails Dept_Details on Dept_Details.DEPCode=Emp_Det.Departmentcode +where Mast.PODate >= '".$fa."-04-01' and Mast.PODate <= '".$aa."-03-31' group by Dept_Name"; $query = $this->db->query($sql); return $query->result(); @@ -401,7 +406,7 @@ group by Dept_Name"; } - function report_ccr(){ + function report_ccr($fa,$aa){ $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, @@ -435,7 +440,7 @@ JOIN T_CostCenter_Master Cost_Mast on Cost_Center_Budget.CostCenterCode=Cost_Mas 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 +WHERE Cost_Center_Budget.BudgetType = po.POType and date(po.CreatedDate) >= '".$fa."-04-01' and date(po.CreatedDate) <= '".$aa."-03-31' group by Cost_Center_Budget.CostCenterCode,Cost_Center_Budget.BudgetYear,Cost_Center_Budget.BudgetType order by Cost_Center_Budget.CostCenterCode"; @@ -466,7 +471,7 @@ group by po.SupplierID,pl.MaterialCode"; function report_MMItem(){ - $sql="SELECT MaterialCode,MaterialName,UOM,Category FROM T_MaterialMaster group by MaterialCode"; + $sql="SELECT MaterialCode,MaterialName,UOM,Category,HSNCODE FROM T_MaterialMaster group by MaterialCode"; $query = $this->db->query($sql); return $query->result(); @@ -493,14 +498,36 @@ order by monthname(matv.CreatedDate)"; function report_purchase($cname,$prod,$fa,$aa,$m,$frm,$t){ - $sql="SELECT pm.PONO as pono,date_format(pm.CreatedDate,'%d-%m-%Y') as created_date, TIME_FORMAT(pm.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,sd.SupplierName as supplier_name,ifnull(sum(pl.Quantity),0) as quantity,ifnull(sum(pl.Rate),0) as rate,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value,ifnull(sum(st.After_SGST),0) as sgst,ifnull(sum(st.After_CGST),0) as cgst,ifnull(sum(st.After_IGST),0) as igst,round((ifnull(sum(pl.Quantity * pl.Rate),0) + ifnull(sum(st.After_SGST),0) + ifnull(sum(st.After_CGST),0) + ifnull(sum(st.After_IGST),0)),2) as total -FROM T_PurchaseOrder_Master pm + $sql="SELECT pm.PONO as pono,date_format(pm.CreatedDate,'%d-%m-%Y') as created_date, +TIME_FORMAT(pm.CreatedDate,'%l:%i %p') as created_time, +mm.MaterialName as material_name,sd.SupplierName as supplier_name, +ifnull(sum(pl.Quantity),0) as quantity,mm.UOM as UOM,ifnull(sum(pl.Rate),0) as rate, +round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value, +if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate, +ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0) as sgst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0) as cgst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0) as igst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0) as discount, +ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0) as freight, +ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0) as Package, +round(( + if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)), +if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)), +ifnull(sum(pl.Quantity * pl.Rate),0))) ++ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) ++ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),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 + 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 where -pm.PONO>'0' "; +pm.Status != 'ST030' "; if ($cname!= ''){ @@ -545,14 +572,36 @@ $sql.="group by pono,material_name,supplier_name"; function report_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d){ - $sql="SELECT sd.SupplierID as sid,mm.MaterialCode as mid,pm.PONO as pono,date_format(pm.CreatedDate,'%d-%m-%Y') as created_date, TIME_FORMAT(pm.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,sd.SupplierName as supplier_name,ifnull(sum(pl.Quantity),0) as quantity,ifnull(sum(pl.Rate),0) as rate,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value,ifnull(sum(st.After_SGST),0) as sgst,ifnull(sum(st.After_CGST),0) as cgst,ifnull(sum(st.After_IGST),0) as igst,round((ifnull(sum(pl.Quantity * pl.Rate),0) + ifnull(sum(st.After_SGST),0) + ifnull(sum(st.After_CGST),0) + ifnull(sum(st.After_IGST),0)),2) as total -FROM T_PurchaseOrder_Master pm + $sql="SELECT pm.PONO as pono,date_format(pm.CreatedDate,'%d-%m-%Y') as created_date, +TIME_FORMAT(pm.CreatedDate,'%l:%i %p') as created_time, +mm.MaterialName as material_name,sd.SupplierName as supplier_name, +ifnull(sum(pl.Quantity),0) as quantity,mm.UOM as UOM,ifnull(sum(pl.Rate),0) as rate, +round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value, +if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate, +ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0) as sgst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0) as cgst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0) as igst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0) as discount, +ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0) as freight, +ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0) as Package, +round(( + if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)), +if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)), +ifnull(sum(pl.Quantity * pl.Rate),0))) ++ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) ++ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),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 + 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 where -pm.PONO>'0' "; +pm.Status != 'ST030' "; if ($cname!= ''){ @@ -633,6 +682,7 @@ 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 +where pm.Status != 'ST030' group by month(created_date)"; $query = $this->db->query($sql); return $query->result(); @@ -660,7 +710,7 @@ 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 -where sd.SupplierName is not null and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ? +where pm.Status != 'ST030' and sd.SupplierName is not null and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ? group by supplier_name,material_name"; $query = $this->db->query($sql,array($month,$year)); return $query->result(); @@ -673,7 +723,7 @@ 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 -where sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31' +where pm.Status != 'ST030' and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31' group by supplier_name,material_name"; $query = $this->db->query($sql,array()); return $query->result(); @@ -682,13 +732,48 @@ group by supplier_name,material_name"; function report_supplier($cname,$fa,$aa,$m,$frm,$t){ - $sql="SELECT sd.SupplierID as sid,sd.SupplierName as supplier_name,count(pm.PONO) as counts,ifnull(sum(pl.Quantity),0) as quantity,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value,round(sum(ifnull((pl.Quantity * pl.Rate),0) + ifnull(st.After_SGST,0) + ifnull(st.After_CGST,0) + ifnull(st.After_IGST,0)),2) as total + $sql="SELECT sd.SupplierID as sid,sd.SupplierName as supplier_name,count(pm.PONO) as counts,ifnull(sum(pl.Quantity),0) as quantity,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value, + +case pm.POType +when 'IMPORT' +then ifnull((sum(distinct(pl.Quantity * pl.Rate) * pm.ExchangeRate) + +),0) +when 'CAPITAL' +then sum(distinct if(pm.CapitalRange=0,(( pl.Quantity * pl.Rate) * pm.ExchangeRate),( pl.Quantity * pl.Rate) +- st.Afterdiscountval)) ++ ifnull(sum(distinct st.After_SGST),0) ++ ifnull(sum(distinct st.After_CGST),0) ++ ifnull(sum(distinct st.After_IGST),0) ++ ifnull(sum(distinct st.AfterFreightValue),0) + + +when 'SERVICE' +then ifnull(sum(distinct pl.Quantity * pl.Rate),0) ++ ifnull(sum(distinct st.After_SGST),0) ++ ifnull(sum(distinct st.After_CGST),0) ++ ifnull(sum(distinct st.After_IGST),0) ++ ifnull(sum(distinct st.AfterFreightValue),0) +- ifnull(sum(distinct st.Afterdiscountval),0) + +when 'REVENUE' +then ifnull(sum(distinct pl.Quantity * pl.Rate),0) +- ifnull(sum(distinct rt.AfterDiscount),0) ++ ifnull(sum(distinct rt.AfterSGST),0) ++ ifnull(sum(distinct rt.AfterCGST),0) ++ ifnull(sum(distinct rt.AfterIGST),0) ++ ifnull(sum(distinct rt.AfterFreightValue),0) ++ ifnull(sum(distinct rt.AfterPackagingValue),0) + +end + as total FROM T_PurchaseOrder_Master pm -join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO -join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +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 where -pm.PONO>'0' "; +pm.Status != 'ST030' "; if ($cname!= ''){ @@ -756,7 +841,8 @@ sum(pl.Quantity * pl.Rate) as vtotal 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 "; +join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' "; if ($cname!= ''){ @@ -786,7 +872,7 @@ 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 -where sd.SupplierName is not null and +where pm.Status != 'ST030' and sd.SupplierName is not null and case when (month(pm.CreatedDate) >=4) then (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 ) @@ -800,7 +886,7 @@ 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 -where sd.SupplierName is not null and +where pm.Status != 'ST030' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) group by supplier_name,material_name ) as month on month.supplier_name=year.supplier_name and month.material_name=year.material_name @@ -810,7 +896,7 @@ 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 -where sd.SupplierName is not null and +where pm.Status != 'ST030' and sd.SupplierName is not null and date(pm.CreatedDate) = current_date() group by supplier_name,material_name ) as today on today.supplier_name=month.supplier_name and today.material_name=month.material_name @@ -826,7 +912,7 @@ 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 -where sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' +where pm.Status != 'ST030' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' group by supplier_name,material_name"; $query = $this->db->query($sql); return $query->result(); @@ -838,7 +924,7 @@ 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 -where sd.SupplierName is not null and +where pm.Status != 'ST030' and sd.SupplierName is not null and case when (month(pm.CreatedDate) >=4) then (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 ) @@ -850,7 +936,129 @@ group by supplier_name,material_name"; $query = $this->db->query($sql); return $query->result(); } + function report_cum_day($sup=null,$mat=null){ + + $sql="SELECT sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal +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 +where pm.Status != 'ST030' and sd.SupplierName is not null and +date(pm.CreatedDate) = current_date() and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' +group by supplier_name,material_name"; + $query = $this->db->query($sql); + return $query->result(); + } + function cashbook() + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,tinc.description,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code "; + $query = $this->db->query($sql); + return $query->result(); + } + + function monthexpensereport() + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.towhom,tinc.description,tinc.account_code, ac.name FROM t_income_expense as tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.type='EXPENSE' and month(tinc.date)= month(current_date()) group by account_code order by total desc limit 10 "; + $query = $this->db->query($sql); + return $query->result(); + + } + + function yearexpensereport() + { + $sql="SELECT date_format(date,'%d-%m-%Y')as date,type,sum(total)as total,towhom,description,account_code,monthname(date)as month FROM t_income_expense where type='EXPENSE' and year(date)= year(current_date()) group by month order by total desc limit 10 "; + $query = $this->db->query($sql); + return $query->result(); + + } + function today_data($value='') + { + $sql="SELECT type,Sum(total) as todaydata FROM t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE"; + $query = $this->db->query($sql,array($value)); + return $query->result(); + + } + + function monthwise_data($value='') + { + $sql="SELECT type,Sum(total) as monthlydata FROM t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate())"; + $query = $this->db->query($sql,array($value)); + return $query->result(); + + } + function yearwise_data($value='') + { + $sql="SELECT type,sum(total) as yearlydata from t_income_expense + where + type = ? and ((YEAR(date) = YEAR(CURRENT_DATE) and MONTH(date) >= 4) or (YEAR(date) = YEAR(CURRENT_DATE)+1 and MONTH(date) <= 3))"; + $query = $this->db->query($sql,array($value)); + return $query->result(); + + } + function departmentwise($sid='') + { + $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 account_code = ?"; + $query = $this->db->query($sql,array($sid)); + //print_r($this->db->last_query()); + return $query->result(); + + } + function yearmonthwise($sid='') + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.description,tinc.towhom,tinc.account_code,ac.name FROM t_income_expense tinc + join t_accountcode ac on ac.code=tinc.account_code + WHERE monthname(date) = ? group by account_code"; + $query = $this->db->query($sql,array($sid)); + //print_r($this->db->last_query()); + return $query->result(); + + } + //for dashboard graph in cashbook// + function gettoptotal(){ + $i=1; + + while($i<=12){ + $sql="SELECT sum(total) as tot FROM t_income_expense where month(date)= $i"; + // $sql="SELECT sum(total)as ttl,concat(sum(total),'-',account_code)as atotal FROM t_income_expense where month(date)= $i + // group by account_code order by ttl desc limit 4"; + + $query = $this->db->query($sql); + //print_r($this->db->last_query()); + //return $query->result(); + $array_result[]=$query->result(); + $i++; + + } + + return $array_result; + +} +function INRSymbol() + { + $sql='select FontCode2000 from T_Currency_Details where Currency_Code="INR"'; + $query=$this->db->query($sql); + return $query->result(); + } + function today() + { + $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,tinc.description,tinc.account_code,tac.name FROM t_income_expense tinc + LEFT JOIN t_accountcode tac ON tac.code = tinc.account_code + WHERE DATE(date) = CURRENT_DATE"; + $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"; + $query = $this->db->query($sql); + //print_r($this->db->last_query()); + return $query->result(); + + } function totalcapitalpo () { @@ -862,27 +1070,6 @@ function totalcapitalpo () $query = $this->db->query($sql); return $query->result(); } - - - - - - - function report_cum_day($sup=null,$mat=null){ - - $sql="SELECT sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal -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 -where sd.SupplierName is not null and -date(pm.CreatedDate) = current_date() and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' -group by supplier_name,material_name"; - $query = $this->db->query($sql); - return $query->result(); - } } - - ?> \ No newline at end of file diff --git a/application/models/monthlypay_model.php b/application/models/monthlypay_model.php index cec87f4d..c1ddac4c 100755 --- a/application/models/monthlypay_model.php +++ b/application/models/monthlypay_model.php @@ -13,10 +13,11 @@ class monthlypay_model extends CI_Model function monthlyListing($current="") { //echo $current; - $this->db->select('T_Monthly_Pay_Inputs.*,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Payroll.Key'); + $this->db->select('T_Monthly_Pay_Inputs.*,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Payroll.Key,T_Loan_Master.Loan_ID'); $this->db->from('T_Monthly_Pay_Inputs'); $this->db->join('T_Employee_Details','T_Monthly_Pay_Inputs.EmpID=T_Employee_Details.EmpID'); $this->db->join('T_Payroll','T_Monthly_Pay_Inputs.EmpID=T_Payroll.EmpID','left'); + $this->db->join('T_Loan_Master','T_Monthly_Pay_Inputs.EmpID=T_Loan_Master.EmpID','left'); $this->db->where('Month_Year',$current); $query = $this->db->get(); @@ -47,9 +48,10 @@ class monthlypay_model extends CI_Model //echo $current; $current = date_create($current); $current = date_format($current,'Y-m-d'); - $sql = "select T_Emp_Pay_Data.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.DateofJoining,T_Attendance.Days_Worked as Days_worked,T_Attendance.Absent as LOP_Days,T_Attendance.Paid_Leave as Paid_leave,T_Attendance.Total_OTHrs as OT_Hrs_Worked,T_Attendance.NoofDays from T_Emp_Pay_Data + $sql = "select T_Emp_Pay_Data.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.DateofJoining,T_Attendance.Days_Worked as Days_worked,T_Attendance.Absent as LOP_Days,T_Attendance.Paid_Leave as Paid_leave,T_Attendance.Total_OTHrs as OT_Hrs_Worked,T_Attendance.NoofDays,T_Loan_Master.Loan_ID from T_Emp_Pay_Data left join T_Employee_Details on T_Employee_Details.EmpID = T_Emp_Pay_Data.EmpID left join T_Attendance on T_Emp_Pay_Data.EmpID = T_Attendance.EmpID + left join T_Loan_Master on T_Emp_Pay_Data.EmpID = T_Loan_Master.EmpID and T_Loan_Master.is_Active = 1 where T_Employee_Details.DateofJoining <= CURRENT_DATE and month(T_Attendance.Month_Year) = month(?)"; diff --git a/application/models/payroll_model.php b/application/models/payroll_model.php old mode 100644 new mode 100755 index 3b3d0ea3..342665ca --- a/application/models/payroll_model.php +++ b/application/models/payroll_model.php @@ -193,14 +193,6 @@ class Payroll_model extends CI_Model } $query = $this->db->get(); return $query->result(); - } - function getCompanyInfo() - { - $this->db->select('*'); - $this->db->from('T_Company_Details'); - $query = $this->db->get(); - $result = $query->result(); - return $result; } function getReportforBank($bank,$payon) diff --git a/application/views/Report_purchase.php b/application/views/Report_purchase.php old mode 100644 new mode 100755 index 20e714e1..307e88cc --- a/application/views/Report_purchase.php +++ b/application/views/Report_purchase.php @@ -6,6 +6,15 @@ if(!empty($mms)) } ?> + +
+
+ + + +
+ +
+
+ + +
+
+
+ +
+ + + + + +
+
+
+ + +
+
+
+ +
+ + + +
+
+
+ + +
+
+
+ +
+ + + +
+
+
+
+
+ +
+ + + + + + + + +
+ +
+ + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NamePaid ToPaid Type Amount Description
date?>name?>towhom?>type?>total,2,'.','');?>description?>
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/addMontly.php b/application/views/addMontly.php old mode 100644 new mode 100755 diff --git a/application/views/attendance.php b/application/views/attendance.php index 1b44d816..e8d46021 100755 --- a/application/views/attendance.php +++ b/application/views/attendance.php @@ -20,7 +20,6 @@ $datefordropdown = date_format($datefordropdown,'M-Y'); $attendance = array_merge($attendance,$emppay); date_default_timezone_set('Asia/Kolkata'); $currentday = date('d'); - // print_r($attendance); // echo "
------------------------------
"; @@ -364,8 +363,8 @@ $currentday = date('d'); $OT = 'OT'.$col; ?> - title = " " title = "sunday" class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "" contenteditable = "true" tabindex=""> $WH)){echo $a->$WH;} else { echo '';}?> - title = " " title = "sunday" class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "" contenteditable = "true" tabindex=""> $OT)){echo $a->$OT;} else { echo '';}?> + title = " " title = "sunday" class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "" contenteditable = "true" tabindex=""> $WH)){echo $a->$WH;} else { echo ' ';}?> + title = " " title = "sunday" class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "" contenteditable = "true" tabindex=""> $OT)){echo $a->$OT;} else { echo ' ';}?> FontCode2000; + }} + ?> + + + + +
+ + +
+
+
+
+
Department Monthly Payments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NamePaid Type Amount Description
date?>name?>type?>total,2,'.','');?>description?>
+
+
+
+
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookmonthlyexpenses.php b/application/views/cashbookmonthlyexpenses.php new file mode 100644 index 00000000..5fdcc10f --- /dev/null +++ b/application/views/cashbookmonthlyexpenses.php @@ -0,0 +1,138 @@ +FontCode2000; + }} + + +if(!empty($monthlyreport)) +{ + +} +if(!empty($monthlyincreport)) +{ + +} +?> + + + +
+ + +
+
+
+
+
Monthly Payments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatePaid ToPaid Type Amount
date?>name?>type?>total,2,'.','');?>
+
+
+
+
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookmonthmenu.php b/application/views/cashbookmonthmenu.php new file mode 100644 index 00000000..d5675a6d --- /dev/null +++ b/application/views/cashbookmonthmenu.php @@ -0,0 +1,83 @@ +FontCode2000; + }} +?> + +
+
+
+
+

Caskbook - "Monthly Payments"

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatePaid ToPaid Type Amount
date?>name ?>type?>total,2,'.','');?>
+ +
+
+
+
+
+
+ + diff --git a/application/views/cashbooktoday.php b/application/views/cashbooktoday.php new file mode 100644 index 00000000..26ceec68 --- /dev/null +++ b/application/views/cashbooktoday.php @@ -0,0 +1,82 @@ + +FontCode2000; + }} +?> +
+
+
+
+

Caskbook - "Today's Payments"

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DatePaid ToPaid Type Amount Description
date?>name ?>type?>total,2,'.','');?>description?>
+ +
+
+
+
+
+
+ + diff --git a/application/views/cashbookyearlyexpenses.php b/application/views/cashbookyearlyexpenses.php new file mode 100644 index 00000000..f517bbc2 --- /dev/null +++ b/application/views/cashbookyearlyexpenses.php @@ -0,0 +1,121 @@ +FontCode2000; + }} +?> + + + + + +
+
+
+
+
Yearly Payments
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MonthPaid Type Amount
month?>type?>total,2,'.','');?>
+ +
+
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookyearmonthwise.php b/application/views/cashbookyearmonthwise.php new file mode 100644 index 00000000..61b936cf --- /dev/null +++ b/application/views/cashbookyearmonthwise.php @@ -0,0 +1,126 @@ + +FontCode2000; + }} + ?> + + + + +
+
+
+
+
Yearly Payments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateAccount NamePaid Type Amount
date?>name?>type?>total,2,'.','');?>
+
+
+
+
+ + +
+ + + + + + + + + + \ No newline at end of file diff --git a/application/views/editOldmonthly.php b/application/views/editOldmonthly.php old mode 100644 new mode 100755 diff --git a/application/views/editPayslip.php b/application/views/editPayslip.php old mode 100644 new mode 100755 diff --git a/application/views/includes/header.php b/application/views/includes/header.php index 0190e176..b2b3d8de 100644 --- a/application/views/includes/header.php +++ b/application/views/includes/header.php @@ -453,21 +453,28 @@ $(function() { - +
  • + Attendance + +
  • +
  • PaySlip
  • - + + + +
  • + + ReportList + +
  • + +