Skip to content

Commit

Permalink
intacct remove expense_type from code prepend array (#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT authored and Hrishabh17 committed Sep 26, 2024
1 parent 73ef0ab commit 7b328b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class IntacctBaseMappingComponent implements OnInit {

cccExpenseObject: IntacctCorporateCreditCardExpensesObject | null;

acceptedCodeField: string[] = [SageIntacctField.ACCOUNT, SageIntacctField.DEPARTMENT, MappingSourceField.PROJECT, IntacctCategoryDestination.EXPENSE_TYPE];
acceptedCodeField: string[] = [SageIntacctField.ACCOUNT, SageIntacctField.DEPARTMENT, MappingSourceField.PROJECT];

brandingConfig = brandingConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class IntacctImportSettingsComponent implements OnInit {

importCodeField: FormGroup[] = [];

acceptedImportCodeField: string[] = [SageIntacctField.ACCOUNT, SageIntacctField.DEPARTMENT, MappingSourceField.PROJECT, IntacctCategoryDestination.EXPENSE_TYPE];
acceptedImportCodeField: string[] = [SageIntacctField.ACCOUNT, SageIntacctField.DEPARTMENT, MappingSourceField.PROJECT];

existingFields: string[] = ['employee id', 'organisation name', 'employee name', 'employee email', 'expense date', 'expense date', 'expense id', 'report id', 'employee id', 'department', 'state', 'reporter', 'report', 'purpose', 'vendor', 'category', 'category code', 'mileage distance', 'mileage unit', 'flight from city', 'flight to city', 'flight from date', 'flight to date', 'flight from class', 'flight to class', 'hotel checkin', 'hotel checkout', 'hotel location', 'hotel breakfast', 'currency', 'amount', 'foreign currency', 'foreign amount', 'tax', 'approver', 'project', 'billable', 'cost center', 'cost center code', 'approved on', 'reimbursable', 'receipts', 'paid date', 'expense created date'];

Expand All @@ -114,18 +114,6 @@ export class IntacctImportSettingsComponent implements OnInit {
subLabel: 'Example: Meals & Entertainment'
}
],
"EXPENSE_TYPE": [
{
label: 'Import Codes + Names',
value: true,
subLabel: 'Example: 4567: Meals & Entertainment'
},
{
label: 'Import Names only',
value: false,
subLabel: 'Example: Meals & Entertainment'
}
],
"DEPARTMENT": [
{
label: 'Import Codes + Names',
Expand Down Expand Up @@ -182,7 +170,7 @@ export class IntacctImportSettingsComponent implements OnInit {
sourceField = IntacctCategoryDestination.ACCOUNT;
}

if (event.checked && this.acceptedImportCodeField.includes(sourceField)) {
if (event.checked && this.acceptedImportCodeField.includes(sourceField) && this.intacctImportCodeConfig[sourceField]) {
// Create a new FormGroup
const value = this.formBuilder.group({
source_field: [sourceField],
Expand Down

0 comments on commit 7b328b5

Please sign in to comment.