This commit is contained in:
velz 2018-08-07 14:00:19 +05:30
commit b35914071b
18 changed files with 1958 additions and 52 deletions

View File

@ -176,6 +176,18 @@ $route['deleteSetFeesDetails'] = 'Fees_Status_Controller/deleteSetFeesDetails';
/*update fees details for student*/
$route['updateFeesDetails'] = 'Fees_Status_Controller/updateFeesDetails';
$route['getUniversityCourseForFees'] = 'Fees_Status_Controller/getUniversityCourseForFees';
/*account type*/
$route['getAccounttypes'] = 'DayBook_Controller/getAccounttypes';
$route['addAccountnameDetails'] = 'DayBook_Controller/addAccountnameDetails';
$route['IncomeExpenseDetails'] = 'DayBook_Controller/getIncomeExpenseDetails';
$route['ViewFullIncomeDetails'] = 'DayBook_Controller/ViewFullIncomeDetails';
$route['GetSubTypes'] = 'DayBook_Controller/GetSubTypes';
/*
* get default activity details
* */

View File

@ -30,8 +30,61 @@ class DayBook_Controller extends REST_Controller {
parent::__construct();
// load the university model
$this->load->model('DayBook_model', 'daybook_model');
$this->methods['addAccountnameDetails_get']['limit'] = 500; // 500 requests per hour per user/key
$this->methods['addAccountnameDetails_post']['limit'] = 100; // 100 requests per hour per user/key
$this->methods['addAccountnameDetails_delete']['limit'] = 50; // 50 requests per hour per user/key
$this->load->model('Status_model', 'status_model');
$this->methods['GetSubTypes']['limit'] = 500;
}
public function addAccountnameDetails_post()
{
$now = new DateTime();
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
$details['ListName'] = $this->post('statusName');
$details['ListGroup'] = "10";
$details['CreatedBy'] = $this->post('createdBy');
$details['IsActive'] = $this->post('status');
$details['BranchCode'] = $this->post('branch');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$statusDetails = $this->status_model->addstatus($details);// Check if the users data store contains users (in case the database result returns NULL)
if ($statusDetails)
{
$statusDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($statusDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'Something went wrong.please try again!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
//get income expese type, name details
public function getIncomeExpenseTypeState_post() {
$reqData = $this->post('localReqDetails');
@ -293,5 +346,108 @@ class DayBook_Controller extends REST_Controller {
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
public function getAccounttypes_post()
{
$requestedBy = $this->post('requestedBy');
$requestedBranch = $this->post('requestBranch');
//echo $requestedBy;
$getStatus = $this->daybook_model->getAccounttype($requestedBy,$requestedBranch);
// print_r($getStatus);
// die();
if ($getStatus)
{
$getStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
public function ViewFullIncomeDetails_post()
{
$from = $this->post('from');
$to = $this->post('to');
$incid = 'I002';
$getincomedetails = $this->daybook_model->getIncome_Details($from,$to,$incid);
// print_r($getincomedetails);
// die();
if ($getincomedetails)
{
$getincomedetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getincomedetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
}
public function getIncomeExpenseDetails_post()
{
$from = $this->post('from');
$to = $this->post('to');
$br = $this->post('branch');
// echo $from.'from';
// echo $to.'to';
$getStatus = $this->daybook_model->Income_expense($from,$to,$br);
//print_r($getStatus);
if ($getStatus)
{
$getStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
public function GetSubTypes_post()
{
//echo 'in';
$getsubtypes = $this->daybook_model->Income_expenseSubtype();
// print_r($getsubtypes);
// die();
if($getsubtypes)
{
$getsubtypes['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getsubtypes, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}
}

View File

@ -309,7 +309,7 @@ class Broadcast_model extends CI_Model {
// $mobile = "91$mobile";
$message = urlencode($msg);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $mobile . "&SenderID=APOLLO&Message=" . $message . "&ServiceName=PROMOTIONAL_HIGH");
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $mobile . "&SenderID=APODEC&Message=" . $message . "&ServiceName=PROMOTIONAL_HIGH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$output = curl_exec($ch);
curl_close($ch);
@ -333,7 +333,7 @@ class Broadcast_model extends CI_Model {
// $mobile = "91$mobile";
$message = urlencode($msg);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $mobile . "&SenderID=APOLLO&Message=" . $message . "&ServiceName=PROMOTIONAL_HIGH");
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $mobile . "&SenderID=APODEC&Message=" . $message . "&ServiceName=PROMOTIONAL_HIGH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$output = curl_exec($ch);
curl_close($ch);

View File

@ -626,4 +626,131 @@ class DayBook_model extends CI_Model
$results['dayBookListDetails'] = $dayBookDetailsList;
return $results;
}
public function getAccounttype($requestedBy,$requestedBranch)
{
$this->db->select('ListCode,ListName,IsActive');
$this->db->where('ListGroup','10');
//$this->db->where('BranchCode', $reqBranch);
$this->db->order_by('ListCode','DESC');
$statusDetails = $this->db->get(PICK_LIST_DETAILS);
if($statusDetails->result()){
$result['Status'] = true;
$result['details'] = $statusDetails->result();
}
else {
$result['Status'] = false;
$result['message'] = "No records found!";
}
return $result;
}
public function Income_expense($from,$to,$br)
{
// echo $from.'ff';
// echo $to.'to';
$incomecode='I002';
$expensecode='I001';
$fromd= date("Y-m-d",strtotime($from));
$tod=date("Y-m-d",strtotime($to));
// echo $fromd;
// echo $tod;
// die();
$subQuery= 'SELECT
DISTINCT(p.Name) AS TID,ListName,
SUM(IF(p.Name=?,Amount,0)) AS Income,
SUM(IF(p.Name=?,Amount,0)) AS Expense,
SUM( CASE Name
WHEN ? THEN Amount
WHEN ? THEN Amount
END) AS Total
FROM
T_DayBookMaster AS p
join T_PickListDetails on T_PickListDetails.ListCode = p.name
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? or p.Name=?)
GROUP BY p.`Name`';
$query = $this->db->query($subQuery,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002'));
$expense = $query->result();
if(count($query)>0)
{
$results['expense_data'] = $expense;
}
//print_r( $this->db->last_query());
return $results;
}
public function getIncome_Details($from,$to,$incid)
{
$fromd= date("Y-m-d",strtotime($from));
$tod=date("Y-m-d",strtotime($to));
$expid = 'I001';
// $subQuery = 'select Name,T_DayBookMaster.ID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,SUM(Amount) as Tot_Amount,T_Income_Outcome_Master.ID as SID,T_Income_Outcome_Master.TypeName as Type,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster left join T_Income_Outcome_Master on
// T_Income_Outcome_Master.ID = T_DayBookMaster.Type
// join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID
// where Name in (?,?) and str_to_date(date,?)>=? and str_to_date(date,?)<=? group by ListName';
// $query = $this->db->query($subQuery,array($incid,$expid,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod));
$subQuery='select Name,sum(Amount) as Total,T_DayBookMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster
left join T_Income_Outcome_Master on T_Income_Outcome_Master.ID = T_DayBookMaster.Type
join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID
where str_to_date(date,?)>=? and str_to_date(date,?)<=? group by Type,Name';
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod));
//print_r( $this->db->last_query());
// die();
$expense = $query->result();
// print_r($expense);
if(count($query)>0)
{
$results['fullexpense_detail'] = $expense;
}
return $results;
//return $query->result_array();
}
public function Income_expenseSubtype()
{
$this->db->select('ListCode,ListName,IsActive');
$this->db->where('ListGroup','10');
$this->db->order_by('ListCode','DESC');
$statusDetails = $this->db->get(PICK_LIST_DETAILS);
if($statusDetails->result()){
$result['Status'] = true;
$result['details'] = $statusDetails->result();
}
else {
$result['Status'] = false;
$result['message'] = "No records found!";
}
return $result;
}
}

View File

@ -482,6 +482,7 @@ class Fees_status_model extends CI_Model
}
$this->db->select('BillNO');
$this->db->where('UpdatedBy', $feesPaidDetails['UpdatedBy']);
$this->db->order_by('BillNO', 'asc');
$getLastBillNo=$this->db->get(STUDENTS_FEES_PAID)->last_row();
if($getLastBillNo){
$strExplode= explode("-", $getLastBillNo->BillNO);

View File

@ -75,7 +75,8 @@
"SESSIONMASTER":"SESSION DETAILS",
"SESSIONSCHEDULE": "SESSION SCHEDULE",
"HALLTICKET": "GENERATE HALLTICKET",
"REREGISTRATION":"RE REGISTRATION"
"REREGISTRATION":"RE REGISTRATION",
"ACCOUNTTYPE":"ACCOUNT TYPE"
},
"report": {
"TITLE": "REPORTS",
@ -136,7 +137,8 @@
"DAYBOOK": "DAY BOOK ",
"APPROVAL": "APPROVE EXPENSE",
"DAYBOOKDETAILS": "DAYBOOK DETAILS",
"DAYBOOKAPPROVAL": "DAYBOOK APPROVAL"
"DAYBOOKAPPROVAL": "DAYBOOK APPROVAL",
"INCOMEEXPENSEREPORT" : "PROFIT-LOSS STATEMENT"
},
"mydetails": {
"MAIN": "MY DETAILS"

View File

@ -122,6 +122,22 @@ app.constant('JS_REQUIRES', {
* */
'statusCtrl': 'assets/js/controllers/statusCtrl.js',
/*
* status
* */
'incomeCtrl': 'assets/js/controllers/incomeCtrl.js',
/*
* */
'income_reportCtrl': 'assets/js/controllers/income_reportCtrl.js',
/*
* student status updation
* */
'studyMaterialStatusCtrl': 'assets/js/controllers/studyMaterialStatusCtrl.js',

View File

@ -154,6 +154,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
label: 'Course'
},
// resolve: loadSequence('iconsCtrl')
}).state('app.master.accounttype', {
url: '/accounttype',
templateUrl: "assets/views/add_income_expense.html",
resolve: loadSequence('incomeCtrl','ngTable', 'ladda', 'angular-ladda'),
title: 'income_expense',
ncyBreadcrumb: {
label: 'income_expense'
},
}).state('app.master.status', {
url: '/status',
templateUrl: "assets/views/status.html",
@ -162,6 +170,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
ncyBreadcrumb: {
label: 'Status'
},
}).state('app.daybooksuperadmin.incomeexpensereport', {
url: '/incomeexpensereport',
templateUrl: "assets/views/income_expense_report.html",
resolve: loadSequence('income_reportCtrl','ngTable', 'ladda', 'angular-ladda'),
title: 'IncomeExpense',
ncyBreadcrumb: {
label: 'income_expense'
},
}).state('app.master.studentStatusUpdate', {
url: '/default activity',
templateUrl: "assets/views/studentStatusUpdate.html",

View File

@ -315,7 +315,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){
if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate < new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){
$scope.sessionDetails.push({
"SessionName":svalues.SessionName,
"SessionID":svalues.SessionID,
@ -360,7 +360,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
"SessionID":svalues.SessionID,
});
if($scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){
if($scope.ExistSessionDate < new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){
$scope.sessionDetailsTo.push({
@ -394,7 +394,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){
if((svalues.IsActive=='1' || $scope.feesStructureInfo[0].SessionName==svalues.SessionID) && $scope.ExistSessionDate < new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){
$scope.sessionDetails.push({
"SessionName":svalues.SessionName ,
"SessionID":svalues.SessionID,
@ -457,7 +457,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
"SessionID":svalues.SessionID,
});
if($scope.ExistSessionDate <= new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){
if($scope.ExistSessionDate < new Date(svalues.SessionDate.substring(6,10)+'-'+svalues.SessionDate.substring(3,5)+'-'+svalues.SessionDate.substring(0,2))){
$scope.sessionDetailsTo.push({
@ -2222,7 +2222,7 @@ app.controller('ModalDemoCtrl', ["$scope", "$modal", "$log", function ($scope, $
// Please note that $modalInstance represents a modal window (instance) dependency.
// It is not the same as the $modal service used above.
app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) {
app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "$timeout", "items","WordsService", function ($scope, $modalInstance, $timeout, items,WordsService) {
$scope.items = items;
$scope.selected = {
@ -2237,6 +2237,7 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
//show hide function for pdf design
$scope.billNo="";
$scope.receiptNo="";
@ -2250,7 +2251,13 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo
$scope.BranchAddr = "";
$scope.BranchLogo = "";
$scope.FeesReceiptTitle = "";
$scope.ShowHide = function (pdfValue) {
$scope.myPdfView = '';
$scope.ShowHide = function (pdfValue,print) {
$timeout(()=> {
//alert(this.print);
$scope.printPdf(print);
}, 0);
$scope.myPdfView = pdfValue;
$scope.showButton = true;
$scope.billNo = pdfValue.BillNO;
$scope.paymentType=pdfValue.ModeOfPayment;
@ -2264,32 +2271,46 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "items","Wo
$scope.FeesReceiptTitle = pdfValue.FeesReceiptTitle;
$scope.receiptNo=pdfValue.ReceiptNo;
}
$scope.pdfPrint = function (pdf) {
//PDF print
var innerContents = document.getElementById(pdf).innerHTML;
var popupWinindow = window.open('', '_blank', 'width=600,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no');
//testing for print
$scope.printPdf = function (print) {
var innerContents = document.getElementById(print).innerHTML;
var popupWinindow = window.open('', '_blank', 'width=1200,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no');
popupWinindow.document.open();
popupWinindow.document.write('<html><head></head><body onload="window.print()">' + innerContents + '</html>');
popupWinindow.document.write('<html>');
popupWinindow.document.write('<style type="text/css">');
popupWinindow.document.write('.title{border:3px solid black;}');
popupWinindow.document.write('</style>');
popupWinindow.document.write(innerContents);
popupWinindow.document.write('</html>');
popupWinindow.document.close();
popupWinindow.focus();
popupWinindow.print();
popupWinindow.close();
}
$scope.mouseLeave = function(){
$scope.showButton = false;
$scope.billNo="";
$scope.sessionName="";
$scope.paymentType="";
$scope.billDate="";
$scope.amountInWords = "";
$scope.billAmount = "";
$scope.branchName = "";
$scope.ReceivedBy="";
$scope.BranchAddr = "";
$scope.BranchLogo = "";
$scope.FeesReceiptTitle="";
$scope.receiptNo="";
}
// $scope.mouseLeave = function(){
// $scope.showButton = false;
// $scope.billNo="";
// $scope.sessionName="";
// $scope.paymentType="";
// $scope.billDate="";
// $scope.amountInWords = "";
// $scope.billAmount = "";
// $scope.branchName = "";
// $scope.ReceivedBy="";
// $scope.BranchAddr = "";
// $scope.BranchLogo = "";
// $scope.FeesReceiptTitle="";
// $scope.receiptNo="";
// }
}]);
app.directive('visible', function() {

View File

@ -0,0 +1,269 @@
'use strict';
/**
* controllers for ng-table
* Simple table with sorting and filtering on AngularJS
*/
// var helloApp = angular.module("helloApp", []);
app.controller("incomeCtrl", ["$scope", "toaster", "$filter", "API_POINTS", "$localStorage", "$http", "$state", 'ipCookie', function ($scope, toaster, $filter, apiPoint, $localStorage, $http, $state, ipCookie) {
$scope.myModel = {
"StatusName": "",
"switchsetting": true
};
// get local client details
var localDetail = JSON.parse(localStorage.getItem('localObj'));
var localDetails = ipCookie('cookiechk');
$scope.initHead = function() {
// alert();
const LOCALTYPE = localDetail.localType;
if (localDetail != null && (LOCALTYPE == 'R003' || LOCALTYPE == 'R004' )) {
}else {
if(localDetail != null) {
$state.go('app.dashboard');
} else {
ipCookie.remove('cookiechk');
$window.localStorage.clear();
$state.go('login.signin');
}
}
}
/*
* edit status details
* created by Surendiran
* */
$scope.editId = -1;
$scope.setEditId = function (pid) {
$scope.editId = pid;
$scope.viewId = -1;
};
/*
* cancel edit div
* created by Surendiran
* */
$scope.cancel = function () {
$scope.init();
$scope.editId = -1;
};
// sorting function for table params
$scope.sort = function (keyname) {
$scope.sortKey = keyname; //set the sortKey to the param passed
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
}
$scope.statusForm = {
submit: function (form, myModel, loading) {
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
for (field in form) {
if (field[0] != '$') {
if (firstError === null && !form[field].$valid) {
firstError = form[field].$name;
}
if (form[field].$pristine) {
form[field].$dirty = true;
}
}
}
angular.element('.ng-invalid[name=' + firstError + ']').focus();
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
} else {
$scope.ldloading1 = {};
$scope.ldloading1[loading.replace('-', '_')] = true;
var addstatus = {
method: 'POST',
url: apiPoint.url + 'addAccountnameDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
statusName: myModel.StatusName,
status: myModel.switchsetting,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branch : localDetail.localBranchID
}
};
$http(addstatus).then(function (response) {
if (response.data.status == 200 && response.data.Status) {
$scope.ldloading1[loading.replace('-', '_')] = false;
$scope.init();
swal(" ", "Status added successfully.", "success");
$state.go($state.current, {}, { reload: true });
} else {
$scope.ldloading1[loading.replace('-', '_')] = false;
swal("", response.data.message, "error");
}
});
}
},
reset: function (form) {
$scope.myModel = angular.copy($scope.master);
form.$setPristine(true);
$scope.myModel = {
"StatusName": "",
"switchsetting": true
};
}
};
/*
*get status details when page loading called from view file
*
*
* created by Surendiran
* */
$scope.loader = '';
$scope.emptyData = '';
$scope.init = function () {
var getStatus = {
method: 'POST',
url: apiPoint.url + 'getAccounttypes/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestBranch: localDetail.localBranchID,
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(getStatus).then(function (response) {
if (response.data.status == 200 && response.data.Status) {
// console.log(response.data.details);
$scope.emptyData = true;
$scope.loader = true;
$scope.statusInfo = response.data.details;
//console.log($scope.statusInfo);
} else {
$scope.emptyData = false;
$scope.loader = true;
$scope.statusInfo = '';
}
});
// var getBranchList = {
// method: 'POST',
// url: apiPoint.url + 'getBranchListStatusUpdate/',
// headers: {
// 'Content-Type': 'application/json'
// },
// data: {
// requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
// }
// };
// $http(getBranchList).then(function (response) {
// if (response.data.branchListStatus == true) {
// $scope.branchList = response.data.branch_list_details;
// } else {
// $scope.branchListMessage = response.data.message;
// }
// });
};
/*
* update the status details
* created by Surendiran
* */
$scope.updatestatus = function (myModel, form, loading) {
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
for (field in form) {
if (field[0] != '$') {
if (firstError === null && !form[field].$valid) {
firstError = form[field].$stop_name;
}
if (form[field].$pristine) {
form[field].$dirty = true;
}
}
}
angular.element('.ng-invalid[name=' + firstError + ']').focus();
} else {
$scope.ldloading = {};
$scope.ldloading[loading.replace('-', '_')] = true;
var update = {
method: 'POST',
url: apiPoint.url + 'updateStatusDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
ListCode: myModel.ListCode,
ListName: myModel.ListName,
status: myModel.IsActive,
requestBranch: localDetail.localBranchID,
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(update).then(function (response) {
if (response.data.Status) {
$scope.ldloading[loading.replace('-', '_')] = false;
swal("", "Updated Successfully", "success");
$scope.editId = -1;
$scope.init();
} else {
$scope.ldloading[loading.replace('-', '_')] = false;
$scope.init();
swal("", response.data.message, "error");
}
});
}
};
$scope.localBranchDetails = '';
$scope.selectBranch = function(branchCode) {
// alert(branchCode);
var getBranchStatusList = {
method: 'POST',
url: apiPoint.url + 'getBranchStatusList/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy: localDetail,
branchCode: branchCode
}
};
$http(getBranchStatusList).then(function (response) {
if (response.data.branchListStatus == true) {
$scope.branchList = response.data.branch_list_details;
} else {
$scope.branchListMessage = response.data.message;
}
});
}
}]);

View File

@ -0,0 +1,506 @@
'use strict';
/*** controller***/
app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state","$modal","$log",
function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,$modal,$log){
//function ($scope, apiPoint, $http, SweetAlert, $state,$modal, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options
$scope.filters = {
"from_date": "",
"to_date": "",
};
// $scope.filters = function () {
// var filterlist = {
// method: 'POST',
// url: apiPoint.url + 'report_filters/',
// headers: {
// 'Content-Type': 'application/json'
// },
// data: {
// branch : JSON.parse(localStorage.getItem('localObj')).localBranchID
// }
// };
// $http(filterlist).then(function (response) {
// if (response.data) {
// $scope.batch=[];
// $scope.batchlist = response.data.batch;
// $scope.university = response.data.university;
// //Desc order Batchlist
// angular.forEach($scope.batchlist,function (values,key) {
// var parts = values.BatchDate.split("-");
// $scope.batch.push({
// // "batchcode":values.batchcode,
// // "batch":values.batch + '('+ values.batchcode + ')',
// "BatchDate":values.BatchDate,
// "givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
// })
// });
// // call service for make a list in desc order based on date
// $scope.batch=dateListDescService.getOrderByList($scope.batch);
// //console.log($scope.branch);
// } else {
// }
// });
// }
$scope.onSubmit = function () {
//alert($scope.batch.name);
$scope.expense_data = '';
$scope.message = '';
$scope.incomedetail = '';
$scope.Subtypes = '';
$scope.Total_expense = '';
$scope.Total_income = '';
$scope.load = '';
$scope.isLoaderShow = '';
$scope.fromda = '';
$scope.toda ='';
var response_data = {
method: 'POST',
url: apiPoint.url + 'IncomeExpenseDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
from : $scope.filters.from_date,
to : $scope.filters.to_date
}
};
$http(response_data).then(function (response) {
//console.log(response.data);
if (response.data.status == '200')
{
$scope.expense_data = response.data.expense_data;
if($scope.expense_data.length>0)
{
$scope.isLoaderShow =false;
$scope.load = 'Loading....';
}
else
{
$scope.isLoaderShow = true;
$scope.load = "No Records Found";
}
console.log($scope.expense_data);
if(($scope.expense_data.length)==2)
{
if($scope.expense_data[0].Total == 'undefined' || $scope.expense_data[0].Total == null)
{
$scope.Total_expense=0;
}
else
{
$scope.Total_expense = $scope.expense_data[0].Total;
}
if($scope.expense_data[1].Total == 'undefined' || $scope.expense_data[1].Total == null)
{
$scope.Total_income=0;
}
else
{
$scope.Total_income = $scope.expense_data[1].Total;
}
}
else
{
if($scope.expense_data[0].TID == 'I002')
{
$scope.Total_income = $scope.expense_data[0].Total;
$scope.Total_expense = 0;
}
else
{
$scope.Total_expense = $scope.expense_data[0].Total;
$scope.Total_income = 0;
}
}
$scope.Net_Total = $scope.Total_income -$scope.Total_expense;
}
else {
$scope.message = response.data.message;
}
});
var income_data = {
method: 'POST',
url: apiPoint.url + 'ViewFullIncomeDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
from : $scope.filters.from_date,
to : $scope.filters.to_date
}
};
$http(income_data).then(function (response) {
//console.log(response.data);
if (response.data.status == '200')
{
$scope.incomedetail = response.data;
$scope.fullincomedetail = response.data.fullexpense_detail;
console.log($scope.fullincomedetail);
}
else
{
$scope.message = response.data.message;
}
});
var getsubdivision = {
method: 'POST',
url: apiPoint.url + 'GetSubTypes/',
headers: {
'Content-Type': 'application/json'
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
from : $scope.filters.from_date,
to : $scope.filters.to_date
}
};
$http(getsubdivision).then(function (response) {
// console.log(response.data);
if (response.data.status == '200')
{
$scope.Subtypes = response.data.details;
// console.log($scope.Subtypes);
}
else
{
$scope.message = response.data.message;
}
});
}
var mystyle = {
sheetid: 'EXPENSE REPORT',
headers: true,
caption: {
title:'EXPENSE REPORT',
width: '300px',
style:'font-size:50px;'
},
// style:'background:#00FF00',
column: {
style:'font-size:10px'
},
};
$scope.exportData = function ()
{
//alert()
angular.forEach(($scope.fullincomedetail),function(fullincomedetail,key)
{
//console.log($scope.fullincomedetail[key].TypeName);
if($scope.fullincomedetail[key].Name == 'I001')
{
$scope.fullincomedetail[key]['Type'] = 'Expense';
}
else if($scope.fullincomedetail[key].Name == 'I002')
{
$scope.fullincomedetail[key]['Type'] = 'Income';
}
//console.log($scope.fullincomedetail);
// alasql('SELECT Type,ListName,TypeName,Date,Amount INTO XLS("Income_Expense_report.xls",?) FROM ?',[mystyle,$scope.fullincomedetail]);
});
//console.log($scope.fullincomedetail);
alasql('SELECT Type,ListName,TypeName,Date,Amount INTO XLS("Income Expense report.xls",?) FROM ?',[mystyle,$scope.fullincomedetail]);
};
$scope.OpenWindowStatus = false;
$scope.editId = -1;
$scope.setEditId = function (P)
{
//alert(P);
$scope.editId = P;
}
$scope.close = function ()
{
$scope.editId = -1;
}
$scope.fdate ='';
$scope.tdate ='';
//$scope.Subtypes = '';
$scope.changeSem = function()
{
$scope.open($scope.fullincomedetail,$scope.expense_data,$scope.Subtypes);
}
var fm_date= '';
var Total_inc = 0;
var Total_exp = 0;
$scope.open = function(incomeexpensedetails,incomeexpenselist,Subtypes)
{
//Total_inc === incomeexpenselist[1].Total
if(incomeexpenselist[0] == 'undefined' || incomeexpenselist[0] == null)
{
Total_exp=0;
}
else
{
Total_exp = incomeexpenselist[0].Total;
}
if(incomeexpenselist[1] == 'undefined' || incomeexpenselist[1] == null)
{
Total_inc=0;
}
else
{
Total_inc = incomeexpenselist[1].Total;
}
//console.log(incomeexpenselist[1]);
//
var formate = "dd-MM-yyyy";
$scope.fdate = $filter('date')(new Date($scope.filters.from_date), formate);
$scope.tdate = $filter('date')(new Date($scope.filters.to_date), formate);
// fm_date = $scope.fdate;
// console.log(fm_date);
incomeexpensedetails['fdate'] = $scope.fdate;
incomeexpensedetails['tdate'] = $scope.tdate;
// console.log(incomeexpensedetails);
// console.log(Subtypes);
$rootScope.income_expendelist = incomeexpenselist;
$rootScope.income_expensedetails = incomeexpensedetails;
$rootScope.listdetails = Subtypes;
$rootScope.fdate = $scope.fdate;
$rootScope.tdate = $scope.tdate
$rootScope.net_totalamount = $scope.Net_Total;
//$rootScope.sum = incomeexpenselist[1].Total - incomeexpenselist[0].Total;
$rootScope.sum = Total_inc -Total_exp;
//console.log($rootScope.sum);
//console.log($rootScope.listdetails);
var modalInstance = $modal.open({
templateUrl: 'assets/views/income_expense_report_pdf.html',
controller: 'income_reportCtrl',
// size: size,
resolve: {
pdfitems: function () {
//return $scope.FeesName;
return incomeexpensedetails;
}
}
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
$log.info('Modal dismissed at: ' + new Date());
});
};
$scope.generatePDF = function()
{
// kendo.drawing.drawDOM($("#income_expensepdf")).then(function(group) {
// kendo.drawing.pdf.saveAs(group, "income_expensepdf"+".pdf");
kendo.drawing.drawDOM($("#income_expensepdf"),
{ paperSize: "A4",
margin:"1cm"} ).then(function(group) {
kendo.drawing.pdf.saveAs(group, "profit-loss statement"+".pdf");
});
}
// alert('in');
// //console.log($scope.income_expensedetails.fdate);
// // return false;
// var doc = new jsPDF('A4');
// var canvas = document.createElement("canvas");
// canvas.width = 100;
// canvas.height = 100;
// var ctx = canvas.getContext("2d");
// doc.line(10,240,200,240);
// doc.setFontSize(20);
// doc.text(70,32,"Apollo Distance Education");
// doc.setFontSize(15);
// doc.text(85,40,"Profit and Loss Report");
// doc.setFontSize(12);
// doc.text(83,48,"From "+$scope.income_expensedetails.fdate+" to "+$scope.income_expensedetails.tdate );
// doc.setFontSize(10);
// // doc.text(11,55,"Income");
// var TypeName= '';
// var row=15;
// var column=60;
// var columnam='';
// var rowam=60;
// doc.rect(10, 10, 190, 280);
// var col = 45;
// // var elem = document.getElementById('myCanvas');
// // var two = new Two({
// // type: Two.Types.canvas,
// // fullscreen: true
// // }).appendTo(elem);
// // two.update();
// var line = two.makeLine(450, 140, 900, 140);
// line.linewidth = 5;
// line.stroke = "blue";
// // doc.rect(col,57,5,5);
// //console.log(JSON.parse($scope.income_expensedetails).length);return false;
// angular.forEach(($scope.income_expensedetails),function(income_expensedetails,key)
// {
// //console.log(income_expensedetails.TypeName);
// TypeName = income_expensedetails.TypeName;
// //console.log(income_expensedetails.Amount);
// row= row+10;
// // column= column+10;
// rowam=rowam+10;
// columnam = columnam+10;
// if(income_expensedetails.Name == 'I002')
// {
// doc.setFontSize(11);
// doc.text(11,55,"Income");
// doc.setFontSize(8);
// column= column+15;
// console.log(income_expensedetails.TypeName)
// doc.text(row,column,income_expensedetails.TypeName);
// doc.text(rowam,column,income_expensedetails.Amount);
// }
// });
// angular.forEach(($scope.income_expensedetails),function(income_expensedetails,key)
// {
// //console.log(income_expensedetails.TypeName);
// TypeName = income_expensedetails.TypeName;
// //console.log(income_expensedetails.Amount);
// row= row+10;
// // column= column+10;
// rowam=rowam+10;
// columnam = columnam+10;
// if(income_expensedetails.Name == 'I001')
// {
// doc.setFontSize(10);
// doc.text(11,105,"Expense");
// doc.setFontSize(8);
// column= column+15;
// console.log(income_expensedetails.TypeName)
// doc.text(row,column,income_expensedetails.TypeName);
// doc.text(rowam,column,income_expensedetails.Amount);
// }
// });
// doc.save('sample.pdf');
}]);

View File

@ -0,0 +1,96 @@
<style>
b.fa {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px #007AFF;
padding: 0.5em 0.6em;
}
</style>
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle" translate="ACCOUNT TYPE"></h1>
<span class="mainDescription">Add New Income Expense Types. </span>
</div>
<div ncy-breadcrumb></div>
</div>
</section>
<div class="container-fluid container-fullw bg-white">
<div ng-controller="incomeCtrl" ng-init="initHead()">
<tabset class="tabbable">
<tab heading="Add " id="statuAddNew">
<form name="Form" id="form" novalidate ng-submit="statusForm.submit(Form, myModel, 'zoom-in')" method="post">
<fieldset>
<legend>Add New</legend>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':Form.StatusName.$dirty && Form.StatusName.$invalid, 'has-success':Form.StatusName.$valid}">
<label>
Account Name <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Status Name" tabindex="1" class="form-control" name="StatusName" ng-model="myModel.StatusName"
ng-pattern="/^[a-zA-Z0-9.\s]*$/" capitalize required/>
<span class="error text-small block" ng-if="Form.StatusName.$dirty && Form.StatusName.$error.required">Account Name is required</span>
<span class="error text-small block" ng-if="Form.StatusName.$dirty && Form.StatusName.$error.pattern">Invalid Account Name </span>
</div>
<div class="col-md-2" style="padding-top: 2.3%;">
<div class="pull-right">
<button type="submit" ladda="ldloading1.zoom_in" tabindex="2" class="btn btn-wide btn-success" data-style="zoom-in">
Add
</button>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</form>
<div class="row">
<div class="col-md-3">
<script>
$(function () {
$("#search").focus();
});
</script>
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="5" placeholder="Search" /><br><br>
</div>
</div>
<table class="table table-hover" ng-init="init();">
<thead>
<tr>
<th ng-click="sort('ListCode')">Status ID
<span class="glyphicon sort-icon" ng-show="sortKey=='ListCode'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"> </span>
</th>
<th ng-click="sort('ListName')">Status Name
<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"> </span>
</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<!-- {{statusInfo}} -->
<tbody dir-paginate="p in statusInfo|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
<tr>
<td>{{p.ListCode}}</td>
<td>{{p.ListName}}</td>
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">In-Active</span></td>
<td>
<a class="text-azure" id="editRowBtn{{p.ListCode}}" ng-click="setEditId(p.ListCode);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
</a>
</td>
</tr>
<tr ng-show="editId === p.ListCode" ng-if="editId === p.ListCode">
<td colspan="12" ng-include src="'assets/views/editStatusDetails.html'"></td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</tab>
</tabset>
</div>
</div>

View File

@ -54,10 +54,11 @@
<div class="col-md-3 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
<label for="form-field-select-2">
Income/Expense
</label>
</label>
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="showTheRefValue" ng-change="showTheResType(showTheRefValue)"
required>
<option value="" selected>Select</option>
<option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option>
</select>
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>

View File

@ -232,13 +232,28 @@
<label for="form-field-select-2">
Type <span class="symbol required"></span>
</label>
{{typeItem}}
<!-- <select class="form-control" ng-init="getType(p.Name)" tabindex="1" class="cs-select cs-skin-elastic" name="editType" ng-model="myModel.type" required>
<select class="form-control" ng-init="getType(p.Name)" tabindex="1" class="cs-select cs-skin-elastic" name="editType" ng-model="myModel.type"
required>
<option value="" disabled selected>Select Type</option>
<option ng-repeat="typeItem in getTypes" ng-selected="typeItem.ID == p.Type" value="{{typeItem.ID}}">{{typeItem.TypeName}}</option>
</select> -->
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="myModelAdd.type" required>
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" ng-selected="typeItem.ID == p.Type" value="{{typeItem.ID}}" value="{{incexpType.ID}}">{{incexpType.TypeName}}</option>
</optgroup>
<!-- <option value="" disabled selected>Select Type</option>
<option ng-repeat="typeItem in getTypes" value="{{typeItem.ID}}">{{typeItem.TypeName}}</option> -->
</select>
<span class="error text-small block" ng-if="Form.editType.$dirty && Form.editType.$error.required">Type is Required</span>
<span class="error text-small block" ng-if="Form.editType.$dirty && Form.editType.$error.required">Type is Required</span>
</div>
<div class="col-md-4" ng-class="{'has-error':Form.editAmount.$dirty && Form.editAmount.$invalid, 'has-success':Form.editAmount.$valid}">
@ -313,6 +328,7 @@
<span class="error text-small block" ng-if="Form.addDate.$error.maxlength">Enter a Valid Date </span>
</div>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':Form.addName.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
<label for="form-field-select-2">
Income/Expense <span class="symbol required"></span>
@ -321,10 +337,14 @@
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="myModelAdd.name" ng-change="getType(myModelAdd.name)"
required>
<option value="" disabled selected>Select</option>
<option ng-repeat="typeName in incomeExpenseName" value="{{typeName.ListCode}}">{{typeName.ListName}}</option>
<!-- <option ng-repeat="typeName in incomeExpenseName" value="{{typeName.ListCode}}">{{typeName.ListName}}</option> -->
<option value="I001">EXPENSE</option>
<option value="I002">INCOME</option>
</select>
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
</div>
</div>
<div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':Form.voucherNumber.$dirty && Form.voucherNumber.$invalid , 'has-success':Form.voucherNumber.$valid}">
@ -359,17 +379,25 @@
</div>
<div class="row">
<div class="col-md-4" ng-class="{'has-error':Form.addType.$dirty && Form.addType.$invalid, 'has-success':Form.addType.$valid}">
<label for="form-field-select-2">
Type <span class="symbol required"></span>
</label>
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="myModelAdd.type" required>
<option value="" disabled selected>Select Type</option>
<option ng-repeat="typeItem in getTypes" value="{{typeItem.ID}}">{{typeItem.TypeName}}</option>
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}">{{incexpType.TypeName}}</option>
</optgroup>
<!-- <option value="" disabled selected>Select Type</option>
<option ng-repeat="typeItem in getTypes" value="{{typeItem.ID}}">{{typeItem.TypeName}}</option> -->
</select>
<span class="error text-small block" ng-if="Form.addType.$dirty && Form.addType.$error.required">Type is Required</span>
</div>
<div class="col-md-4" ng-class="{'has-error':Form.addAmount.$dirty && Form.addAmount.$invalid, 'has-success':Form.addAmount.$valid}">
<label>
Amount <span class="symbol required"></span>

View File

@ -0,0 +1,308 @@
<style type="text/css">
.pad {
background-color: #eee;
padding: 4px;
}
.fif {
/* background-color: #ddd;*/
display: inline-block;
margin: 0 175px 0 0;
padding: 8px 8px;
text-align: left;
width: 200px;
}
.right {
/* background-color: #ddd;*/
display: inline-block;
/*margin: 0 25px 0 0;*/
padding: 1px 1px;
text-align: right;
}
.rightac {
/* background-color: #ddd;*/
display: inline-block;
margin: 0 175px 0 0;
padding: 8px 8px;
text-align: left;
width: 200px;
}
.a {
word-spacing: 9cm;
}
</style>
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle">PROFIT LOSS STATEMENT</h1>
</div>
<!-- <div ncy-breadcrumb></div> -->
</div>
</section>
<style>
/* .sort-icon {
font-size: 9px;
margin-left: 5px;
}
th {
cursor: pointer;
} */
</style>
<script type="text/javascript" src="bower_components/ng-table-excel-export/ng-table-excel-export.min.js">
</script>
<div class="container-fluid container-fullw bg-white">
<div ng-controller="income_reportCtrl">
<form name="Form" id="form" novalidate ng-submit="onSubmit()" method="post">
<fieldset>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<!--<pre>{{searchData.date}}</pre>-->
<div data-ng-controller="DatepickerDemoCtrl">
<label>
From Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="filters.from_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-3">
<!--<pre>{{searchData.date}}</pre>-->
<div data-ng-controller="DatepickerDemoCtrl">
<label>
To Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="filters.to_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeToDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-2" style="padding-top: 2.3%;">
<div class="pull-right">
<button type="submit" class="btn btn-success btn-o" tabindex="8">
Submit
</button>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</form>
<!-- <pre>{{statusr | json}}</pre> -->
<div class="row" style="text-align: right;">
<div class="col-md-4">
<!-- <input class="form-control" type="text" ng-model="search" id="searchIn" autofocus tabindex="2" placeholder="Search" /> -->
</div>
<!-- <button class="btn btn-success btn-o" ng-click="exportData()">Export to Excel</button> -->
<button type="button" ladda="ldloading1.zoom_in" tabindex="5" class="btn btn-success btn-o" data-style="zoom-in" ng-click="changeSem(myModel.universityName,myModel.courseName);">Generate PDF</button>
<!-- <button class="btn btn-success" id="print" ng-click="generatePDF();">Print</button></div> -->
</div>
<div>
<div ng-if="isLoaderShow">
<center> <h1>{{load}}</h1> </center>
</div>
<div ng-if="expense_data.length>0">
<!-- hearde start -- >
<!-- header end -->
<!-- Operating Income Part -->
<div class="col-md-12">
<!-- header -->
<div>
<h4 align="center" style="color:black;"><strong>Apollo Distance Education</strong></h4>
<p align="center" style="color: black">Profit and Loss Statement</p>
<br/>
<div class="col-md-12" style="background-color: #D3D3D3;font-size: 15px; height: 40px">
</div>
</div>
<!-- header end -->
<div class="col-md-3"><b>
<label style="color: black; font-size: 15px">Operating Income</label></b>
</div>
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I002'"> -->
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I002' && li.OrgType == 'I002'">
<!-- {{li.ListName }} -->
<div id="test" class="pad">
<div id="a" class="fif">{{li.TypeName}}</div>
<div id="b" class="right">{{li.Total}}</div>
</div>
</div>
<!-- </div> -->
</div>
<!--- operating Income end -->
<!--NON operating Income -->
<div class="col-md-12">
<div class="col-md-3"><b>
<label style="color: black; font-size: 15px">Non Operating Income</label></b>
</div>
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I004' || f.OrgType=='I005' ||f.OrgType=='I006' || f.OrgType=='I003'"> -->
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I002' && (li.OrgType == 'I004' || li.OrgType=='I005' ||li.OrgType=='I006' || li.OrgType=='I003' )">
<!-- {{li.ListName }} -->
<div id="test" class="pad">
<div id="a" class="fif">{{li.TypeName}}</div>
<div id="b" class="right">{{li.Total}}</div>
</div>
</div>
<!-- </div> -->
</div>
<!-- NON operating income end-->
<!--Total -->
<div class="col-md-12">
<div class="col-md-6"><b>
<label style="color: black; font-size: 17px">Total Income</label></b>
</div>
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in expense_data" ng-if="de.TID=='I002'" >
{{de.Total}}
</div>
</div>
<!--Total End -->
<!--- income part completed-->
<!--Expense Part -->
<div class="col-md-12">
<div class="col-md-3"><b>
<label style="color: black; font-size: 15px">Operating Expense</label></b>
</div>
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I001'"> -->
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I001' && li.OrgType == 'I001'">
<!-- {{li.ListName }} -->
<div id="test" class="pad">
<div id="a" class="fif">{{li.TypeName}}</div>
<div id="b" class="right">{{li.Total}}</div>
</div>
</div>
<!-- </div> -->
</div>
<!-- Expense Completed-->
<!-- non operating expense -->
<div class="col-md-12">
<div class="col-md-3"><b>
<label style="color: black; font-size: 15px">Non Operating Expense</label></b>
</div>
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I004' || f.OrgType=='I005' ||f.OrgType=='I006' || f.OrgType =='I003'"> -->
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I001' && (li.OrgType == 'I004' || li.OrgType=='I005' ||li.OrgType=='I006' || li.OrgType=='I003' )">
<!-- {{li.ListName }} -->
<div id="test" class="pad">
<div id="a" class="fif">{{li.TypeName}}</div>
<div id="b" class="right">{{li.Total}}</div>
</div>
</div>
<!-- </div> -->
</div>
<!-- Non operating expense end -->
<!--Total -->
<div class="col-md-12">
<div class="col-md-6"><b>
<label style="color: black; font-size: 17px">Total Expense</label></b>
</div>
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in expense_data" ng-if="de.TID=='I001'" >
{{de.Total}}
</div>
</div>
<!--Total End -->
<!--Net Profit start -->
<div class="col-md-12">
<div class="col-md-6"><b>
<label style="color: black; font-size: 17px">Net Profit/Loss</label></b>
</div>
<div class="col-md-offset-10" style="color: black; font-size: 17px"><b>
<!-- {{expense_data[1].Total - expense_data[0].Total}}
-->
{{Net_Total}}
</b></div>
</div>
<!--Net profit Completed -->
</div>
</div>
<!-- <div ng-if="load=0">
<b><h1 style="color:black;"><center> No Records Found</h1></center></b>
</div> -->
<!-- <dir-pagination-controls direction-links="true" boundary-links="true">
</dir-pagination-controls> -->
</div>
</div>

View File

@ -0,0 +1,220 @@
<style type="text/css">
.pad {
background-color: #eee;
padding: 4px;
}
.fif {
/* background-color: #ddd;*/
display: inline-block;
margin: 0 175px 0 0;
padding: 8px 8px;
text-align: left;
width: 200px;
}
.right {
/* background-color: #ddd;*/
display: inline-block;
/*margin: 0 25px 0 0;*/
padding: 1px 1px;
text-align: right;
}
.rightac {
/* background-color: #ddd;*/
display: inline-block;
margin: 0 175px 0 0;
padding: 8px 8px;
text-align: left;
width: 200px;
}
.a {
word-spacing: 9cm;
}
.b {
line-height: 1.6;
}
</style>
<div class="container-fluid container-fullw bg-white" ng-controller="income_reportCtrl">
<div class="col-md-offset-10 col-md-1">
<button class="btn btn-success" id="print"ng-click="generatePDF();">Print</button></div>
<div id="income_expensepdf">
<h4 align="center" style="color:black;"><strong>Apollo Distance Education</strong></h4>
<p align="center" style="color: black">Profit and Loss Statement</p>
<p align="center" style="color: black">From {{income_expensedetails.fdate}} to {{income_expensedetails.tdate}}</p>
<br/>
<div class="col-md-12" style="background-color: #D3D3D3;font-size: 15px; height: 40px">
<!-- <p class="a" style="background-color: #D3D3D3;font-size: 15px;"><b>Account Amount</b></p> -->
</div>
<!-- Operating Income Part -->
<div class="col-md-12">
<div class="col-md-3"><b>
<label style="color: black; font-size: 12px">Operating Income</label></b>
</div>
<!-- <div ng-repeat="f in income_expensedetails" ng-if="f.OrgType =='I002'"> -->
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I002' && li.OrgType == 'I002'">
<!-- {{li.ListName }} -->
<div id="test" class="pad">
<div id="a" class="fif">{{li.TypeName}}</div>
<div id="b" class="right">{{li.Total}}</div>
</div>
</div>
<!-- </div> -->
</div>
<!--- operating Income end -->
<div class="col-md-12">
<div class="col-md-12"><b>
<label style="color: black; font-size: 12px">Non Operating Income</label></b>
</div>
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I004' || f.OrgType=='I005' ||f.OrgType=='I006' || f.OrgType=='I003'"> -->
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I002' && (li.OrgType == 'I004' || li.OrgType=='I005' ||li.OrgType=='I006' || li.OrgType=='I003')">
<!-- {{li.ListName }} -->
<div id="test" class="pad">
<div id="a" class="fif">{{li.TypeName}}</div>
<div id="b" class="right">{{li.Total}}</div>
</div>
</div>
<!-- </div> -->
</div>
<!--Total -->
<div class="col-md-12">
<div class="col-md-6"><b>
<label style="color: black; font-size: 15px">Total Income</label></b>
</div>
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in income_expendelist" ng-if="de.TID=='I002'" >
{{de.Total}}
</div>
</div>
<!--Total End -->
<!--Expense Part -->
<div class="col-md-12">
<div class="col-md-12"><b>
<label style="color: black; font-size: 12px">Operating Expense</label></b>
</div>
<!-- <div ng-repeat="f in income_expensedetails" ng-if="f.OrgType =='I001'"> -->
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I001' && li.OrgType == 'I001'">
<!-- {{li.ListName }} -->
<div id="test" class="pad">
<div id="a" class="fif">{{li.TypeName}}</div>
<div id="b" class="right">{{li.Total}}</div>
</div>
</div>
<!-- </div> -->
</div>
<!-- Expense Completed-->
<!-- non operating expense -->
<div class="col-md-12">
<div class="col-md-12"><b>
<label style="color: black; font-size: 12px">Non Operating Expense</label></b>
</div>
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I004' || f.OrgType=='I005' ||f.OrgType=='I006' || f.OrgType =='I003'"> -->
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I001' && (li.OrgType == 'I004' || li.OrgType=='I005' ||li.OrgType=='I006' || li.OrgType=='I003' )">
<!-- {{li.ListName }} -->
<div id="test" class="pad">
<div id="a" class="fif">{{li.TypeName}}</div>
<div id="b" class="right">{{li.Total}}</div>
</div>
</div>
<!-- </div> -->
</div>
<!-- Non operating expense end -->
<!--Total -->
<div class="col-md-12">
<div class="col-md-6"><b>
<label style="color: black; font-size: 15px">Total Expense</label></b>
</div>
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in income_expendelist" ng-if="de.TID=='I001'" >
{{de.Total}}
</div>
</div>
<!--Total End -->
<br/>
<br/>
<br/>
<p>
</p>
<p>
</p>
<p>
</p>
<div class="col-md-12">
<div class="col-md-6"><b>
<label style="color: black; font-size: 15px">Net Profit/Loss</label></b>
</div>
<div class="col-md-offset-10" style="color: black; font-size: 15px"><b>
<!-- {{sum}} -->
{{net_totalamount}}
</b></div>
</div>
<!-- {{income_expensedetails}}
--> <div class="col-md-12">
<div class="col-md-3">
<!-- <label style="color: black; font-size: 20">Operating Expense</label> -->
</div>
</div>
<!-- {{listdetails}} -->
<br/>
<br/>
<br/>
<br/>
<div>
</div>
<div></div>
</div>
</div>

View File

@ -76,6 +76,15 @@
<span class="title" translate="sidebar.nav.master.CERTIFICATETYPE"> CERTIFICATETYPE</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.accounttype" ng-click="checkSuperAdmin()">
<span class="title" translate="sidebar.nav.master.ACCOUNTTYPE">Account Type </span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.dayBookMaster" ng-click="checkSuperAdmin()">
<span class="title" translate="sidebar.nav.master.DAYBOOKMASTER"> DAY BOOK DETAILS </span>
@ -283,6 +292,15 @@
<span class="title" translate="sidebar.nav.daybook.DAYBOOKAPPROVAL"> DAY BOOK</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.daybooksuperadmin.incomeexpensereport" ng-click="checkSuperAdmin()">
<span class="title" translate="sidebar.nav.daybook.INCOMEEXPENSEREPORT"> DAY BOOK PROFIT-LOSS STATEMENT</span>
</a>
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.broadCast')}">
@ -726,6 +744,16 @@
<span class="title" translate="sidebar.nav.daybook.DAYBOOKAPPROVAL"> DAY BOOK</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.daybooksuperadmin.incomeexpensereport" ng-click="checkAdmin()">
<span class="title" translate="sidebar.nav.daybook.INCOMEEXPENSEREPORT"> DAY BOOK PROFIT-LOSS STATEMENT</span>
</a>
</li>
</ul>
</li>
@ -765,6 +793,32 @@
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.reregistration')}">
<a href="javascript:void(0)">
<div class="item-content">
<div class="item-media">
<i class="ti-rocket"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.master.REREGISTRATION"> REREGISTRATION </span>
</div>
</div>
</a>
<ul class="sub-menu">
<li ui-sref-active="active">
<a ui-sref="app.reregistration.reregistrationform" ng-click="checkAdmin()">
<span class="title" translate="sidebar.nav.reregistration.REREGISTRATIONFORM">REREGISTRATIONFORM</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.reregistration.batchmovement" ng-click="checkAdmin()">
<span class="title" translate="sidebar.nav.reregistration.BATCHMOVEMENT">BATCHMOVEMENT</span>
</a>
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.broadCast')}">
<a href="javascript:void(0)">
<div class="item-content">
@ -1035,6 +1089,12 @@
<span class="title" translate="sidebar.nav.daybook.DAYBOOKAPPROVAL"> DAY BOOK</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.daybooksuperadmin.incomeexpensereport" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.daybook.INCOMEEXPENSEREPORT"> DAY BOOK PROFIT-LOSS STATEMENT</span>
</a>
</li>
</ul>
</li>
@ -1070,6 +1130,32 @@
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.reregistration')}">
<a href="javascript:void(0)">
<div class="item-content">
<div class="item-media">
<i class="ti-rocket"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.master.REREGISTRATION"> REREGISTRATION </span>
</div>
</div>
</a>
<ul class="sub-menu">
<li ui-sref-active="active">
<a ui-sref="app.reregistration.reregistrationform" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.reregistration.REREGISTRATIONFORM">REREGISTRATIONFORM</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.reregistration.batchmovement" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.reregistration.BATCHMOVEMENT">BATCHMOVEMENT</span>
</a>
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.myprofile')}">
<a ui-sref="app.myprofile" ng-click="checkStaff()">
@ -1259,6 +1345,12 @@
<span class="title" translate="sidebar.nav.daybook.DAYBOOKAPPROVAL"> DAY BOOK</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.daybooksuperadmin.incomeexpensereport" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.daybook.INCOMEEXPENSEREPORT"> DAY BOOK PROFIT-LOSS STATEMENT</span>
</a>
</li>
</ul>
</li>
@ -1298,6 +1390,32 @@
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.reregistration')}">
<a href="javascript:void(0)">
<div class="item-content">
<div class="item-media">
<i class="ti-rocket"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.master.REREGISTRATION"> REREGISTRATION </span>
</div>
</div>
</a>
<ul class="sub-menu">
<li ui-sref-active="active">
<a ui-sref="app.reregistration.reregistrationform" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.reregistration.REREGISTRATIONFORM">REREGISTRATIONFORM</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.reregistration.batchmovement" ng-click="checkStaff()">
<span class="title" translate="sidebar.nav.reregistration.BATCHMOVEMENT">BATCHMOVEMENT</span>
</a>
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.myprofile')}">
<a ui-sref="app.myprofile" ng-click="checkStaff()">

View File

@ -423,7 +423,7 @@
<th style="text-align:center;">Mode of Payment </th>
<th style="text-align:center;">Comments For Student </th>
<th style="text-align:center;">Comments For Internal </th>
<th style="text-align:center;">Print</th>
<th style="text-align:center;">Print</th>
</tr>
</thead>
<tbody>
@ -438,42 +438,46 @@
<td width="10" style="vertical-align:top;text-align:center;">
<a tooltip="Click to print" ng-mouseleave="mouseLeave()" pdf-save-button="{{v.BillNO}}" pdf-name="Billno-{{v.BillNO}}.pdf" class="btn"><i class="fa fa-print" ng-click="ShowHide(v)"></i></a>
<a tooltip="Click to print" class="btn"><i class="fa fa-print" ng-click="ShowHide(v,'print')"></i></a>
</td>
</tr>
</table>
<div id="pdf" pdf-save-content="{{billNo}}" visible='showButton'>
<table style="border-collapse: collapse; color: black;" border="0" width="100%">
<tbody>
<div id="print" after-render="printPdf">
<div ng-if="myPdfView">
<table style="border-collapse: collapse; color: black;" border="0" width="100%">
<tbody class="title">
<tr style="height: 23px;">
<td ng-if="BranchLogo=='' || BranchLogo==null" style="width: 136px; height: 82px; border-right-style: hidden; color: white; background-color: black; font-size: 22px; text-align: center;" rowspan="3">APOLLO</td>
<td ng-if="BranchLogo!='' && BranchLogo!=null" style="width: 136px; height: 82px; border-right-style: hidden; color: white; background-color: black; font-size: 22px; text-align: center;" rowspan="3">
<td ng-if="BranchLogo=='' || BranchLogo==null" style="width: 136px; height: 82px; color: white; background-color: black; font-size: 22px; text-align: center;" rowspan="3">APOLLO</td>
<td ng-if="BranchLogo!='' && BranchLogo!=null" style="width: 136px; height: 82px; color: white; background-color: black; font-size: 22px; text-align: center;" rowspan="3">
<div class="user-image">
<img class="pull-center" ng-src="images/{{BranchLogo}}" alt="">
<img class="pull-center" ng-src="images/{{BranchLogo}}" alt="APP">
<!-- <img ng-src="{{userInfo.avatar}}" alt="" ng-if="!obj.flow.files.length && !noImage">
<img flow-img="obj.flow.files[0]" ng-if="obj.flow.files.length">-->
</div>
</td>
<td style="width: 136px; height: 23px; text-align: center; border-bottom-style: hidden; color: white; background-color: black; font-size: 20px;" colspan="3"><strong><!--APOLLO DISTANCE EDUCATION COLLEGE-->{{FeesReceiptTitle}}</strong>
<div>
<td style="width: 136px; height: 23px; text-align: center; color: white; background-color: black; font-size: 20px;" colspan="3"><strong><!--APOLLO DISTANCE EDUCATION COLLEGE-->{{FeesReceiptTitle}}</strong>
</div>
</br>
<!--<span style="font-size: 16px;">(A Group of SVE Trust)</span>
</br>-->
<span style="white-space:pre-wrap;font-size: 16px;">{{BranchAddr}}</span>
</td>
</tr>
<tr>
<tr >
<td style="width: 136px; height: 23px; text-align: center; border-bottom-style: hidden; color: white; background-color: black; font-size: 16px;" colspan="3"><!--(A Group of SVE Trust)--></td>
</tr>
<tr>
<td style="width: 136px; height: 36px; text-align: center; color: white; background-color: black; font-size: 15px;" colspan="3"><!--10/1, First Floor, Old Airport Road, Domlur, Bangalore - 560071. karnataka<br> Land Mark - Opp to Domlur Bus Stop Ph:&nbsp;9620214554--><!--{{BranchAddr}}--></td>
</tr>
<tr style="height: 50px;">
<td style="width: 150px; height: 50px; text-align: center; border-bottom-style: hidden;padding-left:25%;" colspan="3">
<tr class="title" style="height: 50px;">
<td style="width: 150px; height: 50px; text-align: center; border-bottom-style: hidden;padding-left:25%;" colspan="3">
<span style="border: 2px solid black; padding: 10px; border-radius: 15px; font-size: 14px; color: #fff; background-color: black;">FEES ESTIMATE</span>
</td>
<td style="width: 137px; height: 50px; border-left-style: hidden; border-bottom-style: hidden;"><!--<strong>DOM:</strong>-->&nbsp;{{billNo}}<span ng-if="receiptNo!=''">&nbsp;/&nbsp;{{receiptNo}}</span></td>
@ -516,8 +520,11 @@
<td style="width: 136px; height: 42px; color: white; background-color: black; font-size: 14px;text-align: center;" colspan="4">Note: Terms & Conditions will be applicable as per University norms Fees once paid will not be refunded at any reasons</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@ -533,6 +540,7 @@
</div>
</div>
</div>
@ -547,4 +555,5 @@
</div>
</div>
</form>
<!-- class="editRowTd" -->