Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
remove Credit Card Expense Account dropdown from the dialog box (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
NileshPant1999 authored Jul 24, 2023
1 parent 1b3864c commit 741f518
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,6 @@ <h2 mat-dialog-title>
Please enter a valid value
</mat-error>
</mat-form-field>

<div class="mat-body-strong" *ngIf="showSeparateCCCField()">
<strong class="mappings-dialog--label">
Credit Card Expense Account
</strong>
</div>
<mat-form-field class="mappings-dialog--field" appearance="outline" *ngIf="showSeparateCCCField()">
<input type="text" formControlName="sageIntacctAccount" placeholder="Choose Sage Intacct account" matInput
[matAutocomplete]="siAc" [errorStateMatcher]="matcher">
<mat-autocomplete #siAc="matAutocomplete" [displayWith]="mappingDisplay">
<mat-option *ngFor="let option of sageIntacctAccountOptions" [value]="option">
{{option.value}}
</mat-option>
</mat-autocomplete>
<mat-error class="mappings-dialog--error" *ngIf="form.controls.sageIntacctAccount.hasError('forbiddenOption')">
Please enter a valid value
</mat-error>
</mat-form-field>

</div>
</form>
</mat-dialog-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class CategoryMappingsDialogComponent implements OnInit {
attributes.push('EXPENSE_TYPE');
}

if (that.configuration.reimbursable_expenses_object !== 'EXPENSE_REPORT' || (that.showSeparateCCCField() && that.configuration.corporate_credit_card_expenses_object !== 'EXPENSE_REPORT')) {
if (that.configuration.reimbursable_expenses_object && that.configuration.corporate_credit_card_expenses_object !== 'EXPENSE_REPORT') {
attributes.push('ACCOUNT');
}
return attributes;
Expand Down Expand Up @@ -191,15 +191,6 @@ export class CategoryMappingsDialogComponent implements OnInit {
});
}

showSeparateCCCField() {
const that = this;
const settings = that.configuration;
if (settings.corporate_credit_card_expenses_object && settings.corporate_credit_card_expenses_object !== 'EXPENSE_REPORT' && !(settings.reimbursable_expenses_object === 'BILL' || settings.reimbursable_expenses_object === 'JOURNAL_ENTRY' )) {
return true;
}

return false;
}

ngOnInit() {
const that = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>

<div class="expense-fields--border expense-fields--form">

<div class="expense-fields--form">
<div class="expense-fields--heading">Select Type Field Mapping</div>
</div>
Expand Down

0 comments on commit 741f518

Please sign in to comment.