non operationa;
This commit is contained in:
parent
d2d4480ad8
commit
6083f04b16
@ -183,3 +183,9 @@ defined('ENCR_PASSWORD') OR define('ENCR_PASSWORD','e99a18c428cb38d5f26085367892
|
||||
|
||||
|
||||
|
||||
//for non operational items
|
||||
|
||||
defined('NONOPERATIONAL') OR define('NONOPERATIONAL','T_NonOperationalMaster');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -187,6 +187,7 @@ $route['IncomeExpenseDetails'] = 'DayBook_Controller/getIncomeExpenseDetails';
|
||||
$route['ViewFullIncomeDetails'] = 'DayBook_Controller/ViewFullIncomeDetails';
|
||||
$route['GetSubTypes'] = 'DayBook_Controller/GetSubTypes';
|
||||
|
||||
$route['GetPLforExcel'] = 'DayBook_Controller/GetPLforExcel';
|
||||
|
||||
$route['getAllDayBookDetails'] = 'DayBook_Controller/getAllDayBookDetails';
|
||||
|
||||
@ -275,6 +276,13 @@ $route['getDayBookMasterDetails'] = 'DayBookMaster_Controller/getDayBookMasterDe
|
||||
$route['addDaybookMasterDetails'] = 'DayBookMaster_Controller/addDaybookMasterDetails';
|
||||
$route['updateDayBookMasterDetails'] = 'DayBookMaster_Controller/updateDayBookMasterDetails';
|
||||
|
||||
/** non operational **/
|
||||
|
||||
$route['getNonDayBookDetails'] = 'DayBook_Controller/getNonDayBookDetails';
|
||||
$route['addNonOperational'] = 'DayBook_Controller/addNonOperational';
|
||||
$route['updateNonOperationalDetails'] = 'DayBook_Controller/updateNonOperationalDetails';
|
||||
|
||||
|
||||
/** This is for CRONE JOB*/
|
||||
$route['sendStudentNotification'] = 'Fees_Status_Controller/sendStudentNotification';
|
||||
|
||||
|
||||
@ -152,6 +152,33 @@ class DayBook_Controller extends REST_Controller {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getNonDayBookDetails_post() {
|
||||
|
||||
|
||||
|
||||
$reqData = $this->post('data');
|
||||
$reqDataBy = $this->post('localReqDetails');
|
||||
$getDayBookDetails = $this->daybook_model->get_Daybook_NonDetails_List($reqData, $reqDataBy);// Check if the employee exist
|
||||
if ($getDayBookDetails)
|
||||
{
|
||||
$getDayBookDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getDayBookDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No list were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getDayBookApprovalDetails_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqDataBy = $this->post('localReqDetails');
|
||||
@ -251,12 +278,103 @@ class DayBook_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function updateNonOperationalDetails_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqbyData = $this->post('localReqDetails');
|
||||
|
||||
$updateFor = $reqData['id'];
|
||||
$req['Type'] = $reqData['type'];
|
||||
$req['Amount'] = $reqData['amount'];
|
||||
$req['Description'] = $reqData['description'];
|
||||
$req['UpdatedBy'] = $reqbyData['localUserID'];
|
||||
$req['PaidTo'] = $reqData['paidTo'];
|
||||
$req['PaidDescription'] = $reqData['description_paid'];
|
||||
$req['VoucherNumber'] = $reqData['voucherNumber'];
|
||||
$req['BranchCode'] = $reqData['branch'];
|
||||
$req['Name'] = $reqData['name'];
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['UpdatedOn'] = $date;
|
||||
$updatedayBookDetails = $this->daybook_model->update_NonOperationalDetails($req , $updateFor);// Check if the employee exist
|
||||
if ($updatedayBookDetails)
|
||||
{
|
||||
$updatedayBookDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updatedayBookDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No list were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// add details daybook
|
||||
public function adddaybook_post() {
|
||||
|
||||
$reqData = $this->post('data');
|
||||
$reqbyData = $this->post('localReqDetails');
|
||||
|
||||
|
||||
$req['Name'] = $reqData['name'];
|
||||
$req['Type'] = $reqData['type'];
|
||||
$req['Amount'] = $reqData['amount'];
|
||||
// $d = new DateTime($reqData['date']);
|
||||
$req['Date'] = $reqData['date'];
|
||||
$req['Status'] = $reqData['status'];
|
||||
$req['Description'] = $reqData['description'];
|
||||
$req['BranchCode'] = $reqbyData['localBranchID'];
|
||||
$req['CreatedBy'] = $reqbyData['localUserID'];
|
||||
$req['PaidTo'] = $reqData['paidTo'];
|
||||
$req['PaidDescription'] = $reqData['description_paid'];
|
||||
$req['VoucherNumber'] = $reqData['voucherNumber'];
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['CreatedOn'] = $date;
|
||||
|
||||
if($reqData['Isdaybook']==true)
|
||||
{
|
||||
$req['Isdaybook']=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$req['Isdaybook']=0;
|
||||
}
|
||||
// print_r($req);exit();
|
||||
$addDayBookDetails = $this->daybook_model->add_dayBook($req);// Check if the employee exist
|
||||
if ($addDayBookDetails)
|
||||
{
|
||||
$addDayBookDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($addDayBookDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No list were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// add details non operational
|
||||
public function addNonOperational_post() {
|
||||
|
||||
$reqData = $this->post('data');
|
||||
$reqbyData = $this->post('localReqDetails');
|
||||
|
||||
$req['Name'] = $reqData['name'];
|
||||
$req['Type'] = $reqData['type'];
|
||||
$req['Amount'] = $reqData['amount'];
|
||||
@ -272,7 +390,7 @@ class DayBook_Controller extends REST_Controller {
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['CreatedOn'] = $date;
|
||||
// print_r($req);exit();
|
||||
$addDayBookDetails = $this->daybook_model->add_dayBook($req);// Check if the employee exist
|
||||
$addDayBookDetails = $this->daybook_model->add_NonOperational($req);// Check if the employee exist
|
||||
if ($addDayBookDetails)
|
||||
{
|
||||
$addDayBookDetails['status'] = REST_Controller::HTTP_OK;
|
||||
@ -289,6 +407,9 @@ class DayBook_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function updateDayBookStatusAdmin_post() {
|
||||
|
||||
$reqData = $this->post('data');
|
||||
@ -381,8 +502,9 @@ class DayBook_Controller extends REST_Controller {
|
||||
$from = $this->post('from');
|
||||
$to = $this->post('to');
|
||||
$incid = 'I002';
|
||||
$branch = $this->post('branch');
|
||||
|
||||
$getincomedetails = $this->daybook_model->getIncome_Details($from,$to,$incid);
|
||||
$getincomedetails = $this->daybook_model->getIncome_Details($from,$to,$incid,$branch);
|
||||
|
||||
// print_r($getincomedetails);
|
||||
// die();
|
||||
@ -405,6 +527,9 @@ class DayBook_Controller extends REST_Controller {
|
||||
$br = $this->post('branch');
|
||||
// echo $from.'from';
|
||||
// echo $to.'to';
|
||||
|
||||
|
||||
//echo $br;die();
|
||||
$getStatus = $this->daybook_model->Income_expense($from,$to,$br);
|
||||
//print_r($getStatus);
|
||||
if ($getStatus)
|
||||
@ -453,6 +578,34 @@ class DayBook_Controller extends REST_Controller {
|
||||
|
||||
|
||||
|
||||
public function GetPLforExcel_post()
|
||||
{
|
||||
|
||||
$from= $this->post('from');
|
||||
$to = $this->post('to');
|
||||
$branch = $this->post('branch');
|
||||
$getexceldet = $this->daybook_model->GetPLexcelDetails($from,$to,$branch);
|
||||
|
||||
|
||||
if($getexceldet)
|
||||
{
|
||||
|
||||
$getexceldet['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getexceldet, 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getAllDayBookDetails_post()
|
||||
{
|
||||
|
||||
|
||||
@ -115,6 +115,79 @@ class DayBook_model extends CI_Model
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function get_Daybook_NonDetails_List($reqData, $reqDataBy) {
|
||||
|
||||
|
||||
if($reqData['date'] != '' && $reqData['dateTo'] != '') {
|
||||
// $this->db->select('t1.*, t2.ListName, t3.TypeName');
|
||||
// $this->db->from(''.DAYBOOKMASTER. ' as t1');
|
||||
// $this->db->join('' . PICK_LIST_DETAILS . ' as t2', 't2.ListCode = t1.Name', 'LEFT');
|
||||
// $this->db->join('' . INCOMEOUTCOMEMASTER . ' as t3', 't3.ID = t1.Type', 'LEFT');
|
||||
|
||||
$d = new DateTime($reqData['date']);
|
||||
$dTo = new DateTime($reqData['dateTo']);
|
||||
$fromDate = $d->format('Y-m-d');
|
||||
$toDate = $dTo->format('Y-m-d');
|
||||
$reqpayType = $reqDataBy['localBranchID'];
|
||||
|
||||
$querys = "SELECT t1.ID as ORDER_ID, t1.*, t2.ListName, t3.TypeName
|
||||
FROM ".NONOPERATIONAL." as t1
|
||||
LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name
|
||||
LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type AND t3.BranchCode = t1.BranchCode
|
||||
|
||||
WHERE date_format(t1.CreatedOn,'%Y-%m-%d') BETWEEN '$fromDate'
|
||||
|
||||
AND '$toDate' AND t3.TypeID != 'I001' and t3.TypeID !='I002' AND t1.BranchCode = '$reqpayType' ORDER BY ORDER_ID DESC";
|
||||
// echo $querys;exit();
|
||||
// $this->db->where(' STR_TO_DATE(t1.Date, %d-%m-%Y) >=', $fromDate);
|
||||
// $this->db->where(' STR_TO_DATE(t1.Date, %d-%m-%Y) >=', $toDate);
|
||||
// $this->db->where('t1.Date', $reqData['date']);
|
||||
// $this->db->order_by('CreatedOn', 'DESC');
|
||||
// $this->db->where('t1.BranchCode', $reqDataBy['localBranchID']);
|
||||
|
||||
} else {
|
||||
// $this->db->select('t1.*, t2.ListName, t3.TypeName');
|
||||
// $this->db->from(''.DAYBOOKMASTER. ' as t1');
|
||||
// $this->db->join('' . PICK_LIST_DETAILS . ' as t2', 't2.ListCode = t1.Name', 'LEFT');
|
||||
// $this->db->join('' . INCOMEOUTCOMEMASTER . ' as t3', 't3.ID = t1.Type', 'LEFT');
|
||||
// // $this->db->where('t1.Date', $reqData['date']);
|
||||
// $this->db->order_by('CreatedOn', 'DESC');
|
||||
// $this->db->where('t1.BranchCode', $reqDataBy['localBranchID']);
|
||||
$reqpayType = $reqDataBy['localBranchID'];
|
||||
$querys = "SELECT t1.ID as ORDER_ID, t1.*, t2.ListName, t3.TypeName, t5.Firstname as Approved_by_name ,
|
||||
t7.UniversityName as UniversityName, t6.CourseName as CourseName,t7.UniversityID,t8.Lastname,t8.MobileNumber
|
||||
FROM ".DAYBOOKMASTER." as t1
|
||||
LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name
|
||||
LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type AND t3.BranchCode = t1.BranchCode
|
||||
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By
|
||||
LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID
|
||||
LEFT JOIN ".COURSE." as t6 ON t6.CourseID = t1.CourseID AND t6.BranchCode = t1.BranchCode
|
||||
LEFT JOIN ".UNIVERSITY." as t7 ON t7.UniversityID = t6.UniversityID AND t7.BranchCode = t1.BranchCode
|
||||
left join ".STUDENTS." as t8 on t8.StudentID = t1.StudentID
|
||||
WHERE t1.BranchCode = '$reqpayType' AND t3.TypeID != 'I001' and t3.TypeID !='I002' ORDER BY ORDER_ID DESC";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// $this->db->join('' . COURSE . ' as t2', 't2.UniversityID = t1.UniversityID', 'LEFT');
|
||||
$dayBookDetails = $this->db->query($querys);
|
||||
$dayBookDetailsList = $dayBookDetails->result();
|
||||
$results['dayBookListStatus'] = true;
|
||||
$results['dayBookListDetails'] = $dayBookDetailsList;
|
||||
|
||||
// print_r($this->db->last_query());
|
||||
// die();
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
public function get_Daybook_Approval_Details_List($reqData, $reqDataBy) {
|
||||
if($reqData['date'] != '' && $reqData['dateTo'] != '') {
|
||||
$d = new DateTime($reqData['date']);
|
||||
@ -369,10 +442,89 @@ class DayBook_model extends CI_Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// update existing daybook details
|
||||
public function update_NonOperationalDetails($Arr, $upFor) {
|
||||
|
||||
$branch = $Arr['BranchCode'];
|
||||
$sql = "SELECT * FROM ".NONOPERATIONAL." WHERE (BranchCode = '$branch' AND ID < '$upFor')
|
||||
ORDER BY ID DESC
|
||||
LIMIT 1 ";
|
||||
$prevBalance = 0;
|
||||
$latestUpdate = $this->db->query($sql);
|
||||
$latestUpdateDetails = $latestUpdate->result();
|
||||
If(is_array($latestUpdateDetails) && count($latestUpdateDetails)>0)
|
||||
{
|
||||
$prevBalance = $latestUpdateDetails[0]->Balance;
|
||||
}else{
|
||||
}
|
||||
|
||||
if($Arr['Name'] == 'I002') {
|
||||
//Income
|
||||
$Arr['Balance'] = $prevBalance + $Arr['Amount'];
|
||||
}else if ($Arr['Name'] == 'I001') {
|
||||
//Expense
|
||||
$Arr['Balance'] = $prevBalance - $Arr['Amount'];
|
||||
} else {
|
||||
$Arr['Balance'] = 0;
|
||||
}
|
||||
|
||||
$this->db->where('ID', $upFor);
|
||||
$this->db->update(NONOPERATIONAL, $Arr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
|
||||
$currBalance = 0;
|
||||
$sql1 = "SELECT * FROM ".NONOPERATIONAL." WHERE BranchCode = '$branch' AND ID = '$upFor'";
|
||||
$latestUpdate1 = $this->db->query($sql1);
|
||||
$latestUpdateDetails1 = $latestUpdate1->result();
|
||||
$currBalance = $latestUpdateDetails1[0]->Balance;
|
||||
|
||||
$sql2 = "SELECT * FROM ".NONOPERATIONAL." WHERE (BranchCode = '$branch' AND ID > '$upFor')
|
||||
ORDER BY ID ASC";
|
||||
$latestUpdate2 = $this->db->query($sql2);
|
||||
$latestUpdateDetails2 = $latestUpdate2->result();
|
||||
|
||||
foreach( $latestUpdateDetails2 as $clip){
|
||||
if($clip->Name == 'I002' && ($clip->Status == "Pending" || $clip->Status == "Approved" || $clip->Status == "approved" || $clip->Status == "pending")) {
|
||||
//Income
|
||||
$currBalance = $currBalance + $clip->Amount;
|
||||
}else if ($clip->Name == 'I001' && ($clip->Status == "Pending" || $clip->Status == "Approved" || $clip->Status == "approved" || $clip->Status == "pending")) {
|
||||
//Expense
|
||||
$currBalance = $currBalance - $clip->Amount;
|
||||
} else {
|
||||
}
|
||||
$updateSql = "UPDATE ".NONOPERATIONAL." SET Balance ='$currBalance' WHERE ID = '$clip->ID'";
|
||||
$this->db->query($updateSql);
|
||||
}
|
||||
$result['updateDetailsStatus'] = true;
|
||||
$result['message'] = "Successfully Details Updated";
|
||||
} else {
|
||||
$result['updateDetailsStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// add dayBook
|
||||
public function add_dayBook($Arr)
|
||||
{
|
||||
$voucherNo = $Arr['VoucherNumber'];
|
||||
|
||||
// $Arr['Isdaybook'] = '1';
|
||||
$sqlCheck = "SELECT * FROM ".DAYBOOKMASTER." WHERE VoucherNumber = '$voucherNo'";
|
||||
// print_r($this->db->query($sqlCheck));exit();
|
||||
$checkAdd = $this->db->query($sqlCheck);
|
||||
@ -418,6 +570,65 @@ class DayBook_model extends CI_Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// add non operational
|
||||
public function add_NonOperational($Arr)
|
||||
{
|
||||
$voucherNo = $Arr['VoucherNumber'];
|
||||
$sqlCheck = "SELECT * FROM ".NONOPERATIONAL." WHERE VoucherNumber = '$voucherNo'";
|
||||
// print_r($this->db->query($sqlCheck));exit();
|
||||
$checkAdd = $this->db->query($sqlCheck);
|
||||
$checkAddDetails = $checkAdd->result();
|
||||
if(count( $checkAddDetails ) > 0){
|
||||
$result['addDayBookStatus'] = false;
|
||||
$result['message'] = "This Voucher Number Already Exist.";
|
||||
}else{
|
||||
$branch = $Arr['BranchCode'];
|
||||
$sql = "SELECT * FROM ".NONOPERATIONAL." WHERE BranchCode = '$branch'
|
||||
ORDER BY ID DESC
|
||||
LIMIT 1";
|
||||
$prevBalance = 0;
|
||||
$latestUpdate = $this->db->query($sql);
|
||||
$latestUpdateDetails = $latestUpdate->result();
|
||||
|
||||
If(is_array($latestUpdateDetails) && count($latestUpdateDetails)>0)
|
||||
{
|
||||
$prevBalance = $latestUpdateDetails[0]->Balance;
|
||||
}else{
|
||||
}
|
||||
|
||||
if($Arr['Name'] == 'I002') {
|
||||
//Income
|
||||
$Arr['Balance'] = $prevBalance + $Arr['Amount'];
|
||||
}else if ($Arr['Name'] == 'I001') {
|
||||
//Expense
|
||||
$Arr['Balance'] = $prevBalance - $Arr['Amount'];
|
||||
} else {
|
||||
$Arr['Balance'] = 0;
|
||||
}
|
||||
|
||||
$this->db->insert(NONOPERATIONAL, $Arr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$result['addDayBookStatus'] = true;
|
||||
$result['message'] = "Successfully DayBook Details Added";
|
||||
} else {
|
||||
$result['addDayBookStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// approve/reject status updation for the daybook expense details
|
||||
public function update_status_admin($arr) {
|
||||
|
||||
@ -675,9 +886,9 @@ class DayBook_model extends CI_Model
|
||||
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=?) and Status !=?
|
||||
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? or p.Name=?) and Status !=? and p.BranchCode=? and p.Isdaybook=?
|
||||
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','Cancel'));
|
||||
$query = $this->db->query($subQuery,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','Cancel',$br,'1'));
|
||||
$expense = $query->result();
|
||||
|
||||
if(count($query)>0)
|
||||
@ -685,47 +896,82 @@ class DayBook_model extends CI_Model
|
||||
$results['expense_data'] = $expense;
|
||||
}
|
||||
|
||||
//print_r( $this->db->last_query());
|
||||
|
||||
// print_r($this->db->last_query());die();
|
||||
|
||||
$subQueryNON= 'SELECT
|
||||
DISTINCT(q.Name) AS TID,ListName,T_Income_Outcome_Master.TypeID as Orgtype,
|
||||
SUM(IF(q.Name=?,Amount,0)) AS Income,
|
||||
SUM(IF(q.Name=?,Amount,0)) AS Expense,
|
||||
|
||||
SUM( CASE Name
|
||||
WHEN ? THEN Amount
|
||||
WHEN ? THEN Amount
|
||||
END) AS Total
|
||||
FROM T_NonOperationalMaster AS q
|
||||
Join T_Income_Outcome_Master on T_Income_Outcome_Master.ID=q.Type
|
||||
join T_PickListDetails on T_PickListDetails.ListCode = q.name
|
||||
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and q.IsActive=? and (q.Name=? or q.Name=?)
|
||||
and Status !=? and q.BranchCode=? GROUP BY q.Name';
|
||||
|
||||
|
||||
$querynon = $this->db->query($subQueryNON,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','Cancel',$br));
|
||||
$expensenon = $querynon->result();
|
||||
|
||||
if(count($querynon)>0)
|
||||
{
|
||||
$results['expense_data_nonop'] = $expensenon;
|
||||
}
|
||||
|
||||
//print_r($expensenon);die();
|
||||
return $results;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getIncome_Details($from,$to,$incid)
|
||||
public function getIncome_Details($from,$to,$incid,$branch)
|
||||
{
|
||||
$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,?)<=? and Status!=? group by Type,Name';
|
||||
where str_to_date(date,?)>=? and str_to_date(date,?)<=? and Status!=? and T_DayBookMaster.BranchCode=? and T_DayBookMaster.Isdaybook=? group by Type,Name';
|
||||
|
||||
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel'));
|
||||
|
||||
|
||||
//print_r( $this->db->last_query());
|
||||
// die();
|
||||
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel',$branch,'1'));
|
||||
|
||||
|
||||
$expense = $query->result();
|
||||
|
||||
// print_r($expense);
|
||||
|
||||
if(count($query)>0)
|
||||
{
|
||||
$results['fullexpense_detail'] = $expense;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$subQueryNON = 'select Name,sum(Amount) as Total,T_NonOperationalMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_NonOperationalMaster.Date,Reason,T_NonOperationalMaster.Description,ListName
|
||||
from T_NonOperationalMaster
|
||||
left join T_Income_Outcome_Master on T_Income_Outcome_Master.ID = T_NonOperationalMaster.Type
|
||||
join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID
|
||||
where str_to_date(date,?)>=? and str_to_date(date,?)<=?
|
||||
and Status!=? and T_NonOperationalMaster.BranchCode=? group by Type,Name';
|
||||
|
||||
|
||||
$queryNon = $this->db->query($subQueryNON,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel',$branch));
|
||||
|
||||
|
||||
$expenseNon = $queryNon->result();
|
||||
|
||||
|
||||
if(count($queryNon)>0)
|
||||
{
|
||||
$results['fullNonOpexpense_detail'] = $expenseNon;
|
||||
}
|
||||
|
||||
|
||||
return $results;
|
||||
|
||||
@ -735,6 +981,52 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Can
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function GetPLexcelDetails($from,$to,$branch)
|
||||
{
|
||||
$fromd= date("Y-m-d",strtotime($from));
|
||||
$tod=date("Y-m-d",strtotime($to));
|
||||
|
||||
$subQuery='select
|
||||
Name,sum(Amount) as Total ,Date,T_Income_Outcome_Master.ID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName
|
||||
from T_DayBookMaster
|
||||
|
||||
Join T_Income_Outcome_Master on T_Income_Outcome_Master.ID= T_DayBookMaster.Type
|
||||
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and T_DayBookMaster.Isdaybook=? and T_DayBookMaster.BranchCode=? group by Name,Month(str_to_date(Date,?))
|
||||
union
|
||||
select Name,sum(Amount) as Total,Date,T_Income_Outcome_Master.ID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName from T_NonOperationalMaster
|
||||
Join T_Income_Outcome_Master on T_Income_Outcome_Master.ID= T_NonOperationalMaster.Type
|
||||
where str_to_date(Date,?)>=?
|
||||
and str_to_date(Date,?)<=?
|
||||
and T_NonOperationalMaster.BranchCode=?
|
||||
group by Name,Month(str_to_date(Date,?))
|
||||
|
||||
';
|
||||
|
||||
|
||||
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1',$branch,'%d-%m-%Y','%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,$branch,'%d-%m-%Y'));
|
||||
|
||||
|
||||
$expenseNon = $query->result();
|
||||
|
||||
|
||||
if(count($query)>0)
|
||||
{
|
||||
$results['exceldetails'] = $expenseNon;
|
||||
}
|
||||
|
||||
|
||||
return $results;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function Income_expenseSubtype()
|
||||
{
|
||||
$this->db->select('ListCode,ListName,IsActive');
|
||||
|
||||
@ -157,7 +157,8 @@
|
||||
"DAYBOOKDETAILS": "Daybook Details",
|
||||
"DAYBOOKAPPROVAL": "Approve Expenses",
|
||||
"INCOMEEXPENSEREPORT" : "Proft/Loss Statement",
|
||||
"DATACORRECTION" : "Bills Correction"
|
||||
"DATACORRECTION" : "Bills Correction",
|
||||
"NonOperational" : "Non Operational Entry"
|
||||
},
|
||||
"mydetails": {
|
||||
"MAIN": "My Details"
|
||||
|
||||
@ -133,6 +133,10 @@ app.constant('JS_REQUIRES', {
|
||||
'income_reportCtrl': 'assets/js/controllers/income_reportCtrl.js',
|
||||
/*
|
||||
|
||||
* */
|
||||
'nonoperationalCtrl': 'assets/js/controllers/nonoperationalCtrl.js',
|
||||
/*
|
||||
|
||||
|
||||
* */
|
||||
'datacorrectionCtrl': 'assets/js/controllers/datacorrectionCtrl.js',
|
||||
|
||||
@ -178,6 +178,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
ncyBreadcrumb: {
|
||||
label: 'income_expense'
|
||||
},
|
||||
}).state('app.daybooksuperadmin.nonoperational', {
|
||||
url: '/nonoperational',
|
||||
templateUrl: "assets/views/daybook/nonoperational.html",
|
||||
resolve: loadSequence('nonoperationalCtrl','ngTable', 'ladda', 'angular-ladda'),
|
||||
title: 'IncomeExpense',
|
||||
ncyBreadcrumb: {
|
||||
label: 'nonoperational'
|
||||
},
|
||||
}).state('app.entry.datacorrection', {
|
||||
url: '/datacorrection',
|
||||
templateUrl: "assets/views/data_correction.html",
|
||||
|
||||
@ -645,7 +645,8 @@ $scope.dayBookApprovalAccess = '';
|
||||
"description": "",
|
||||
"paidTo": "",
|
||||
"description_paid": "",
|
||||
"voucherNumber": ""
|
||||
"voucherNumber": "",
|
||||
"Isdaybook":""
|
||||
}
|
||||
|
||||
// add a new daybook entry
|
||||
|
||||
@ -633,7 +633,8 @@ $scope.dayBookApprovalAccess = '';
|
||||
"description": "",
|
||||
"paidTo": "",
|
||||
"description_paid": "",
|
||||
"voucherNumber": ""
|
||||
"voucherNumber": "",
|
||||
"Isdaybook":""
|
||||
}
|
||||
|
||||
// add a new daybook entry
|
||||
|
||||
@ -772,12 +772,17 @@ $scope.loadStaring = true;
|
||||
"description": "",
|
||||
"paidTo": "",
|
||||
"description_paid": "",
|
||||
"voucherNumber": ""
|
||||
"voucherNumber": "",
|
||||
"Isdaybook":""
|
||||
}
|
||||
|
||||
// add a new daybook entry
|
||||
$scope.daybookAdd = {
|
||||
submit: function (form, myModelAdd) {
|
||||
|
||||
// console.log(myModelAdd);
|
||||
// return false;
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
|
||||
@ -91,8 +91,11 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
|
||||
//alert($scope.batch.name);
|
||||
$scope.expense_data = '';
|
||||
$scope.nonexp_data ='';
|
||||
$scope.message = '';
|
||||
$scope.incomedetail = '';
|
||||
$scope.nonopdetails ='';
|
||||
|
||||
$scope.Subtypes = '';
|
||||
$scope.Total_expense = '';
|
||||
$scope.Total_income = '';
|
||||
@ -104,6 +107,10 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
$scope.nonopinctotal='';
|
||||
$scope.opexptotal='';
|
||||
$scope.nonopexptotal='';
|
||||
$scope.Net_Total = '';
|
||||
$scope.PLexceldetails='';
|
||||
|
||||
|
||||
|
||||
|
||||
var response_data = {
|
||||
@ -126,9 +133,10 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
$http(response_data).then(function (response) {
|
||||
//console.log(response.data);
|
||||
if (response.data.status == '200')
|
||||
{
|
||||
|
||||
{
|
||||
// console.log(response.data);
|
||||
$scope.expense_data = response.data.expense_data;
|
||||
$scope.nonexp_data = response.data.expense_data_nonop;
|
||||
|
||||
if($scope.expense_data.length>0)
|
||||
{
|
||||
@ -141,49 +149,42 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
$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;
|
||||
}
|
||||
|
||||
}
|
||||
if($scope.expense_data != undefined || $scope.expense_data != '')
|
||||
{
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
if($scope.expense_data[0].TID == 'I002')
|
||||
{
|
||||
$scope.Total_income = $scope.expense_data[0].Total;
|
||||
$scope.Total_expense = 0;
|
||||
angular.forEach(($scope.expense_data),function(expense_data,key)
|
||||
{
|
||||
|
||||
}
|
||||
if((expense_data.TID == 'I001'))
|
||||
{
|
||||
$scope.Total_expense = parseFloat(expense_data.Expense);
|
||||
|
||||
else
|
||||
{
|
||||
$scope.Total_expense = $scope.expense_data[0].Total;
|
||||
$scope.Total_income = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.Net_Total = $scope.Total_income -$scope.Total_expense;
|
||||
//console.log($scope.Total_income)
|
||||
|
||||
}
|
||||
|
||||
|
||||
if((expense_data.TID == 'I002'))
|
||||
{
|
||||
$scope.Total_income = parseFloat(expense_data.Income);
|
||||
//console.log($scope.Total_expense)
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// $scope.Net_Total = $scope.Total_income -$scope.Total_expense;
|
||||
|
||||
|
||||
}
|
||||
@ -215,49 +216,76 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
//console.log(response.data);
|
||||
if (response.data.status == '200')
|
||||
{
|
||||
|
||||
//console.log(response.data);
|
||||
$scope.incomedetail = response.data;
|
||||
$scope.fullincomedetail = response.data.fullexpense_detail;
|
||||
console.log($scope.fullincomedetail);
|
||||
$scope.nonopdetails = response.data.fullNonOpexpense_detail;
|
||||
// console.log($scope.fullincomedetail);
|
||||
$scope.opinctotal =0;
|
||||
$scope.nonopinctotal =0;
|
||||
$scope.opexptotal = 0;
|
||||
$scope.nonopexptotal =0;
|
||||
angular.forEach(($scope.fullincomedetail),function(fullincomedetail,key)
|
||||
{
|
||||
//console.log('in')
|
||||
|
||||
if((fullincomedetail.Name == 'I002')&&(fullincomedetail.OrgType=='I002'))
|
||||
if((fullincomedetail.Name == 'I002'))
|
||||
{
|
||||
$scope.opinctotal = parseFloat(fullincomedetail.Total)+parseFloat($scope.opinctotal);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if((fullincomedetail.Name == 'I002')&&((fullincomedetail.OrgType=='I003')||(fullincomedetail.OrgType=='I004')
|
||||
||(fullincomedetail.OrgType=='I005')||(fullincomedetail.OrgType=='I006')))
|
||||
{
|
||||
$scope.nonopinctotal = parseFloat(fullincomedetail.Total)+parseFloat($scope.nonopinctotal);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if((fullincomedetail.Name == 'I001')&&(fullincomedetail.OrgType=='I001'))
|
||||
if((fullincomedetail.Name == 'I001'))
|
||||
{
|
||||
$scope.opexptotal = parseFloat(fullincomedetail.Total)+parseFloat($scope.opexptotal);
|
||||
|
||||
}
|
||||
|
||||
if((fullincomedetail.Name == 'I001')&&((fullincomedetail.OrgType=='I003')||(fullincomedetail.OrgType=='I004')
|
||||
||(fullincomedetail.OrgType=='I005')||(fullincomedetail.OrgType=='I006')))
|
||||
{
|
||||
$scope.nonopexptotal = parseFloat(fullincomedetail.Total)+parseFloat($scope.nonopexptotal);
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// console.log($scope.opinctotal)
|
||||
|
||||
// console.log($scope.opexptotal)
|
||||
|
||||
angular.forEach(($scope.nonopdetails),function(nonopdetails,key)
|
||||
{
|
||||
|
||||
if((nonopdetails.Name == 'I002'))
|
||||
{
|
||||
$scope.nonopinctotal = parseFloat(nonopdetails.Total)+parseFloat($scope.nonopinctotal);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if((nonopdetails.Name == 'I001'))
|
||||
{
|
||||
$scope.nonopexptotal = parseFloat(nonopdetails.Total)+parseFloat($scope.nonopexptotal);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// console.log($scope.nonopinctotal)
|
||||
//console.log($scope.nonopexptotal)
|
||||
|
||||
|
||||
$scope.Net_Total = (parseFloat($scope.opinctotal)+parseFloat($scope.nonopinctotal))-
|
||||
|
||||
(parseFloat($scope.opexptotal)+parseFloat($scope.nonopexptotal) );
|
||||
|
||||
//console.log($scope.Net_Total)
|
||||
|
||||
// console.log($scope.Total_income)
|
||||
|
||||
// console.log($scope.nonopinctotal)
|
||||
|
||||
// console.log($scope.Total_expense)
|
||||
|
||||
// console.log($scope.nonopexptotal)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -306,7 +334,48 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
var getexceldetails = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'GetPLforExcel/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
},
|
||||
data: {
|
||||
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
from : $scope.filters.from_date,
|
||||
to : $scope.filters.to_date
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
$http(getexceldetails).then(function (response) {
|
||||
// console.log(response.data);
|
||||
if (response.data.status == '200')
|
||||
{
|
||||
$scope.PLexceldetails = response.data.exceldetails;
|
||||
|
||||
//console.log($scope.PLexceldetails);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$scope.message = response.data.message;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -325,37 +394,36 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter",
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
$scope.Newexcel={
|
||||
// "OperationalIncome":"",
|
||||
// "NonOperationalIncome":"",
|
||||
// "OperationalExpense":"",
|
||||
// "NonOperationalExpense":"",
|
||||
|
||||
};
|
||||
|
||||
|
||||
// $scope.Newexcel=[];
|
||||
|
||||
$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';
|
||||
|
||||
}
|
||||
$scope.Newexcel.OperationalIncome=$scope.opinctotal;
|
||||
$scope.Newexcel.NonOperationalIncome=$scope.nonopinctotal;
|
||||
$scope.Newexcel.OperationalExpense=$scope.opexptotal;
|
||||
$scope.Newexcel.NonOperationalExpense=$scope.nonopexptotal;
|
||||
|
||||
|
||||
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.Newexcel);
|
||||
//return false;
|
||||
|
||||
//console.log($scope.fullincomedetail);
|
||||
alasql('SELECT Type,ListName,TypeName,Date,Amount INTO XLS("Income Expense report.xls",?) FROM ?',[mystyle,$scope.fullincomedetail]);
|
||||
alasql('SELECT * INTO XLS("Income Expense report.xls",?) FROM ?',[mystyle,$scope.Newexcel]);
|
||||
|
||||
};
|
||||
|
||||
@ -394,35 +462,21 @@ $scope.tdate ='';
|
||||
$scope.changeSem = function()
|
||||
{
|
||||
|
||||
$scope.open($scope.fullincomedetail,$scope.expense_data,$scope.Subtypes);
|
||||
$scope.open($scope.fullincomedetail,$scope.nonopdetails,$scope.expense_data,$scope.nonexp_data,$scope.Subtypes);
|
||||
}
|
||||
|
||||
|
||||
var fm_date= '';
|
||||
var Total_inc = 0;
|
||||
var Total_exp = 0;
|
||||
$scope.open = function(incomeexpensedetails,incomeexpenselist,Subtypes)
|
||||
$scope.open = function(incomeexpensedetails,nonopdetails,incomeexpenselist,nonexp_data,Subtypes)
|
||||
{
|
||||
|
||||
//Total_inc === incomeexpenselist[1].Total
|
||||
if(incomeexpenselist[0] == 'undefined' || incomeexpenselist[0] == null)
|
||||
{
|
||||
Total_exp=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Total_exp = incomeexpenselist[0].Total;
|
||||
}
|
||||
|
||||
|
||||
// console.log(nonopdetails);
|
||||
|
||||
if(incomeexpenselist[1] == 'undefined' || incomeexpenselist[1] == null)
|
||||
{
|
||||
Total_inc=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Total_inc = incomeexpenselist[1].Total;
|
||||
}
|
||||
//console.log(incomeexpenselist[1]);
|
||||
// console.log(nonexp_data);
|
||||
|
||||
//
|
||||
var formate = "dd-MM-yyyy";
|
||||
@ -438,20 +492,23 @@ var Total_exp = 0;
|
||||
// console.log(incomeexpensedetails);
|
||||
// console.log(Subtypes);
|
||||
|
||||
// $scope.opinctotal =0;
|
||||
// $scope.nonopinctotal =0;
|
||||
// $scope.opexptotal = 0;
|
||||
// $scope.nonopexptotal =0;
|
||||
// $scope.opinctotal =0;
|
||||
// $scope.nonopinctotal =0;
|
||||
// $scope.opexptotal = 0;
|
||||
// $scope.nonopexptotal =0;
|
||||
|
||||
$rootScope.income_expendelist = incomeexpenselist;
|
||||
$rootScope.income_expensedetails = incomeexpensedetails;
|
||||
|
||||
$rootScope.nonopeincexpdetails = nonopdetails;
|
||||
|
||||
$rootScope.listdetails = Subtypes;
|
||||
$rootScope.fdate = $scope.fdate;
|
||||
$rootScope.tdate = $scope.tdate
|
||||
$rootScope.net_totalamount = $scope.Net_Total;
|
||||
$rootScope.opeinctot = $scope.opinctotal;
|
||||
$rootScope.opeinctot = $scope.Total_income;
|
||||
$rootScope.nonopeinctot = $scope.nonopinctotal;
|
||||
$rootScope.opeexptot = $scope.opexptotal;
|
||||
$rootScope.opeexptot = $scope.Total_expense;
|
||||
$rootScope.nonopexptot = $scope.nonopexptotal;
|
||||
//$rootScope.sum = incomeexpenselist[1].Total - incomeexpenselist[0].Total;
|
||||
|
||||
|
||||
1235
Apollo/assets/js/controllers/nonoperationalCtrl.js
Normal file
1235
Apollo/assets/js/controllers/nonoperationalCtrl.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -281,7 +281,7 @@
|
||||
</label>
|
||||
|
||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="myModel.type" required>
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" ng-if="(typeName.ListCode == 'I001' || typeName.ListCode == 'I002')" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}" ng-selected="incexp.ID == incexpType.ID">{{incexpType.TypeName}}</option>
|
||||
|
||||
</optgroup>
|
||||
@ -388,7 +388,7 @@
|
||||
<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>
|
||||
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" ng-if="(typeName.ListCode == 'I001' || typeName.ListCode == 'I002')" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}">{{incexpType.TypeName}}</option>
|
||||
|
||||
</optgroup>
|
||||
@ -473,6 +473,29 @@
|
||||
<span class="error text-small block" ng-if="Form.addComments.$dirty && Form.addComments.$error.pattern">Invalid Comments</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- <label>
|
||||
Need To show in Profit Lose Report
|
||||
</label> -->
|
||||
|
||||
<div class="checkbox clip-check check-primary">
|
||||
<input type="checkbox" id="checkbox6" name="Isdaybook" ng-model="myModelAdd.Isdaybook">
|
||||
<label for="checkbox6">
|
||||
Need To show in Profit Lose Report
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
|
||||
@ -288,7 +288,7 @@
|
||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="myModel.type" required>
|
||||
|
||||
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" ng-if="(typeName.ListCode == 'I001' || typeName.ListCode == 'I002')" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}" ng-selected="incexp.ID == incexpType.ID">{{incexpType.TypeName}}</option>
|
||||
|
||||
</optgroup>
|
||||
@ -395,7 +395,7 @@
|
||||
<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>
|
||||
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" ng-if="(typeName.ListCode == 'I001' || typeName.ListCode == 'I002')" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}">{{incexpType.TypeName}}</option>
|
||||
|
||||
</optgroup>
|
||||
@ -488,6 +488,31 @@
|
||||
<span class="error text-small block" ng-if="Form.addComments.$dirty && Form.addComments.$error.pattern">Invalid Comments</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- <label>
|
||||
Need To show in Profit Lose Report
|
||||
</label> -->
|
||||
|
||||
<div class="checkbox clip-check check-primary">
|
||||
<input type="checkbox" id="checkbox6" name="Isdaybook" ng-model="myModelAdd.Isdaybook">
|
||||
<label for="checkbox6">
|
||||
Need To show in Profit Lose Report
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
|
||||
@ -278,7 +278,7 @@
|
||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="myModel.type" required>
|
||||
|
||||
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" ng-if="(typeName.ListCode == 'I001' || typeName.ListCode == 'I002')" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}" ng-selected="incexp.ID == incexpType.ID">{{incexpType.TypeName}}</option>
|
||||
|
||||
</optgroup>
|
||||
@ -387,7 +387,7 @@
|
||||
<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>
|
||||
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" label="{{typeName.ListName}}">
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" ng-if="(typeName.ListCode == 'I001' || typeName.ListCode == 'I002')" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}">{{incexpType.TypeName}}</option>
|
||||
|
||||
</optgroup>
|
||||
@ -469,6 +469,29 @@
|
||||
<span class="error text-small block" ng-if="Form.addComments.$dirty && Form.addComments.$error.pattern">Invalid Comments</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- <label>
|
||||
Need To show in Profit Lose Report
|
||||
</label> -->
|
||||
|
||||
<div class="checkbox clip-check check-primary">
|
||||
<input type="checkbox" id="checkbox6" name="Isdaybook" ng-model="myModelAdd.Isdaybook">
|
||||
<label for="checkbox6">
|
||||
Need To show in Profit Lose Report
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
|
||||
463
Apollo/assets/views/daybook/nonoperational.html
Normal file
463
Apollo/assets/views/daybook/nonoperational.html
Normal file
@ -0,0 +1,463 @@
|
||||
<!-- start: PAGE TITLE -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="sidebar.nav.daybook.NonOperational">{{ mainTitle }}</h1>
|
||||
</div>
|
||||
<!-- <div ncy-breadcrumb></div>-->
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: PAGE TITLE -->
|
||||
<!-- start: DAY BOOK -->
|
||||
|
||||
<div class="container-fluid container-fullw bg-white">
|
||||
<div ng-controller="nonoperationalCtrl" ng-init="init()" >
|
||||
<div>
|
||||
<tabset class="tabbable">
|
||||
<tab heading="View" id="viewDayBook">
|
||||
<div class="container-fluid container-fullw">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<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="searchData.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-4">
|
||||
<!--<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="searchData.dateTo"
|
||||
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-4">
|
||||
<label for="form-field-select-2">
|
||||
Search
|
||||
</label>
|
||||
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-md-12" ng-if="noRecordFound == true" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">No
|
||||
records found... </h3></strong></p>
|
||||
</div>-->
|
||||
<style>
|
||||
.listCoutShow {
|
||||
margin: 12px;
|
||||
padding: 4px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border: 1px solid #59b176;
|
||||
border-radius: 7px;
|
||||
color: #FFF;
|
||||
background-color: #5fba7d;
|
||||
text-align: center;
|
||||
}
|
||||
.containersPara {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 220px;
|
||||
max-width: 140px;
|
||||
overflow: auto;
|
||||
background: #ddd;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row">
|
||||
<!--{{loadStaring}}-->
|
||||
<div ng-if="loadStaring" align='center' style="font-size: 14px;color: blue;">Generating...</div>
|
||||
<!--<button ng-click="exportData()">export</button>-->
|
||||
<div class="pull-right" ng-if="data">
|
||||
<button ng-click="exportData()" class="btn btn-sm btn-default">
|
||||
Export As Excel
|
||||
</button>
|
||||
<button ng-disabled="loadStaring" ng-click="generatePFD(datas)" class="btn btn-sm btn-default">
|
||||
Export As PDF
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<div style="margin: 8px;">
|
||||
<div style="width: 45px; display: initial;">
|
||||
<span style="font-size: 14px;
|
||||
color: black;">Total Count:</span> <span class="listCoutShow">{{ dataLength }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<style>
|
||||
table tbody:hover {
|
||||
background: lightgray;
|
||||
/*font-size: 16px;*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<table class="table table-bordered export-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.No</th>
|
||||
<th ng-click="sort('Date')" style="width: 20%;padding-right:5%">Date</th>
|
||||
<th class="th" ng-click="sort('ListName')" style="width: 5%">Income/</br>Expense</th>
|
||||
<th style="width: 5%">Voucher No / Bill No</th>
|
||||
<th style="width: 7.5%">Paid To / Received From</th>
|
||||
<th ng-click="sort('TypeName')" style="width: 7.5%">Type</th>
|
||||
<th style="width: 5%">Amount</th>
|
||||
<th style="width: 5%">Balance</th>
|
||||
|
||||
<th style="width: 7.5%"> Comments</th>
|
||||
<th class="center" ng-click="sort('Status')" style="width: 7.5%">Status</th>
|
||||
<th class="center" style="width: 7.5%">Action</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody dir-paginate="p in data | filter:search:strict | itemsPerPage:10">
|
||||
<tr>
|
||||
<td>{{p.ORDER_ID}}</td>
|
||||
<td>{{p.Date}}</td>
|
||||
<td>{{p.ListName}}</td>
|
||||
<td ng-click="billDetails(p.VoucherNumber)">
|
||||
<span tooltip="Click to view bill details">{{p.VoucherNumber}}</span>
|
||||
</td>
|
||||
<td>{{p.PaidTo}} {{ p.Lastname}}</a></td>
|
||||
<td><span ng-if=" p.PaymentStatus == 1 ">{{p.TypeName}}</span>
|
||||
<span tooltip="Fees Updation" ng-if=" p.PaymentStatus == 0 " style="color:chocolate">{{p.TypeName}}</span></td>
|
||||
|
||||
<td>{{p.Amount}}</td>
|
||||
<td>{{p.Balance}}</td>
|
||||
|
||||
<td><div class="containersPara"><span style="white-space:pre-wrap;">{{p.Description}}</span></div> </td>
|
||||
|
||||
<td class="center" tooltip="{{p.Approval_Comments}}"><span ng-if="p.Status == 'Pending'" style="text-transform: uppercase; text-shadow: 1px 1px #286d5f; color: #55d4bb ">{{p.Status}}</span>
|
||||
<span ng-if="p.Status == 'Approved'" style="text-transform: uppercase; text-shadow: 1px 1px #166307; color: #2be209 ">{{p.Status}}</span>
|
||||
<span ng-if="p.Status == 'Rejected'" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 88, 15); color: rgba(236, 24, 24, 0.98823529);">{{p.Status}}</span>
|
||||
<span ng-if="p.Status == 'Cancel'" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 99, 15); color: rgba(236, 28, 28, 0.98823529);">{{p.Status}}</span>
|
||||
</td>
|
||||
|
||||
<td class="center" ng-if="p.Status != 'Pending' && p.ListName != 'Income' && p.Status == 'Cancel' ">-</td>
|
||||
|
||||
<td class="center" ng-if="p.ListName == 'Income' && p.Status != 'Cancel' ">
|
||||
<span ng-if=" p.PaymentStatus == 1 "> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
||||
<span ng-if=" p.PaymentStatus == 0 ">
|
||||
<i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleted1(p.ID)"></i>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="center" ng-if="p.Status == 'Pending' && p.Status != 'Cancel'">
|
||||
<span ng-if=" p.PaymentStatus == 1 ">
|
||||
<span> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
|
||||
<span> <i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleted(p.ID)"></i> </span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-show="editId === p.ID" ng-if="editId === p.ID">
|
||||
<!--<pre>{{ p }}</pre>-->
|
||||
<td colspan="15">
|
||||
<form name="Form" id="form" novalidate ng-submit="daybookeditUpdate.submit(Form, myModel)" method="post">
|
||||
<div ng-init="copyModel(p)" class="container" style="background-color: rgb(248, 248, 248);
|
||||
border-radius: 6px;padding: 22px;">
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.editvoucherNumber.$dirty && Form.editvoucherNumber.$invalid, 'has-success':Form.editvoucherNumber.$valid}">
|
||||
<label>
|
||||
Voucher Number
|
||||
</label>
|
||||
<input type="text" name="editvoucherNumber" tabindex="1" placeholder="Enter Voucher Number" class="form-control" ng-model="myModel.voucherNumber"
|
||||
required ng-pattern="/^[a-zA-Z0-9-]*$/" />
|
||||
|
||||
<span class="error text-small block" ng-if="Form.editvoucherNumber.$error.pattern">Enter a Valid Voucher Number.</span>
|
||||
<span class="error text-small block" ng-if="Form.editvoucherNumber.$dirty && Form.editvoucherNumber.$invalid" ng-hide="Form.editvoucherNumber.$error.maxlength || Form.editvoucherNumber.$error.minlength || Form.editvoucherNumber.$error.pattern">Voucher Number is required.</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.editpaidTo.$dirty && Form.editpaidTo.$invalid, 'has-success':Form.editpaidTo.$valid}">
|
||||
<label>
|
||||
Paid To / Received From
|
||||
</label>
|
||||
<input type="text" name="editpaidTo" tabindex="1" placeholder="Enter Paid To / Received From" class="form-control" ng-model="myModel.paidTo"
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.editpaidTo.$dirty && Form.editpaidTo.$invalid" ng-hide="Form.editpaidTo.$error.maxlength || Form.editpaidTo.$error.minlength || Form.editpaidTo.$error.pattern">Paid To / Received From is required.</span>
|
||||
</div>
|
||||
<div class="col-md-4" ng-class="{'has-error':Form.editdescription_paid.$dirty && Form.editdescription_paid.$invalid, 'has-success':Form.editdescription_paid.$valid}">
|
||||
<label>
|
||||
Description
|
||||
</label>
|
||||
|
||||
<textarea type="text" placeholder="Enter Description" tabindex="3" class="form-control" name="editdescription_paid" ng-model="myModel.description_paid"
|
||||
required maxlength="100" />
|
||||
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
|
||||
<span class="error text-small block" ng-if="Form.editdescription_paid.$dirty && Form.editdescription_paid.$invalid" ng-hide="Form.editdescription_paid.$error.maxlength || Form.editdescription_paid.$error.minlength || Form.editdescription_paid.$error.pattern">Description required.</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" ng-class="{'has-error':Form.editType.$dirty && Form.editType.$invalid, 'has-success':Form.editType.$valid}">
|
||||
<label for="form-field-select-2">
|
||||
Type <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<!-- <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="myModel.type" required>
|
||||
|
||||
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" ng-if="(typeName.ListCode != 'I001' && typeName.ListCode != 'I002')" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID" value="{{incexpType.ID}}" ng-selected="incexp.ID == 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>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4" ng-class="{'has-error':Form.editAmount.$dirty && Form.editAmount.$invalid, 'has-success':Form.editAmount.$valid}">
|
||||
<label>
|
||||
Amount <span class="symbol required"></span>
|
||||
|
||||
</label>
|
||||
<input type="text" name="editAmount" tabindex="2" placeholder="Enter Amount" class="form-control" ng-model="myModel.amount"
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.editAmount.$dirty && Form.editAmount.$error.required">Amount is Required </span>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4" ng-class="{'has-error':Form.editComments.$dirty && Form.editComments.$invalid, 'has-success':Form.editComments.$valid}">
|
||||
<label>
|
||||
Comments
|
||||
</label>
|
||||
|
||||
<textarea type="text" placeholder="Enter Comments" tabindex="3" class="form-control" name="editComments" ng-model="myModel.description"
|
||||
required maxlength="100" />
|
||||
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Charactes.</span>
|
||||
<span class="error text-small block" ng-if="Form.editComments.$dirty && Form.editComments.$invalid" ng-hide="Form.editComments.$error.maxlength || Form.editComments.$error.minlength || Form.editComments.$error.pattern">Comments required.</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="center">
|
||||
<button type="submit" ng-disabled="disableEditButton" tabindex="4" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
|
||||
data-style="zoom-in">
|
||||
<i class='fa fa-spinner fa-spin' ng-if="disableEditButton"> </i> Submit
|
||||
</button>
|
||||
<button type="cancel" ng-click="editClose()" tabindex="5" class="btn btn-warning btn-sm" ng-click="employeeForm.resetCourse(Form)">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tab>
|
||||
<tab heading="Add" id="addDayBook">
|
||||
<!--<pre>{{myModelAdd}}</pre>-->
|
||||
<div>
|
||||
<form name="Form" id="form" novalidate ng-submit="daybookAdd.submit(Form, myModelAdd)" method="post">
|
||||
<div>
|
||||
<div class="row">
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.addDate.$dirty && Form.addDate.$invalid, 'has-success':Form.addDate.$valid}">
|
||||
<label>
|
||||
Date <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" id="date" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelAdd.date"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
|
||||
placeholder="Select Date" close-text="Close" required="required" ng-change="getMaxEndDate(myModel.startDate)"
|
||||
show-button-bar="true" max-date="todayDate" />
|
||||
|
||||
|
||||
<span class="error text-small block" ng-if="Form.addDate.$dirty && Form.addDate.$invalid" ng-hide="Form.addDate.$error.maxlength">Date is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.addDate.$error.maxlength">Enter a Valid Date </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 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>
|
||||
</label>
|
||||
<!--<pre>{{incomeExpenseName }}</pre>-->
|
||||
<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 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 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>
|
||||
|
||||
<optgroup ng-repeat="typeName in incomeExpenseName" ng-if="(typeName.ListCode != 'I001' && typeName.ListCode != 'I002')" label="{{typeName.ListName}}">
|
||||
<option ng-repeat="incexpType in incomeExpenseType" ng-if="typeName.ListCode == incexpType.TypeID " value="{{incexpType.ID}}">{{incexpType.TypeName}}</option>
|
||||
|
||||
</optgroup>
|
||||
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.addType.$dirty && Form.addType.$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}">
|
||||
<label>
|
||||
Voucher Number <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="voucherNumber" tabindex="1" placeholder="Enter Voucher Number" class="form-control" ng-model="myModelAdd.voucherNumber"
|
||||
ng-pattern="/^[a-zA-Z0-9-]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.voucherNumber.$error.pattern">Enter a Valid Voucher Number</span>
|
||||
|
||||
<span class="error text-small block" ng-if="Form.voucherNumber.$dirty && Form.voucherNumber.$invalid" ng-hide="Form.voucherNumber.$error.maxlength || Form.voucherNumber.$error.minlength || Form.voucherNumber.$error.pattern">Voucher Number is required.</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.paidTo.$dirty && Form.paidTo.$invalid , 'has-success':Form.paidTo.$valid}">
|
||||
<label>
|
||||
Paid To / Received From <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="paidTo" tabindex="1" placeholder="Enter Paid To / Received From" class="form-control" ng-model="myModelAdd.paidTo"
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.paidTo.$dirty && Form.paidTo.$invalid" ng-hide="Form.paidTo.$error.maxlength || Form.paidTo.$error.minlength || Form.paidTo.$error.pattern">Paid To / Reveived From 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>
|
||||
</label>
|
||||
<input type="text" ng-pattern="/^[0-9]*$/" name="addAmount" tabindex="2" placeholder="Enter Amount" class="form-control"
|
||||
ng-model="myModelAdd.amount" required/>
|
||||
<span class="error text-small block" ng-if="Form.addAmount.$dirty && Form.addAmount.$error.required">Amount is Required </span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-4" ng-class="{'has-error':Form.description_paid.$dirty && Form.description_paid.$invalid , 'has-success':Form.description_paid.$valid}">
|
||||
<label>
|
||||
Description <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<textarea type="text" placeholder="Enter Description" tabindex="3" class="form-control" name="description_paid" ng-model="myModelAdd.description_paid"
|
||||
maxlength="100" required/>
|
||||
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
|
||||
<span class="error text-small block" ng-if="Form.description_paid.$dirty && Form.description_paid.$error.pattern">Invalid Description</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>
|
||||
</label>
|
||||
<input type="text" ng-pattern="/^[0-9]*$/" name="addAmount" tabindex="2" placeholder="Enter Amount" class="form-control"
|
||||
ng-model="myModelAdd.amount" required/>
|
||||
<span class="error text-small block" ng-if="Form.addAmount.$dirty && Form.addAmount.$error.required">Amount is Required </span>
|
||||
|
||||
</div> -->
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
Comments
|
||||
</label>
|
||||
|
||||
<textarea type="text" placeholder="Enter Comments" tabindex="3" class="form-control" name="addComments" ng-model="myModelAdd.description"
|
||||
maxlength="100" />
|
||||
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
|
||||
<span class="error text-small block" ng-if="Form.addComments.$dirty && Form.addComments.$error.pattern">Invalid Comments</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ng-disabled="disableAddButton" tabindex="4" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
|
||||
data-style="zoom-in">
|
||||
<i class='fa fa-spinner fa-spin' ng-if="disableAddButton"> </i> Submit
|
||||
</button>
|
||||
<button type="cancel" ng-click="daybookAdd.reset(Form)" tabindex="5" class="btn btn-warning btn-sm" ng-click="employeeForm.resetCourse(Form)">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</tab>
|
||||
<!--<tab heading="Approve Income/Expense" id="addDayBook" ng-if="dayBookApprovalAccess == '1'">
|
||||
<div ng-init="getApproveLoad()">
|
||||
</div>
|
||||
</tab>-->
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: DAY BOOK -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<!--<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="sidebar.nav.profile.MAIN">{{ mainTitle }}</h1>
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>-->
|
||||
</div>
|
||||
</section>
|
||||
@ -125,7 +125,7 @@
|
||||
<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 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>
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
</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'">
|
||||
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I002'">
|
||||
<!-- {{li.ListName }} -->
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
@ -189,7 +189,7 @@
|
||||
<label style="color: black; font-size: 17px">Total Operational Income</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10">
|
||||
{{opinctotal}}
|
||||
{{Total_income}}
|
||||
</div>
|
||||
</div>
|
||||
<!--Total End -->
|
||||
@ -206,7 +206,7 @@
|
||||
</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'">
|
||||
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I001'">
|
||||
<!-- {{li.ListName }} -->
|
||||
<div id="test" class="pad" ng-init="totaladd();">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
@ -228,7 +228,7 @@
|
||||
<label style="color: black; font-size: 17px">Total Operational Expense</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10">
|
||||
{{opexptotal}}
|
||||
{{Total_expense}}
|
||||
</div>
|
||||
</div>
|
||||
<!--Total End -->
|
||||
@ -245,7 +245,7 @@
|
||||
<label style="color: black; font-size: 15px">Non Operating Income</label></b>
|
||||
</div>
|
||||
|
||||
<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' )">
|
||||
<div class="col-md-12" ng-repeat="li in nonopdetails " ng-if="li.Name=='I002'">
|
||||
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
@ -280,7 +280,7 @@
|
||||
</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' )">
|
||||
<div class="col-md-12" ng-repeat="li in nonopdetails " ng-if="li.Name=='I001'">
|
||||
<!-- {{li.ListName }} -->
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
<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>
|
||||
<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>
|
||||
@ -71,7 +71,7 @@
|
||||
</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'">
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I002'">
|
||||
<!-- {{li.ListName }} -->
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
@ -105,7 +105,7 @@
|
||||
<label style="color: black; font-size: 12px">Operating Expense</label></b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I001' && li.OrgType == 'I001'">
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I001'">
|
||||
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
@ -133,7 +133,7 @@
|
||||
<div class="col-md-12"><b>
|
||||
<label style="color: black; font-size: 12px">Non Operating Income</label></b>
|
||||
</div>
|
||||
<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')">
|
||||
<div class="col-md-12" ng-repeat="li in nonopeincexpdetails " ng-if="li.Name=='I002'">
|
||||
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
@ -161,7 +161,7 @@
|
||||
<label style="color: black; font-size: 12px">Non Operating Expense</label></b>
|
||||
</div>
|
||||
|
||||
<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' )">
|
||||
<div class="col-md-12" ng-repeat="li in nonopeincexpdetails " ng-if="li.Name=='I001'">
|
||||
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
|
||||
@ -307,13 +307,24 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li ui-sref-active="active">
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.daybooksuperadmin.nonoperational" ng-click="checkSuperAdmin()">
|
||||
<span class="title" translate="sidebar.nav.daybook.NonOperational"> DAY BOOK</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<!-- <li ui-sref-active="active">
|
||||
<a ui-sref="app.daybooksuperadmin.datacorrection" ng-click="checkSuperAdmin()">
|
||||
<span class="title" translate="sidebar.nav.daybook.DATACORRECTION"> DATA CORRECTION</span>
|
||||
@ -872,6 +883,13 @@
|
||||
</li>
|
||||
|
||||
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.daybooksuperadmin.nonoperational">
|
||||
<span class="title" translate="sidebar.nav.daybook.NonOperational"> DAY BOOK</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<!-- <li ui-sref-active="active">
|
||||
<a ui-sref="app.daybooksuperadmin.datacorrection" ng-click="checkAdmin()">
|
||||
<span class="title" translate="sidebar.nav.daybook.DATACORRECTION"> DATA CORRECTION</span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user