This commit is contained in:
resicovenba 2018-02-23 17:43:09 +05:30
commit 67134a84b1
5 changed files with 95 additions and 69 deletions

View File

@ -622,7 +622,7 @@ class Fees_status_model extends CI_Model
* */
public function getCourseDetails($universityID=null)
{
$this->db->select('CourseID,CourseName');
$this->db->select('CourseID,CONCAT(CourseName, "(",CourseCode,")") AS CourseName');
$this->db->where('UniversityID',$universityID);
$this->db->where('IsActive','1');
$this->db->order_by('CourseID','ASC');
@ -1035,35 +1035,6 @@ class Fees_status_model extends CI_Model
* created by kms
* */
public function insertDayBookMaster($data=null,$paymentID){
if($data['ModeOfPayment']=='CASH'){
$insertArray['Date'] = $data['BillDate'];
$insertArray['CreatedBy'] = $data['CreatedBy'];
$insertArray['CreatedOn'] = $data['CreatedOn'];
$insertArray['Description'] = $data['InternalComments'];
$insertArray['Amount'] = $data['BillAmount'];
$insertArray['Status'] = 'Approved';
$insertArray['PaymentStatus'] = false;
$insertArray['FeesPaymentID'] = $paymentID;
$insertArray['BranchCode'] = $data['UpdatedBy'];
$this->db->select('ID,TypeID');
$this->db->where('TypeID', 'I002');
$this->db->where('TypeName', 'FEES');
$getIncome=$this->db->get(INCOMEOUTCOMEMASTER)->last_row();
if($getIncome){
$insertArray['Name'] = $getIncome->TypeID;
$insertArray['Type'] = $getIncome->ID;
$this->db->insert(DAYBOOKMASTER, $insertArray);
return true;
}
else{
return true;
}
}
else{
// this is for income entry
$insertArray['Date'] = $data['BillDate'];
$insertArray['CreatedBy'] = $data['CreatedBy'];
@ -1113,11 +1084,8 @@ class Fees_status_model extends CI_Model
$this->db->insert(DAYBOOKMASTER, $expenseArray);
}
return true;
}
}

View File

@ -11007,7 +11007,7 @@ td.small-width {
/* ---------------------------------------------------------------------- */
#page-title {
border-bottom: 1px solid #eee;
padding: 50px 0;
padding: 20px 0;
position: relative;
margin-left: -15px;
margin-right: -15px;

View File

@ -285,7 +285,7 @@ app.controller('studentModalDemoCtrl', ["$scope", "$modal", "$log", "API_POINTS"
});
} else {
swal("Failed!", "This student is not registered", "warning");
swal("Failed!", "This student is not registerd", "warning");
$scope.courseEditLoading = false;
$scope.studentDetails = "";
$scope.courseDetails = "";

View File

@ -493,7 +493,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
angular.forEach($scope.feesStructureInfo[0].batchDetails,function (values,key) {
$scope.BatchDetails.push({
"BatchCode":values.BatchCode,
"BatchName":values.BatchName + '-'+ values.BatchCode,
"BatchName":values.BatchName + '('+ values.BatchCode + ')',
"BatchDate":values.BatchDate
})
});
@ -656,7 +656,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
angular.forEach(model.batchDetails,function (values,key) {
$scope.BatchDetails.push({
"BatchCode":values.BatchCode,
"BatchName":values.BatchName + '-'+ values.BatchCode,
"BatchName":values.BatchName + '('+ values.BatchCode + ')',
"BatchDate":values.BatchDate
})
});
@ -887,16 +887,17 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
var dayDiff = moment().diff(bDate, 'days');
var todatlFineAmt = 0;
var fineAmt1 = 0;
var fineAmt2 = 0;
var fineAmt3 = 0;
var fineAmt4 = 0;
var fineAmt5 = 0;
var fineAmt6 = 0;
var fineAmt7 = 0;
var fineAmt8 = 0;
var fineAmt9 = 0;
var fineAmt10 = 0;
// var fineAmt2 = 0;
// var fineAmt3 = 0;
// var fineAmt4 = 0;
// var fineAmt5 = 0;
// var fineAmt6 = 0;
// var fineAmt7 = 0;
// var fineAmt8 = 0;
// var fineAmt9 = 0;
// var fineAmt10 = 0;
var fineAmt11 = 0;
var countDays = 0;
for (var k = 1; k <= dayDiff; k++) {
if (k <= 90) {
@ -913,7 +914,21 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
}
else if (k > 90) {
else {
countDays = countDays+1;
if (countDays<30) {
if(countDays==1){
fineAmt11 = parseInt(fineAmt11)+300;
}
}
else{
countDays=0;
}
}
/*else if (k > 90) {
if (k > 90 && k <= 120) {
fineAmt2 = 300;
@ -956,10 +971,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
}
}*/
}
todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11);
// todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11);
todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt11);
if(type=='1'){
$scope.setTotalAmount = Math.round(parseInt(totAmt) + parseInt(todatlFineAmt)-parseInt(other));
$scope.setModel.feesType.Others = Math.round(parseInt(todatlFineAmt));
@ -1091,18 +1108,22 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
dayDiff = dayDiff+1;
var todatlFineAmt = 0;
var fineAmt1 = 0;
var fineAmt2 = 0;
var fineAmt3 = 0;
var fineAmt4 = 0;
var fineAmt5 = 0;
var fineAmt6 = 0;
var fineAmt7 = 0;
var fineAmt8 = 0;
var fineAmt9 = 0;
var fineAmt10 = 0;
// var fineAmt2 = 0;
// var fineAmt3 = 0;
// var fineAmt4 = 0;
// var fineAmt5 = 0;
// var fineAmt6 = 0;
// var fineAmt7 = 0;
// var fineAmt8 = 0;
// var fineAmt9 = 0;
// var fineAmt10 = 0;
var fineAmt11 = 0;
var countDays = 0;
for (var k = 1; k <= dayDiff; k++) {
if (k <= 90) {
if (exitPayAmt <= 10000) {
@ -1117,7 +1138,21 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
}
else if (k > 90) {
else {
countDays = countDays+1;
if (countDays<30) {
if(countDays==1){
fineAmt11 = parseInt(fineAmt11)+300;
}
}
else{
countDays=0;
}
}
/* else if (k > 90) {
if (k > 90 && k <= 120) {
fineAmt2 = 300;
@ -1156,14 +1191,28 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
else {
fineAmt11 = 300;
countDays = countDays+1;
if (countDays<30) {
if(countDays==1){
fineAmt11 = parseInt(fineAmt11)+300;
}
// foo++;
}
else{
countDays=0;
}
}
}
}*/
}
todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11);
// todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11);
todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt11);
if(type1=='2'){
$scope.setTotalAmount = Math.round(parseInt(totAmt) -parseInt(other) + parseInt(todatlFineAmt));
$scope.setModel.feesType.Others = Math.round(parseInt(todatlFineAmt));
@ -1245,19 +1294,28 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
/* $scope.$watch('updateMoreItems', function (newValue, oldValue) {
/*
$scope.$watch('updateMoreItems', function (newValue, oldValue) {
for (var i = 0; i < newValue.length; i++) {
if (newValue[i].Amount != oldValue[i].Amount) {
var currentValue=0;
var pastValue=0;
if(newValue[i].Amount>oldValue[i].Amount){
var currentValue = parseInt(newValue[i].Amount)-oldValue[i].Amount;
currentValue = parseInt(newValue[i].Amount)-oldValue[i].Amount;
}
else{
var currentValue = oldValue[i].Amount-parseInt(newValue[i].Amount);
else if(newValue[i].Amount<oldValue[i].Amount){
pastValue = oldValue[i].Amount-parseInt(newValue[i].Amount);
}
else{
currentValue=0
pastValue=0;
}
console.log(currentValue);
console.log(pastValue);
}

View File

@ -428,12 +428,12 @@
<div class="row">
<div class="col-md-4 form-group" ng-class="{'has-error':Form.financeModuleAccess.$dirty && Form.financeModuleAccess.$invalid, 'has-success':Form.financeModuleAccess.$valid && empRoleDetail.FinanceModuleAccess == true}">
<label>
Day Book Access <span ng-if="empRoleDetail.FinanceModuleAccess" class="symbol"></span>
Expenses Access <span ng-if="empRoleDetail.FinanceModuleAccess" class="symbol"></span>
</label>
<div class="checkbox clip-check check-primary">
<input type="checkbox" id="checkbox6" name="financeModuleAccess" ng-model="empRoleDetail.FinanceModuleAccess">
<label for="checkbox6">
Day Book Approval Access
Expenses Approval Access
</label>
</div>
<span ng-if="myModel.finaceModuleAccess" class="success text-small block"></span>