Skip to content

Commit 56db591

Browse files
JustARatherRidiculouslyLongUsernameashwin1111NileshPant1999DhaaraniCITanishfyle
authored
fix: add a default bank account field for CCC expenses (#1114)
* fix: remove validation temporarily (#1111) * fix: add a default bank account field for CCC expenses * fix: add missing options to bank accounts on page init * fix: dynamic content for xero customize settings (#1112) * fix: update sublabel key to avoid build fail (#1116) * fix: Prod fixes of QBD direct (#1118) * fix bugs (#1119) * refactor: capitalization * fix: only ccc exports not being saved (#1121) --------- Co-authored-by: Ashwin Thanaraj <[email protected]> Co-authored-by: Nilesh Pant <[email protected]> Co-authored-by: Dhaarani <[email protected]> Co-authored-by: Anish Kr Singh <[email protected]>
1 parent 9d91a9b commit 56db591

File tree

22 files changed

+124
-66
lines changed

22 files changed

+124
-66
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,5 @@ documentation.json
7676

7777
# Sentry Config File
7878
.sentryclirc
79+
80+
commits.csv

deploy_dump.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if [ -z "$1" ]; then
2+
echo "Usage: sh $0 '2024-12-09'"
3+
exit 1
4+
fi
5+
6+
base_url="https://github.com/fylein/fyle-integrations-app/commit"
7+
branch_name=$(git rev-parse --abbrev-ref HEAD)
8+
9+
git log --since="$1" --pretty=format:"$base_url/%H,%an,%ad,%s,$branch_name,integrations-app" > commits.csv
10+
11+
open commits.csv

src/app/branding/c1-branding-config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ export const c1KbArticles: KbArticle[string] = {
128128
IMPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration#h_78e1747002`,
129129
EXPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration#h_eebe5df4b7`,
130130
ADVANCED_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration#h_498f2acc61`,
131-
LANDING: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration`,
132131
CONNECTOR: `${brandingConfig.helpArticleDomain}/en/articles/9081356-generate-credentials-to-connect-with-sage-intacct`,
133-
SKIP_EXPORT: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration`,
134132
HELPER_ARTICLE: `${brandingConfig.helpArticleDomain}/en/articles/7882821-how-to-skip-exporting-specific-expenses-from-fyle-to-sage-intacct`
135133
}
136134
}

src/app/branding/c1-contents-config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ export const c1Contents = {
254254
accountingPeriodSubLabel: 'If the accounting period is closed, the expenses will be exported with a date stamp for the first day of the current open accounting period.',
255255
autoCreateVendorsSubLabel: 'Automatically create a new contact in Xero if an added merchant doesn\'t have a corresponding match.',
256256
customPreferencesLabel: 'Other preferences',
257-
customPreferencesSubLabel: 'Create new records in Xero if no contacts found or the accounting period is closed.'
257+
customPreferencesSubLabel: 'Create new records in Xero if no contacts found or the accounting period is closed.',
258+
memoStructureLabel: 'Set the line-item description field in Xero',
259+
memoStructureSubLabel: 'Choose from a list of available data points that you\'d like to export to the description field in Xero.',
260+
customizeSectionSubLabel: 'Customize the data that you\'d like to export from Expense Management to Xero by choosing which data points need to be exported.'
258261
}
259262
}
260263
},

src/app/branding/fyle-branding-config.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const fyleKbArticles: KbArticle[string] = {
6767
SAGE300: `${brandingConfig.helpArticleDomain}/en/articles/8948413-how-to-set-up-the-fyle-sage-300-cre-integration`,
6868
BUSINESS_CENTRAL: `${brandingConfig.helpArticleDomain}/en/articles/8911018-how-to-configure-the-fyle-dynamics-365-business-central-integration`,
6969
XERO: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration`,
70-
QBD_DIRECT: `${brandingConfig.helpArticleDomain}/en/collections/215867-integrations-with-fyle#quickbooks-desktop`
70+
QBD_DIRECT: `${brandingConfig.helpArticleDomain}/en/articles/10259583-quickbooks-desktop-integration-beta`
7171
},
7272
onboardingArticles: {
7373
INTACCT: {
@@ -126,12 +126,10 @@ export const fyleKbArticles: KbArticle[string] = {
126126
ADVANCED_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/6721333-how-to-set-up-the-fyle-xero-integration#h_d95b791edd`
127127
},
128128
QBD_DIRECT: {
129-
IMPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration#h_85f929716c`,
130-
EXPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration#h_6492c5038d`,
131-
ADVANCED_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration#h_3f6718633c`,
132-
LANDING: `${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration`,
133-
CONNECTOR: `${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration#h_38e0c9bea6`,
134-
SKIP_EXPORT: `${brandingConfig.helpArticleDomain}/en/articles/7882821-how-to-skip-exporting-specific-expenses-from-fyle-to-sage-intacct`,
129+
IMPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/10259583-quickbooks-desktop-integration-beta#h_a170c7d562`,
130+
EXPORT_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/10259583-quickbooks-desktop-integration-beta#h_1366df4107`,
131+
ADVANCED_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/10259583-quickbooks-desktop-integration-beta#h_b3850646c0`,
132+
CONNECTOR: `${brandingConfig.helpArticleDomain}/en/articles/10259583-quickbooks-desktop-integration-beta#h_d3cc42849a`,
135133
HELPER_ARTICLE: `${brandingConfig.helpArticleDomain}/en/articles/7882821-how-to-skip-exporting-specific-expenses-from-fyle-to-sage-intacct`
136134
}
137135
}

src/app/branding/fyle-contents-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ export const fyleContents = {
250250
topLevelMemoStructureSubLabel: 'Select the datapoints you\'d like to export to Xero’s top-level memo field when exporting expenses from Fyle.',
251251
memoStructureLabel: 'Customize the Line-Item Level Memo Field',
252252
memoStructureSubLabel: 'Select the datapoints you\'d like to export to Xero\’s line-item level memo field when exporting expenses from Fyle.',
253+
customizeSectionSubLabel: 'In this section, you can customize the data that you\'d like to export from ' + brandingConfig.brandName + ' to Xero. You can choose what data points need to be exported and what shouldn\'t be.',
253254
frequencySubLabel: 'Set a frequency based on how often you want your expenses in Fyle to be exported to Xero.',
254255
customPreferencesLabel: 'Other Preferences',
255256
customPreferencesSubLabel: 'Based on your preference, you can choose whether you want to create any new records in Xero from ' + brandingConfig.brandName + '. (when there is no employee record found, or when the accounting period is closed)',

src/app/core/models/branding/content-configuration.model.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ export type ContentConfiguration = {
248248
scheduleSubLabel: string;
249249
accountingPeriodSubLabel: string;
250250
autoCreateVendorsSubLabel: string;
251+
memoStructureLabel: string;
252+
memoStructureSubLabel: string;
253+
customizeSectionSubLabel: string;
251254
frequencySubLabel: string;
252255
}
253256
},

src/app/core/models/branding/kb-article.model.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export type KbArticle = {
1717
IMPORT_SETTING: string;
1818
EXPORT_SETTING: string;
1919
ADVANCED_SETTING: string;
20-
LANDING: string;
2120
CONNECTOR: string;
22-
SKIP_EXPORT: string;
2321
HELPER_ARTICLE: string;
2422
},
2523
INTACCT: {

src/app/core/models/business-central/business-central-configuration/business-central-export-setting.model.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export type BusinessCentralExportSetting = {
1515
credit_card_expense_date: ExportDateType,
1616
default_bank_account_name: string,
1717
default_bank_account_id: string,
18+
default_ccc_bank_account_name: string,
19+
default_ccc_bank_account_id: string,
1820
name_in_journal_entry: string,
1921
employee_field_mapping: string,
2022
auto_map_employees: string,
@@ -184,6 +186,7 @@ export class BusinessCentralExportSettingModel {
184186
cccExportDate: new FormControl(exportSettings?.credit_card_expense_date ? exportSettings?.credit_card_expense_date.toLowerCase() : null),
185187
cccExportGroup: new FormControl(exportSettings?.credit_card_expense_grouped_by ? exportSettings?.credit_card_expense_grouped_by: null),
186188
defaultBankName: new FormControl(exportSettings?.default_bank_account_name ? findObjectByDestinationId(accounts, exportSettings?.default_bank_account_id) : null),
189+
cccDefaultBankName: new FormControl(exportSettings?.default_ccc_bank_account_name ? findObjectByDestinationId(accounts, exportSettings?.default_ccc_bank_account_id) : null),
187190
reimbursableEmployeeMapping: new FormControl(exportSettings?.employee_field_mapping ? exportSettings?.employee_field_mapping : null, Validators.required),
188191
journalEntryNamePreference: new FormControl(exportSettings?.name_in_journal_entry ? exportSettings?.name_in_journal_entry : null),
189192
autoMapEmployee: new FormControl(exportSettings?.auto_map_employees ? exportSettings?.auto_map_employees : null),
@@ -204,6 +207,8 @@ export class BusinessCentralExportSettingModel {
204207
credit_card_expense_date: exportSettingsForm.get('cccExportDate')?.value ? exportSettingsForm.get('cccExportDate')?.value.toUpperCase() : null,
205208
default_bank_account_name: exportSettingsForm.get('defaultBankName')?.value ? exportSettingsForm.get('defaultBankName')?.value.value : null,
206209
default_bank_account_id: exportSettingsForm.get('defaultBankName')?.value ? exportSettingsForm.get('defaultBankName')?.value.destination_id : null,
210+
default_ccc_bank_account_name: exportSettingsForm.get('cccDefaultBankName')?.value ? exportSettingsForm.get('cccDefaultBankName')?.value.value : null,
211+
default_ccc_bank_account_id: exportSettingsForm.get('cccDefaultBankName')?.value ? exportSettingsForm.get('cccDefaultBankName')?.value.destination_id : null,
207212
name_in_journal_entry: exportSettingsForm.get('journalEntryNamePreference')?.value ? exportSettingsForm.get('journalEntryNamePreference')?.value : null,
208213
employee_field_mapping: exportSettingsForm.get('reimbursableEmployeeMapping')?.value ? exportSettingsForm.get('reimbursableEmployeeMapping')?.value : null,
209214
auto_map_employees: exportSettingsForm.get('autoMapEmployee')?.value ? exportSettingsForm.get('autoMapEmployee')?.value : null,

src/app/core/models/common/advanced-settings.model.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { FormControl, FormGroup } from "@angular/forms";
2-
import { JoinOption, Operator } from "../enum/enum.model";
2+
import { AppName, JoinOption, Operator } from "../enum/enum.model";
33
import { environment } from "src/environments/environment";
44
import { ExportSettingGet } from "../intacct/intacct-configuration/export-settings.model";
55
import { QBOExportSettingGet } from "../qbo/qbo-configuration/qbo-export-setting.model";
66
import { NetSuiteExportSettingGet } from "../netsuite/netsuite-configuration/netsuite-export-setting.model";
7+
import { IntacctConfiguration } from "../db/configuration.model";
78

89
export type EmailOption = {
910
email: string;
@@ -75,17 +76,19 @@ export class AdvancedSettingsModel {
7576
return ['employee_email', 'employee_name', 'merchant', 'purpose', 'category', 'spent_on', 'report_number', 'expense_link', 'card_number'];
7677
}
7778

78-
static getMemoOptions(exportSettings: ExportSettingGet | NetSuiteExportSettingGet | QBOExportSettingGet, appName: string): string[] {
79+
static getMemoOptions(exportSettings: IntacctConfiguration | ExportSettingGet | NetSuiteExportSettingGet | QBOExportSettingGet, appName: string): string[] {
7980
const defaultOptions = this.getDefaultMemoOptions();
8081
let cccExportType: string | undefined;
8182
// Handle both configurations and configuration properties
82-
if ('configurations' in exportSettings) {
83+
if (appName === AppName.INTACCT) {
84+
cccExportType = (exportSettings as IntacctConfiguration).corporate_credit_card_expenses_object ?? undefined;
85+
} else if ('configurations' in exportSettings) {
8386
cccExportType = exportSettings.configurations?.corporate_credit_card_expenses_object ?? undefined;
8487
} else if ('workspace_general_settings' in exportSettings) {
8588
cccExportType = exportSettings.workspace_general_settings?.corporate_credit_card_expenses_object ?? undefined;
8689
}
8790
// Filter out options based on cccExportType and appName
88-
if (cccExportType && ['netsuite', 'qbo', 'sage intacct'].includes(appName.toLowerCase())) {
91+
if (cccExportType && ['netsuite', 'quickbooks online', 'sage intacct'].includes(appName.toLowerCase())) {
8992
return defaultOptions; // Allow all options including 'card_number'
9093
}
9194
return defaultOptions.filter(option => option !== 'card_number'); // Omit 'card_number' for other apps

0 commit comments

Comments
 (0)