daybook changes : kdk

This commit is contained in:
dineshkumarkannan 2018-04-18 10:03:40 +05:30
parent 3b14b367a3
commit 60aa1a5bb8
2 changed files with 12 additions and 1 deletions

View File

@ -309,6 +309,15 @@ class DayBook_model extends CI_Model
// add dayBook
public function add_dayBook($Arr)
{
$voucherNo = $Arr['VoucherNumber'];
$sqlCheck = "SELECT * FROM ".DAYBOOKMASTER." 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 ".DAYBOOKMASTER." WHERE BranchCode = '$branch'
ORDER BY ID DESC
@ -341,6 +350,8 @@ class DayBook_model extends CI_Model
$result['addDayBookStatus'] = false;
$result['message'] = "Something went wrong.please try again";
}
}
return $result;
}

View File

@ -152,7 +152,7 @@
<td class="center" ng-if="p.ListName == 'Income' ">
<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="deleteFeePayableEntry(p.ID)"></i>
<!--<i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleteFeePayableEntry(p.ID)"></i> -->
</span>
</td>
<td class="center" ng-if="p.Status == 'Pending'">