Skip to content

Commit

Permalink
Sage Intacct : Post Onboarding White Label (#552)
Browse files Browse the repository at this point in the history
* Post Onboarding White Label Base Changes

* module changes wl intacct

* folder renaming changes

* module update 002

* updated onboarding done

* IntacctOnboardingDoneComponent

* Dashboard White Label Intacct - 002 (#553)

* Dashboard Whitelabel Intacct

* intacct dashboard path

* app name and isExportInProgress

* exportableExpenseGroupIds

* var updates

* dashboard code updated

* dashboard shared components layout

* dashboard

* pr comments

* pr comments

* lint fix

* pr comments 2 for Intacct Whitelabel

* IntacctCategoryDestination for Category

* Intacct Whitelabel: Export Log Base - 003 (#597)

* export log base

* completed export log

* skipped export log

* removed unused variables

* pr comments

* pr comment and lint fix

* pr comment

* lint fix

* pr comment for url

* response_logs?.url_id

* lint fix

* Intacct Whitelabel: Mapping Tab Base - 004 (#598)

* Mapping Base: Intacct WL

* minor fixes for IntacctMappingModule

* base mapping

* base mapping - 001

* base mapping for WL Intacct

* IntacctBaseMappingComponent

* minor fixes and changes

* minor fixes and rename

* pr comments

* lint fix

* Intacct Whitelabel: Configurations - 005 (#599)

* Intacct WL Config

* changes around renaming intacct main modules

* Minor Fixes Intacct WL (#604)

* Testing Fixes - Intacct C1 White Label (#611)

* Minor Fixes - Testing WL Intacct

* minor fixes

* getConfig

* fix for cross icon svg

* getPaginatedDestinationAttributes

* isLoading fix

* lint fix

* fix for workspaceId

* lint fix

* lint fix

* lint fix

* QA: Testing Fixes - Staging - Intacct Whitelabel (#617)

* fixed mapping options

* lint fix

* C1: hideFeatures wrt C1/forIntacct (#619)

* hideFeatures wrt C1

* hide RE for C1

* Import Settings for C1

* import settings c1

* bunch of fixes for intacct C1

* expense report options, for c1

* lint fix

* c1 Import Settings (#621)

* c1 Import Settings

* fixes

* displayName

* fix for export trigger

* Intacct c1 import settings (#622)

* importVendorAsMerchant for C1

* emailNotification

* useMerchantInJournalLine

* hdie features

* FeatureConfiguration

* C1 Intacct Whitelabel : sentence case - 003 (#624)

* sentence case

* Sage Intacct appDesc

* models

* sentence case 001

* export setting commits for sentence cases

* onboarding done

* advanced settings

* brandingFeatureConfig

* lint fix

* stepper name

* appName

* lint fix

* subLabel

* Credit Card expenses

* lint fix

* fix c1 intacct bugs (#623)

* fix c1 intacct bugs

* few more fixes

* fix url

* fix accounting url

* fix lint

* fix

* fix

* fix view dialog

* fix view dialog

* fix view dialog

* hide

* fix

* fix stat

* few more fixes

---------

Co-authored-by: Ashwin Thanaraj <[email protected]>

---------

Co-authored-by: Ashwin Thanaraj <[email protected]>
Co-authored-by: ashwin1111 <[email protected]>
  • Loading branch information
3 people authored Mar 5, 2024
1 parent e79230c commit 68821f4
Show file tree
Hide file tree
Showing 143 changed files with 2,038 additions and 3,219 deletions.
117 changes: 114 additions & 3 deletions src/app/branding/branding-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const featureConfigs: FeatureConfiguration = {
mapEmployees: true,
exportSettings: {
reimbursableExpenses: true,
nameInJournalEntry: true
nameInJournalEntry: true,
useMerchantInJournalLine: false
},
importSettings: {
tax: true,
Expand Down Expand Up @@ -53,7 +54,8 @@ const featureConfigs: FeatureConfiguration = {
mapEmployees: false,
exportSettings: {
reimbursableExpenses: false,
nameInJournalEntry: false
nameInJournalEntry: false,
useMerchantInJournalLine: false
},
importSettings: {
tax: false,
Expand Down Expand Up @@ -203,6 +205,61 @@ export const brandingDemoVideoLinks = demoVideoLinks[brandingConfig.brandId];

const content: ContentConfiguration = {
fyle: {
intacct: {
landing: {
contentText: 'Import data from Sage Intacct to ' + brandingConfig.brandName + ' and Export expenses from ' + brandingConfig.brandName + ' to Sage Intacct. ',
guideHeaderText: 'Guide to setup your Integrations'
},
common: {
readMoreText: 'Read More',
exportLogTabName: 'Export Log',
viewExpenseText: 'View Expense',
corporateCard: 'Corporate Card',
errors: 'Errors',
autoMap: 'Auto Map',
customField: 'Add new Custom Field',
customFieldName: 'Field Name',
customFieldPlaceholderName: 'Placeholder Name',
customFieldType: 'Field Type',
customFieldCreateandSave: 'Create and save'
},
configuration: {
connector: {
stepName: 'Connect to Sage Intacct',
subLabel: 'Expenses will be posted to the Sage Intacct Location entity selected here. Once configured, you can not change ' + brandingConfig.brandName + ' Organization or Location Entity.'
},
exportSetting: {
stepName: 'Export Settings',
headerText: '',
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 Sage Intacct.',
corporateCard: {
cccExpensePaymentType: 'Set the Default Expense Payment Type as?',
cccExpensePaymentTypeSubLabel: 'The selected Expense Payment Type will be added to the Corporate credit card expenses exported from ' + brandingConfig.brandName + ' to Sage Intacct.',
creditCardVendor: 'Set the Default Credit Card Vendor as',
creditCardVendorSublabel: 'The vendor configured here will be added to all the Credit Card expenses exported as Bills.',
chargeCard: 'Set the Default Charge Card',
chargeCardSublabel: 'Expenses of Corporate Cards in ' + brandingConfig.brandName + ' that are not mapped to their respective cards in Sage Intacct will be posted to the Card configured here. You can map your cards in the Mapping section after configuring the integration.',
cccExpenseState: 'You can export expenses either when they are awaiting closure after approval (Approved) or when the transaction has been settled (Closed)',
cccExportGroup: 'Expenses can either be exported as single line items (Expense) or as a grouped report with multiple line items (Report)',
employeeFieldMapping: 'How are your Employees represented in Sage Intacct?'
}
},
advancedSettings: {
stepName: 'Advanced Settings',
scheduleAutoExport: 'Schedule Automatic Export',
email: 'Send Error Notification to',
autoSyncPayments: 'Auto-Sync Payment Status for Reimbursable Expenses',
defaultPaymentAccount: 'Select Payment Account',
autoCreateEmployeeVendor: 'Auto-Create ',
postEntriesCurrentPeriod: 'Post Entries in the Current Accounting Period',
setDescriptionField: 'Set the Description Field in Sage Intacct'
},
done: {
ctaText: '',
hintText: ''
}
}
},
configuration: {
connector: {
stepName: 'Connect to Quickbooks Online'
Expand Down Expand Up @@ -309,6 +366,61 @@ const content: ContentConfiguration = {
}
},
co: {
intacct: {
landing: {
contentText: 'Import data from Sage Intacct to ' + brandingConfig.brandName + ' and export expenses from ' + brandingConfig.brandName + ' to Sage Intacct. ',
guideHeaderText: 'Guide to setup your integrations'
},
common: {
readMoreText: 'Read more',
exportLogTabName: 'Export log',
viewExpenseText: 'View expense',
corporateCard: 'Corporate card',
errors: 'errors',
autoMap: 'Auto map',
customField: 'Add new custom field',
customFieldName: 'Field name',
customFieldPlaceholderName: 'Placeholder name',
customFieldType: 'Field type',
customFieldCreateandSave: 'Create and save'
},
configuration: {
connector: {
stepName: 'Connect to Sage Intacct',
subLabel: 'Expenses will be posted to the Sage Intacct location entity selected here. Once configured, you can not change ' + brandingConfig.brandName + ' organization or location entity.'
},
exportSetting: {
stepName: 'Export settings',
headerText: '',
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 Sage Intacct.',
corporateCard: {
cccExpensePaymentType: 'Set the default expense payment type as?',
cccExpensePaymentTypeSubLabel: 'The selected expense payment type will be added to the corporate credit card expenses exported from ' + brandingConfig.brandName + ' to Sage Intacct.',
creditCardVendor: 'Set the Default Credit Card Vendor as',
creditCardVendorSublabel: 'The vendor configured here will be added to all the credit card expenses exported as bills.',
chargeCard: 'Set the default charge card',
chargeCardSublabel: 'Expenses of corporate cards in ' + brandingConfig.brandName + ' that are not mapped to their respective cards in Sage Intacct will be posted to the card configured here. You can map your cards in the mapping section after configuring the integration.',
cccExpenseState: 'You can export expenses either when they are awaiting closure after approval (approved) or when the transaction has been settled (closed)',
cccExportGroup: 'Expenses can either be exported as single line items (expense) or as a grouped report with multiple line items (report)',
employeeFieldMapping: 'How are your employees represented in Sage Intacct?'
}
},
advancedSettings: {
stepName: 'Advanced settings',
scheduleAutoExport: 'Schedule automatic export',
email: 'Send error notification to',
autoSyncPayments: 'Auto-sync payment status for reimbursable expenses',
defaultPaymentAccount: 'Select payment account',
autoCreateEmployeeVendor: 'Auto-create ',
postEntriesCurrentPeriod: 'Post entries in the current accounting period',
setDescriptionField: 'Set the description field in Sage Intacct'
},
done: {
ctaText: '',
hintText: ''
}
}
},
configuration: {
connector: {
stepName: 'Connect to Quickbooks Online'
Expand Down Expand Up @@ -412,7 +524,6 @@ const content: ContentConfiguration = {
customFieldPlaceholderName: 'Placeholder name',
customFieldType: 'Field type',
customFieldCreateandSave: 'Create and save'

}
}
};
Expand Down
55 changes: 55 additions & 0 deletions src/app/core/models/branding/content-configuration.model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,60 @@
export type ContentConfiguration = {
[brandingId: string]: {
intacct : {
landing: {
contentText: string;
guideHeaderText: string;
},
common: {
readMoreText: string;
exportLogTabName: string;
viewExpenseText: string;
corporateCard: string;
errors: string;
autoMap: string;
customField: string;
customFieldName: string;
customFieldPlaceholderName: string;
customFieldType: string;
customFieldCreateandSave: string;
},
configuration: {
connector: {
stepName: string;
subLabel: string;
},
exportSetting: {
stepName: string;
headerText: string;
contentText: string;
corporateCard: {
cccExpensePaymentType: string;
cccExpensePaymentTypeSubLabel: string;
creditCardVendor: string;
creditCardVendorSublabel: string;
chargeCard: string;
chargeCardSublabel: string;
cccExpenseState: string;
cccExportGroup: string;
employeeFieldMapping: string;
}
},
advancedSettings: {
stepName: string;
scheduleAutoExport: string;
email: string;
autoSyncPayments: string;
defaultPaymentAccount: string;
autoCreateEmployeeVendor: string;
postEntriesCurrentPeriod: string;
setDescriptionField: string;
},
done: {
ctaText: string;
hintText: string;
}
},
}
configuration: {
connector: {
stepName: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type FeatureConfiguration = {
exportSettings: {
reimbursableExpenses: boolean;
nameInJournalEntry: boolean;
useMerchantInJournalLine: boolean;
},
importSettings: {
tax: boolean;
Expand Down
40 changes: 39 additions & 1 deletion src/app/core/models/common/export-settings.model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DefaultDestinationAttribute, DestinationAttribute } from "../db/destination-attribute.model";
import { ExpenseGroupingFieldOption } from "../enum/enum.model";
import { ExpenseGroupingFieldOption, IntacctCorporateCreditCardExpensesObject, IntacctReimbursableExpensesObject } from "../enum/enum.model";

export type ExportSettingValidatorRule = {
reimbursableExpense: string[];
Expand Down Expand Up @@ -28,4 +28,42 @@ export class ExportSettingModel {
id: destinationAttribute.destination_id
};
}

static constructCCCOptions(brandId: string) {
if (brandId === 'fyle') {
return [
{
label: 'Bill',
value: IntacctReimbursableExpensesObject.BILL
},
{
label: 'Expense Report',
value: IntacctReimbursableExpensesObject.EXPENSE_REPORT
},
{
label: 'Journal Entry',
value: IntacctCorporateCreditCardExpensesObject.JOURNAL_ENTRY
},
{
label: 'Charge Card Transaction',
value: IntacctCorporateCreditCardExpensesObject.CHARGE_CARD_TRANSACTION
}
];
}
return [
{
label: 'Bill',
value: IntacctReimbursableExpensesObject.BILL
},
{
label: 'Journal Entry',
value: IntacctCorporateCreditCardExpensesObject.JOURNAL_ENTRY
},
{
label: 'Charge Card Transaction',
value: IntacctCorporateCreditCardExpensesObject.CHARGE_CARD_TRANSACTION
}
];

}
}
49 changes: 34 additions & 15 deletions src/app/core/models/db/accounting-export.model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SnakeCaseToSpaceCasePipe } from "src/app/shared/pipes/snake-case-to-space-case.pipe";
import { AccountingExportStatus, AccountingExportType, FundSource, FyleReferenceType } from "../enum/enum.model";
import { AccountingExportStatus, AccountingExportType, AppName, FundSource, FyleReferenceType } from "../enum/enum.model";
import { ExpenseGroupDescription, SkipExportList, SkipExportLog } from "../intacct/db/expense-group.model";
import { Expense } from "../intacct/db/expense.model";
import { TitleCasePipe } from "@angular/common";
Expand Down Expand Up @@ -205,22 +205,41 @@ export class AccountingExportModel {
return [exportRedirection, exportId, exportType];
}

static parseExpenseGroupAPIResponseToExportLog(expenseGroup: ExpenseGroup, org_id: string): AccountingExportList {
const referenceType = AccountingExportModel.getReferenceType(expenseGroup.description);
const referenceNumber = this.getFyleReferenceNumber(referenceType, expenseGroup.expenses[0]);
static constructQBOExportUrlAndType(expenseGroup: ExpenseGroup): [string, string] {
const [exportRedirection, exportId, exportType] = this.generateExportTypeAndId(expenseGroup);
return [`${environment.qbo_app_url}/app/${exportRedirection}?txnId=${exportId}`, exportType];
}

const [type, id, exportType] = this.generateExportTypeAndId(expenseGroup);
static constructIntacctExportUrlAndType(expenseGroup: ExpenseGroup): [string, string] {
return [`https://www-p02.intacct.com/ia/acct/ur.phtml?.r=${expenseGroup.response_logs?.url_id}`, expenseGroup.export_type];
}

return {
exportedAt: expenseGroup.exported_at,
employee: [expenseGroup.expenses[0].employee_name, expenseGroup.description.employee_email],
expenseType: expenseGroup.fund_source === FundSource.CCC ? FundSource.CORPORATE_CARD : FundSource.REIMBURSABLE,
referenceNumber: referenceNumber,
exportedAs: exportType,
fyleUrl: this.generateFyleUrl(expenseGroup.expenses[0], referenceType, org_id),
integrationUrl: `${environment.qbo_app_url}/app/${type}?txnId=${id}`,
expenses: expenseGroup.expenses
};
static constructExportUrlAndType(appName: AppName, expenseGroup: ExpenseGroup): [string, string] {
if (appName === AppName.QBO) {
return this.constructQBOExportUrlAndType(expenseGroup);
} else if (appName === AppName.INTACCT) {
return this.constructIntacctExportUrlAndType(expenseGroup);
}

return ['', ''];
}

static parseExpenseGroupAPIResponseToExportLog(expenseGroup: ExpenseGroup, org_id: string, appName: AppName): AccountingExportList {
const referenceType = AccountingExportModel.getReferenceType(expenseGroup.description);
const referenceNumber = this.getFyleReferenceNumber(referenceType, expenseGroup.expenses[0]);

const [url, exportType] = this.constructExportUrlAndType(appName, expenseGroup);

return {
exportedAt: expenseGroup.exported_at,
employee: [expenseGroup.expenses[0].employee_name, expenseGroup.description.employee_email],
expenseType: expenseGroup.fund_source === FundSource.CCC ? FundSource.CORPORATE_CARD : FundSource.REIMBURSABLE,
referenceNumber: referenceNumber,
exportedAs: exportType,
fyleUrl: this.generateFyleUrl(expenseGroup.expenses[0], referenceType, org_id),
integrationUrl: url,
expenses: expenseGroup.expenses
};
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/core/models/db/configuration.model.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AutoMapEmployeeOptions, CorporateCreditCardExpensesObject, FyleField, IntacctReimbursableExpensesObject } from "../enum/enum.model";
import { AutoMapEmployeeOptions, IntacctCorporateCreditCardExpensesObject, FyleField, IntacctReimbursableExpensesObject } from "../enum/enum.model";

export interface Configuration {
export interface IntacctConfiguration {
id: number;
workspace: number;
employee_field_mapping: FyleField;
reimbursable_expenses_object?: IntacctReimbursableExpensesObject;
corporate_credit_card_expenses_object?: CorporateCreditCardExpensesObject;
corporate_credit_card_expenses_object?: IntacctCorporateCreditCardExpensesObject;
import_projects: boolean;
import_categories: boolean;
sync_fyle_to_sage_intacct_payments: boolean;
Expand Down
6 changes: 5 additions & 1 deletion src/app/core/models/db/expense-group.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ export interface ExpenseGroupResponse extends PaginatedResponse {
export type ExpenseGroupParam = {
limit: number;
offset: number;
tasklog__status: string;
tasklog__status?: string;
exported_at__gte?: string;
exported_at__lte?: string;
state?: string;
exported_at?: string;
start_date?: string;
end_date?: string;
expenses__expense_number?: string;
expenses__employee_name?: string;
expenses__employee_email?: string;
Expand Down
2 changes: 2 additions & 0 deletions src/app/core/models/db/task-log.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ export type TaskLogGetParams = {
status__in?: string[];
expense_group_id__in?: number[];
type__in?: string[];
expense_group_ids?: number[];
task_type?: string[];
};
7 changes: 4 additions & 3 deletions src/app/core/models/enum/enum.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export enum IntegrationView {

export enum IntacctCategoryDestination {
EXPENSE_TYPE = 'EXPENSE_TYPE',
ACCOUNT = 'GL_ACCOUNT'
ACCOUNT = 'ACCOUNT',
GL_ACCOUNT = 'GL_ACCOUNT'
}

export enum AutoMapEmployeeOptions {
Expand Down Expand Up @@ -207,7 +208,7 @@ export enum NameInJournalEntry {
MERCHANT = 'MERCHANT'
}

export enum CorporateCreditCardExpensesObject {
export enum IntacctCorporateCreditCardExpensesObject {
BILL = 'BILL',
JOURNAL_ENTRY = 'JOURNAL_ENTRY',
EXPENSE_REPORT = 'EXPENSE_REPORT',
Expand Down Expand Up @@ -353,7 +354,7 @@ export enum MappingState {
}

export enum AccountingField {
ACCOUNT = 'ACCOUNT',
ACCOUNT = 'ACCOUNT'
}

export enum Sage300Field {
Expand Down
Loading

0 comments on commit 68821f4

Please sign in to comment.