Skip to content

[$250] Tax - Split scan - Selected rate from confirmation page does not show up in split detail view #42643

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.76-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Issue found when executing PR #40240

Action Performed:

Precondition:

  • Workspace is tax-enabled
  1. Go to staging.new.expensify.com
  2. Go to workspace chat
  3. Go to + > Split expense > Scan
  4. Upload a receipt
  5. On confirmation page, click Tax rate
  6. Select any rate
  7. Click Split expense
  8. Click on the split preview

Expected Result:

The selected tax rate will show up in Tax rate row in split details view

Actual Result:

The selected tax rate does not show up in Tax rate row in split details view. The row is empty

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6493028_1716822433879.20240527_230419.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016b6987c10090fc2e
  • Upwork Job ID: 1795297947813523456
  • Last Price Increase: 2024-05-28
Issue OwnerCurrent Issue Owner: @DylanDylann

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 27, 2024
  2. melvin-bot commented on May 27, 2024

    @melvin-bot

    Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. lanitochka17 commented on May 27, 2024

    @lanitochka17
    Author

    @kadiealexander FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  4. lanitochka17 commented on May 27, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-split

  5. dragnoir commented on May 27, 2024

    @dragnoir
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Split scan - Selected rate from confirmation page does not show up in split detail view

    What is the root cause of that problem?

    On a Workspace, when we split an expense, we go throw this function

    IOU.startSplitBill({
    participants: selectedParticipants,
    currentUserLogin: currentUserPersonalDetails.login,
    currentUserAccountID: currentUserPersonalDetails.accountID,
    comment: trimmedComment,
    receipt: receiptFile,
    existingSplitChatReportID: report?.reportID,
    billable: transaction.billable,
    category: transaction.category,
    tag: transaction.tag,
    currency: transaction.currency,
    });

    We are not passing the Tax detials like rate and amout to startSplitBill

    What changes do you think we should make in order to solve the problem?

    as we do for IOU.splitBill

    taxCode: transactionTaxCode,
    taxAmount: transactionTaxAmount,

    We need to pass taxCode and taxAmount to IOU.startSplitBill

    then use it inside the TransactionUtils.buildOptimisticTransaction

    App/src/libs/actions/IOU.ts

    Lines 4315 to 4332 in 9a87ce9

    const splitTransaction = TransactionUtils.buildOptimisticTransaction(
    0,
    currency,
    CONST.REPORT.SPLIT_REPORTID,
    comment,
    '',
    '',
    '',
    CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT,
    receiptObject,
    filename,
    undefined,
    category,
    tag,
    undefined,
    undefined,
    billable,
    );

    POC Video:

    20240527_174248.mp4

    What alternative solutions did you explore?

  6. bondydaa commented on May 27, 2024

    @bondydaa
    Contributor

    the revert #42670 has been deployed, please retest and confirm this is no longer reproducible.

  7. kavimuru commented on May 28, 2024

    @kavimuru

    Issue is not fixed.

    42643.mp4
  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 28, 2024
  9. changed the title [-] Tax - Split scan - Selected rate from confirmation page does not show up in split detail view[/-] [+][$250] Tax - Split scan - Selected rate from confirmation page does not show up in split detail view[/+] on May 28, 2024
  10. melvin-bot commented on May 28, 2024

    @melvin-bot
  11. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 28, 2024
  12. melvin-bot commented on May 28, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (External)

  13. cretadn22 commented on May 28, 2024

    @cretadn22
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Split scan - Selected rate from confirmation page does not show up in split detail view

    What is the root cause of that problem?

    When we split expense by scanning we invoke startSplitBill function, but we don't pass taxRate and taxAmount to this function.

    const parameters: StartSplitBillParams = {

    One more thing, when adjusting the tax rate and amount, we invoke the completeSplitBill function, but we also don't pass taxRate and taxAmount

    const parameters: CompleteSplitBillParams = {

    What changes do you think we should make in order to solve the problem?

    We need to update the optimisticData and params within the completeSplitBill and startSplitBill function to incorporate taxRate and taxAmount.

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  14. nkdengineer commented on May 28, 2024

    @nkdengineer
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    The selected tax rate does not show up in Tax rate row in split details view. The row is empty

    What is the root cause of that problem?

    We have two bug here

    1. When we start split bill here, we don't accept taxCode and taxAmount param in this function to create optimistic transaction and pass it to param of StartSplitBill API

    1. When we edit tax rate and tax amount, we're calling UpdateMoneyRequestTaxRate API because we don't have the case for edit split bill here

    IOU.updateMoneyRequestTaxRate({

    What changes do you think we should make in order to solve the problem?

    1. Accept taxCode, taxAmount param in startSplitBill function and then use this to create optimistic transaction here.

    2. Pas taxCode as transactionTaxCode and taxAmount as transactionTaxAmount into startSplitBill function here

    1. Pass taxCode and taxAmount as param of StartSplitBill API here. We also need BE change to return taxCode and taxAmount of the transaction when we call StartSplitBill API

    const parameters: StartSplitBillParams = {

    1. When we edit split bill tax rate, we should call setDraftSplitTransaction as the revert PR here https://github.com/Expensify/App/pull/42670/files#diff-2d4b9c38f6fb668f527da301a60d3c9bb05c865f33aa475d29148bbda45e3cc0

    IOU.updateMoneyRequestTaxRate({

    What alternative solutions did you explore? (Optional)

    NA

  15. DylanDylann commented on May 29, 2024

    @DylanDylann
    Contributor

    This should be hold #39690

    cc @MonilBhavsar

  16. MonilBhavsar commented on May 30, 2024

    @MonilBhavsar
    Contributor

    We can close this. This is new feature and not a bug

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions