Skip to content

Commit

Permalink
Netsuite CS team finds fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT committed Jun 7, 2024
1 parent 01976f4 commit f5841c8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/branding/fyle-contents-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const fyleContents = {
exportSetting: {
stepName: 'Export Settings',
headerText: ' Export Corporate Card Expenses',
contentText: 'Enable this to export non-reimbursable expenses from ' + brandingConfig.brandName + '. If not enabled, any <b>corporate credit card</b> expenses will not be exported to NetSuite.',
contentText: 'In this section, you can configure how and when the expenses from ' + brandingConfig.brandName + ' can be exported to Netsuite',
corporateCard: {
creditCardExpenseLabel: 'How should the expenses be exported?',
cccExpenseBankAccountSubLabel: 'The selected expense payment type will be added to the corporate credit card expenses exported from ' + brandingConfig.brandName + ' to NetSuite.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4 class="tw-text-form-label-text-color tw-mb-12-px">{{brandingContent.previewD

<div *ngIf="brandingFeatureConfig.featureFlags.advancedSettings.useEmployeeAttributes && workspaceGeneralSettings.employee_field_mapping === 'EMPLOYEE'" class="tw-pl-24-px tw-mt-30-px">
<input formControlName="useEmployeeClass" type="checkbox" />
<label class="tw-pl-8-px" for="checkbox">{{helper.sentenseCaseConversion('Use Employee\'s Department in Class')}}</label>
<label class="tw-pl-8-px" for="checkbox">{{helper.sentenseCaseConversion('Use Employee\'s Department in Netsuite')}}</label>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
[mandatoryErrorListName]="'Employee Payables Account'"
[label]="brandingContent.corporateCard.defaultDebitCardAccountLabel"
[subLabel]="'Post all your company corporate card transactions to a default employee payables account.'"
[placeholder]="'select a employee payables account'"
[placeholder]="'Select a Employee Payables Account'"
[formControllerName]="'bankAccount'">
</app-configuration-select-field>
</div>
Expand All @@ -69,7 +69,7 @@
[mandatoryErrorListName]="'Vendor Payables Account'"
[label]="brandingContent.corporateCard.accountsPayableLabel"
[subLabel]="'Post all your company corporate card transactions to a default vendor payables account.'"
[placeholder]="'Select vendor payable account'"
[placeholder]="'Select Vendor Payable Account'"
[formControllerName]="'accountsPayable'">
</app-configuration-select-field>
</div>
Expand Down Expand Up @@ -192,7 +192,7 @@
[mandatoryErrorListName]="'Vendor Payables Account'"
[label]="brandingContent.corporateCard.accountsPayableLabel"
[subLabel]="'Post all your company corporate card transactions to a default vendor payables account.'"
[placeholder]="'Select vendor payable account'"
[placeholder]="helperService.sentenseCaseConversion('Select Vendor Payable Account')"
[formControllerName]="'accountsPayable'">
</app-configuration-select-field>
</div>
Expand All @@ -207,7 +207,7 @@
[mandatoryErrorListName]="'Employee Payables Account'"
[label]="brandingContent.corporateCard.defaultDebitCardAccountLabel"
[subLabel]="'Post all your company corporate card transactions to a default employee payables account.'"
[placeholder]="'select a employee payables account'"
[placeholder]="helperService.sentenseCaseConversion('Select a Employee Payables Account')"
[formControllerName]="'bankAccount'">
</app-configuration-select-field>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ExportSettingModel } from 'src/app/core/models/common/export-settings.m
import { HelperUtility } from 'src/app/core/models/common/helper.model';
import { SelectFormOption } from 'src/app/core/models/common/select-form-option.model';
import { DefaultDestinationAttribute, DestinationAttribute } from 'src/app/core/models/db/destination-attribute.model';
import { AppName, ConfigurationCta, ConfigurationWarningEvent, EmployeeFieldMapping, ExpenseGroupingFieldOption, FyleField, NameInJournalEntry, NetSuiteCorporateCreditCardExpensesObject, NetsuiteOnboardingState, NetsuiteReimbursableExpensesObject, ToastSeverity } from 'src/app/core/models/enum/enum.model';
import { AppName, ConfigurationCta, ConfigurationWarningEvent, EmployeeFieldMapping, ExpenseGroupingFieldOption, ExportDateType, FyleField, NameInJournalEntry, NetSuiteCorporateCreditCardExpensesObject, NetsuiteOnboardingState, NetsuiteReimbursableExpensesObject, ToastSeverity } from 'src/app/core/models/enum/enum.model';
import { ConfigurationWarningOut } from 'src/app/core/models/misc/configuration-warning.model';
import { NetSuiteExportSettingGet, NetSuiteExportSettingModel } from 'src/app/core/models/netsuite/netsuite-configuration/netsuite-export-setting.model';
import { HelperService } from 'src/app/core/services/common/helper.service';
Expand Down Expand Up @@ -124,6 +124,17 @@ export class NetsuiteExportSettingsComponent implements OnInit {
this.netsuiteHelperServie.refreshNetsuiteDimensions().subscribe();
}

reimbursableExpenseGroupingWatcher() {
if (this.exportSettingForm.controls.reimbursableExportGroup.value === ExpenseGroupingFieldOption.CLAIM_NUMBER) {
this.reimbursableExpenseGroupingDateOptions = this.reimbursableExpenseGroupingDateOptions.filter((date) => date.value !== ExportDateType.SPENT_AT);
}
this.exportSettingForm.controls.reimbursableExportGroup.valueChanges.subscribe((expenseGroup) => {
if (expenseGroup === ExpenseGroupingFieldOption.CLAIM_NUMBER) {
this.reimbursableExpenseGroupingDateOptions = this.reimbursableExpenseGroupingDateOptions.filter((date) => date.value !== ExportDateType.SPENT_AT);
}
});
}

private reimbursableExportTypeWatcher(): void {
this.exportSettingForm.controls.reimbursableExportType.valueChanges.subscribe((isreimbursableExportTypeSelected) => {
if (isreimbursableExportTypeSelected === NetsuiteReimbursableExpensesObject.JOURNAL_ENTRY) {
Expand All @@ -140,6 +151,7 @@ export class NetsuiteExportSettingsComponent implements OnInit {
const [exportSettingValidatorRule, exportModuleRule] = NetSuiteExportSettingModel.getValidators();
this.exportSettingService.setupDynamicValidators(this.exportSettingForm, exportModuleRule[0], NetSuiteCorporateCreditCardExpensesObject.JOURNAL_ENTRY);
});
this.reimbursableExpenseGroupingWatcher();
}

private cccExportTypeWatcher(): void {
Expand Down

0 comments on commit f5841c8

Please sign in to comment.