balance pl
This commit is contained in:
parent
6fd0fdffe2
commit
caea290b64
@ -576,6 +576,9 @@ class DayBook_model extends CI_Model
|
|||||||
// add non operational
|
// add non operational
|
||||||
public function add_NonOperational($Arr)
|
public function add_NonOperational($Arr)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//echo $Arr['Isdaybook'];
|
||||||
|
|
||||||
$voucherNo = $Arr['VoucherNumber'];
|
$voucherNo = $Arr['VoucherNumber'];
|
||||||
$sqlCheck = "SELECT * FROM ".NONOPERATIONAL." WHERE VoucherNumber = '$voucherNo'";
|
$sqlCheck = "SELECT * FROM ".NONOPERATIONAL." WHERE VoucherNumber = '$voucherNo'";
|
||||||
// print_r($this->db->query($sqlCheck));exit();
|
// print_r($this->db->query($sqlCheck));exit();
|
||||||
@ -599,6 +602,9 @@ class DayBook_model extends CI_Model
|
|||||||
}else{
|
}else{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($Arr['Isdaybook']==1)
|
||||||
|
{
|
||||||
if($Arr['Name'] == 'I002') {
|
if($Arr['Name'] == 'I002') {
|
||||||
//Income
|
//Income
|
||||||
$Arr['Balance'] = $prevBalance + $Arr['Amount'];
|
$Arr['Balance'] = $prevBalance + $Arr['Amount'];
|
||||||
@ -609,6 +615,8 @@ class DayBook_model extends CI_Model
|
|||||||
$Arr['Balance'] = 0;
|
$Arr['Balance'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->insert(NONOPERATIONAL, $Arr);
|
$this->db->insert(NONOPERATIONAL, $Arr);
|
||||||
if ($this->db->affected_rows() == '1') {
|
if ($this->db->affected_rows() == '1') {
|
||||||
$result['addDayBookStatus'] = true;
|
$result['addDayBookStatus'] = true;
|
||||||
|
|||||||
@ -551,28 +551,12 @@ $scope.loadStaring = true;
|
|||||||
return val.TypeID === 'I001' ? 1 : 0;
|
return val.TypeID === 'I001' ? 1 : 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.getExpenseTypes = $scope.incomeExpenseName.filter(function (val) {
|
|
||||||
return val.TypeID === 'I003' ? 1 : 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.getExpenseTypes = $scope.incomeExpenseName.filter(function (val) {
|
|
||||||
return val.TypeID === 'I004' ? 1 : 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.getExpenseTypes = $scope.incomeExpenseName.filter(function (val) {
|
|
||||||
return val.TypeID === 'I005' ? 1 : 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.getExpenseTypes = $scope.incomeExpenseName.filter(function (val) {
|
|
||||||
return val.TypeID === 'I006' ? 1 : 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.myModelAdd.type = '';
|
$scope.myModelAdd.type = '';
|
||||||
$scope.getTypes = type === 'I002' ? $scope.getIncomeTypes : $scope.getExpenseTypes;
|
$scope.getTypes = type === 'I002' ? $scope.getIncomeTypes : $scope.getExpenseTypes;
|
||||||
|
|
||||||
|
// console.log($scope.getTypes)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.editId = -1;
|
$scope.editId = -1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user