Skip to content

Conversation

@vignesh05904
Copy link
Contributor

@vignesh05904 vignesh05904 commented Jul 5, 2025

Description

Export settings page bug fixes for intacct & netsuite

Bug 1
set JE as reimburse, cc as bill, save, now update je to bill, save is disabled - some mandatory field is not showing up

Bug 2
bill in reimburse, ccc when select je, employee field mapping is becoming editable - it should not be

Bug 3
Selected Reimbursable as BILL and able to select CCC export type as EXPENSE REPORT

Clickup

https://app.clickup.com/

Summary by CodeRabbit

  • Bug Fixes

    • Improved form validation and control behavior in export settings for Intacct and NetSuite integrations, ensuring fields are correctly enabled, disabled, or required based on export type selections.
    • Credit card export type options are now dynamically updated when the reimbursable export type is set to "Bill," preventing selection of incompatible options.
  • Tests

    • Updated test cases to reflect changes in form control states for export type scenarios.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 5, 2025

Walkthrough

The updates modify the form control logic for export settings in the Intacct and NetSuite integration components. They refine how form fields are validated, enabled, disabled, and reset based on user export type selections, and adjust the filtering of export type options. Related test cases are updated for the new control state expectations.

Changes

File(s) Change Summary
src/app/integrations/intacct/intacct-shared/intacct-export-settings/intacct-export-settings.component.ts Refined form control logic: removed glAccount clearing, adjusted required/disabled states, and filtered options.
src/app/integrations/netsuite/netsuite-shared/netsuite-export-settings/netsuite-export-settings.component.ts Modified reimbursable export type watcher to handle BILL case independently and filter credit card export types.
src/app/integrations/intacct/intacct-shared/intacct-export-settings/intacct-export-settings.component.spec.ts Updated test to expect employeeFieldMapping control to be disabled for JOURNAL_ENTRY cccExportType.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ExportSettingsComponent
    participant FormControls

    User->>ExportSettingsComponent: Selects reimbursable export type
    ExportSettingsComponent->>FormControls: Update validators and enabled/disabled states
    alt Export type is BILL
        ExportSettingsComponent->>FormControls: Set glAccount required, disable employeeFieldMapping, set to VENDOR
        ExportSettingsComponent->>FormControls: Filter credit card export types (exclude EXPENSE_REPORT)
        ExportSettingsComponent->>FormControls: If cccExportType is EXPENSE_REPORT, reset to null
    else Export type is not BILL
        ExportSettingsComponent->>FormControls: Reset credit card export types to full set
    end

    User->>ExportSettingsComponent: Selects credit card export type
    ExportSettingsComponent->>FormControls: Update validators and enabled/disabled states
Loading

Poem

In the warren of forms, a rabbit tweaks,
Controls hop and skip as the user speaks.
Fields now required, some softly rest,
Export types filtered, only the best.
Tests are updated, the logic is neat—
Settings refined, a burrow complete! 🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-18T14_46_26_147Z-debug-0.log


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36fb32a and 8e5b031.

📒 Files selected for processing (1)
  • src/app/integrations/intacct/intacct-shared/intacct-export-settings/intacct-export-settings.component.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/app/integrations/intacct/intacct-shared/intacct-export-settings/intacct-export-settings.component.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor BugBot
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the size/S Small PR label Jul 5, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@vignesh05904 vignesh05904 requested a review from ashwin1111 July 8, 2025 06:47
[exportTypeIconPathArray]="previewImagePaths">
</app-configuration-select-field>
<div *ngIf="exportSettingsForm.get('reimbursableExportType')?.value===IntacctReimbursableExpensesObject.JOURNAL_ENTRY">
<div *ngIf="exportSettingsForm.get('reimbursableExportType')?.value===IntacctReimbursableExpensesObject.JOURNAL_ENTRY || exportSettingsForm.get('reimbursableExportType')?.value===IntacctReimbursableExpensesObject.BILL">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the save button getting disabled is a problem with netsuite, not Intacct. This field has to be shown only for JE

@github-actions
Copy link

Unit Test Coverage % values
Statements 32.85% ( 4462 / 13580 )
Branches 24.62% ( 1184 / 4809 )
Functions 25.72% ( 936 / 3638 )
Lines 32.96% ( 4382 / 13291 )

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link

🔁 Code Duplication Report - Angular

Format Files analyzed Total lines Total tokens Clones found Duplicated lines Duplicated tokens
typescript 723 50549 461658 310 5103 (10.10%) 48301 (10.46%) -0.01% 🚀
scss 64 4181 21661 7 144 (3.44%) 738 (3.41%)
markup 295 12725 134542 158 1631 (12.82%) 14493 (10.77%)
python 4 727 5680 3 32 (4.40%) 368 (6.48%)
yaml 3 155 905 0 0 (0.00%) 0 (0.00%)
javascript 4 193 2175 0 0 (0.00%) 0 (0.00%)
markdown 2 96 366 0 0 (0.00%) 0 (0.00%)
bash 2 66 762 0 0 (0.00%) 0 (0.00%)
Total: 1097 68692 627749 478 6910 (10.06%) 63900 (10.18%)

📊 No significant change in code duplication.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: GL Account Retains Value Across Export Types

The removal of setValue(null) for the glAccount field causes it to retain its value when the reimbursable export type is switched away from JOURNAL_ENTRY. As glAccount is only relevant for JOURNAL_ENTRY exports, this leaves an irrelevant value in the field, creating an inconsistent form state and potentially saving stale data.

src/app/integrations/intacct/intacct-shared/intacct-export-settings/intacct-export-settings.component.ts#L296-L299

this.exportSettingsForm.controls.employeeFieldMapping.enable();
} else {
this.exportSettingsForm.controls.glAccount.clearValidators();
}

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR

Development

Successfully merging this pull request may close these issues.

2 participants