This commit is contained in:
venbatechnologies@gmail.com 2018-08-11 17:04:39 +05:30
parent 9c6bff597e
commit e5b52e1c59
2 changed files with 20 additions and 4 deletions

View File

@ -208,12 +208,16 @@ $scope.dayBookApprovalAccess = '';
}
$scope.copyModel = function (p) {
console.log(p);
//console.log(p);
var inc = $scope.incomeExpenseType.filter((inc)=>inc.ID == p.Type);
console.log(inc);
$scope.incexp = inc[0];
$scope.myModel = {
"id": p.ID,
"date": p.Date,
"incomeExpense": p.Name,
"type": p.Type,
"type":$scope.incexp.ID,
"amount": p.Amount,
"status": p.Status,
"description": p.Description,

View File

@ -254,12 +254,24 @@
<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> -->
<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}}">
<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>
</select>
<span class="error text-small block" ng-if="Form.editType.$dirty && Form.editType.$error.required">Type is Required</span>
</div>