event icon indicating copy to clipboard operation
event copied to clipboard

enhancement: add ability to set tax rate for individual items

Open ajaysehwal opened this issue 6 months ago • 10 comments

Description

Relates to issue: ZEUS- #3053

Please enter a description and screenshots, if appropriate, of the work covered in this PR

Screenshot 2025-06-07 at 6 32 19 PM

Products with custom tax and Global tax

Screenshot 2025-06-10 at 9 31 40 PM Screenshot 2025-06-10 at 9 32 43 PM

Products with only Global Tax Screenshot 2025-06-17 at 8 15 27 PM

Products with flat prices Screenshot 2025-06-18 at 8 20 30 AM

This pull request is categorized as a:

  • [x] New feature
  • [ ] Bug fix
  • [x] Code refactor
  • [ ] Configuration change
  • [ ] Locales update
  • [ ] Quality assurance
  • [ ] Other

Checklist

  • [x] I’ve run yarn run tsc and made sure my code compiles correctly
  • [x] I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • [x] I’ve run yarn run prettier and made sure my code is formatted correctly
  • [x] I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • [ ] No, I’m a fool
  • [ ] Yes
  • [x] N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • [ ] Android
  • [x] iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

  • [ ] Embedded LND
  • [ ] LND (REST)
  • [ ] LND (Lightning Node Connect)
  • [ ] Core Lightning (CLNRest)
  • [ ] Nostr Wallet Connect
  • [ ] LndHub

Locales

  • [ ] I’ve added new locale text that requires translations
  • [ ] I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • [ ] Contributors will need to run yarn after this PR is merged in
  • [ ] 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • [ ] Changes were made that require an update to the README
  • [ ] Changes were made that require an update to onboarding

ajaysehwal avatar Jun 07 '25 13:06 ajaysehwal

If you have an order that only uses items that have the global tax, does it still display the % next to each item?

kaloudis avatar Jun 11 '25 05:06 kaloudis

If you have an order that only uses items that have the global tax, does it still display the % next to each item?

Yeah, if you look at this screenshot, +20% is the global tax Screenshot 2025-06-11 at 11 01 48 AM

ajaysehwal avatar Jun 11 '25 05:06 ajaysehwal

If you have an order that only uses items that have the global tax, does it still display the % next to each item?

Yeah, if you look at this screenshot, +20% is the global tax Screenshot 2025-06-11 at 11 01 48 AM

This screen shot has a mix of global and own tax items. What does it look like when you have an order with items that do not have their own tax (global tax only)?

kaloudis avatar Jun 11 '25 05:06 kaloudis

If you have an order that only uses items that have the global tax, does it still display the % next to each item?

Yeah, if you look at this screenshot, +20% is the global tax Screenshot 2025-06-11 at 11 01 48 AM

This screen shot has a mix of global and own tax items. What does it look like when you have an order with items that do not have their own tax (global tax only)?

so you mean if no one product has its own tax, then we show the global tax at once, not with all products

ajaysehwal avatar Jun 11 '25 06:06 ajaysehwal

If you have an order that only uses items that have the global tax, does it still display the % next to each item?

Yeah, if you look at this screenshot, +20% is the global tax Screenshot 2025-06-11 at 11 01 48 AM

This screen shot has a mix of global and own tax items. What does it look like when you have an order with items that do not have their own tax (global tax only)?

so you mean if no one product has its own tax, then we show the global tax at once, not with all products

Exactly.

kaloudis avatar Jun 11 '25 06:06 kaloudis

Simulator Screenshot - iPhone 16 Pro Max - 2025-06-13 at 12 59 33

Tax calculation here doesn't look right it should be 100 sats + (~863 sats) + 900 sats = 1863 sats ($1.95)

shubhamkmr04 avatar Jun 13 '25 07:06 shubhamkmr04

Screenshot 2025-06-13 at 5 11 32 PM

ajaysehwal avatar Jun 13 '25 11:06 ajaysehwal

Still waiting on a screenshot of an order with only the global tax rate

kaloudis avatar Jun 17 '25 14:06 kaloudis

only the global tax rate

Screenshot 2025-06-17 at 8 16 34 PM

ajaysehwal avatar Jun 17 '25 14:06 ajaysehwal

Hi @kaloudis, could you please review this PR now ?

ajaysehwal avatar Jun 18 '25 14:06 ajaysehwal

@ajaysehwal rebase, don't do merge commits

kaloudis avatar Jun 28 '25 14:06 kaloudis