Skip to content

Commit

Permalink
Export merchant as vendor in journal line item (#516)
Browse files Browse the repository at this point in the history
* Export Merchant as Journal Entry Line Item

* comment resolved

* Revert "Export Merchant as Journal Entry Line Item (#478)"

This reverts commit 0f312d1.

* Export merchant as vendor in Journal Line Item

* reverted code

* font size on condition

* resolved comment
  • Loading branch information
Ashutosh619-sudo authored Feb 6, 2024
1 parent 8b63ff1 commit e152e7a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export type ExportSettingConfiguration = {
employee_field_mapping: string,
auto_map_employees: string,
reimbursable_expenses_object: IntacctReimbursableExpensesObject | null,
corporate_credit_card_expenses_object: CorporateCreditCardExpensesObject | null
corporate_credit_card_expenses_object: CorporateCreditCardExpensesObject | null,
use_merchant_in_journal_line: boolean
}

export type ExportSettingGeneralMapping = {
Expand Down Expand Up @@ -79,7 +80,8 @@ export type ExportSettingOptionSearch = {
reimbursable_expenses_object: getValueOrDefault(exportSettingsForm.get('reimbursableExportType')),
corporate_credit_card_expenses_object: cccExportType,
employee_field_mapping: exportSettingsForm.get('employeeFieldMapping')?.value ? exportSettingsForm.get('employeeFieldMapping')?.value.toUpperCase() : null,
auto_map_employees: getValueOrDefault(exportSettingsForm.get('autoMapEmployees'))
auto_map_employees: getValueOrDefault(exportSettingsForm.get('autoMapEmployees')),
use_merchant_in_journal_line: exportSettingsForm.get('useMerchantInJournalLine')?.value
},
general_mappings: {
default_gl_account: exportSettingsForm.get('glAccount')?.value?.value ? {id: exportSettingsForm.get('glAccount')?.value.destination_id, name: exportSettingsForm.get('glAccount')?.value.value} : emptyDestinationAttribute,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<app-svg-icon [svgSource]="iconPath" [width]="'24px'" [height]="'24px'" [styleClasses]="'tw-text-mandatory-field-color'"></app-svg-icon>
</div>
<div class="tw-max-w-600-px tw-text-pretty">
<h4 [ngClass]="{'tw-text-slightly-normal-text-color': !isSectionHeader}" class="tw-text-16-px !tw-font-500 ">{{ label }}</h4>
<h4 [ngClass]="{'tw-text-slightly-normal-text-color': !isSectionHeader, 'tw-text-14-px': iconPath === 'list', 'tw-text-16-px': iconPath !== 'list' }" class="!tw-font-500">{{label}}</h4>
<h5 class="!tw-text-faded-text-color tw-text-14-px tw-pt-6-px !tw-font-400 !tw-leading-4">
<span [innerHTML]="subLabel"></span>
<a *ngIf="redirectLink"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@
[formControllerName]="'creditCard'"
(searchOptionsDropdown)="searchOptionsDropdown($event)"></app-configuration-select-field>
</div>
<div *ngIf="exportSettingsForm.value.cccExportType === CorporateCreditCardExpensesObject.JOURNAL_ENTRY">
<app-configuration-toggle-field
[form]="exportSettingsForm"
[iconPath]="'list'"
[label]="'Export Merchant data to the Vendor field'"
[subLabel]="'Enabling this option would export the merchant name of each expense to the respective journal entry Vendor field'"
[formControllerName]="'useMerchantInJournalLine'"></app-configuration-toggle-field>
</div>
<div *ngIf="exportSettingsForm.value.cccExportType===CorporateCreditCardExpensesObject.CHARGE_CARD_TRANSACTION">
<app-configuration-select-field
[form]="exportSettingsForm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ export class ConfigurationExportSettingsComponent implements OnInit {
cccExpensePaymentType: [findObjectById(this.destinationOptions.CCC_EXPENSE_PAYMENT_TYPE, generalMappings?.default_ccc_expense_payment_type.id)],
creditCardVendor: [findObjectById(this.destinationOptions.VENDOR, generalMappings?.default_ccc_vendor.id)],
creditCard: [findObjectById(this.destinationOptions.ACCOUNT, generalMappings?.default_credit_card.id)],
chargeCard: [findObjectById(this.destinationOptions.CHARGE_CARD, generalMappings?.default_charge_card.id)]
chargeCard: [findObjectById(this.destinationOptions.CHARGE_CARD, generalMappings?.default_charge_card.id)],
useMerchantInJournalLine: [configurations?.use_merchant_in_journal_line]
});

this.exportFieldsWatcher();
Expand Down

0 comments on commit e152e7a

Please sign in to comment.