Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ₯”βœ¨ Marketplace: Tax Collection and Compliance #1137

Closed
7 of 8 tasks
Tracked by #831
zspencer opened this issue Feb 24, 2023 · 3 comments
Closed
7 of 8 tasks
Tracked by #831

πŸ₯”βœ¨ Marketplace: Tax Collection and Compliance #1137

zspencer opened this issue Feb 24, 2023 · 3 comments
Labels
✨ feature Reduces Client's Burden or Grants them Benefits πŸ₯” Satisfices It's good enough to use, but not particularly great
Milestone

Comments

@zspencer
Copy link
Member

zspencer commented Feb 24, 2023

Use Cases

@zspencer zspencer changed the title 🌱 Collect Taxes on Products Marketplace: 🌱 Collect Taxes on Products Feb 24, 2023
@zspencer zspencer changed the title Marketplace: 🌱 Collect Taxes on Products Marketplace: Collect Taxes on Products Feb 26, 2023
@zspencer zspencer changed the title Marketplace: Collect Taxes on Products Marketplace: Collect Taxes on Products Feb 26, 2023
@zspencer zspencer added the ✨ feature Reduces Client's Burden or Grants them Benefits label Feb 26, 2023
@zspencer zspencer changed the title Marketplace: Collect Taxes on Products 🌱 Marketplace: Collect Taxes on Products Feb 26, 2023
@zspencer zspencer added this to the 1.0 - Andromeda milestone Feb 26, 2023
@zspencer
Copy link
Member Author

I got a chance to speak with Adrionna Fike, the Board member at NoBAWC who worked at Mandela up until last year. The lowdown was:

  1. There are city and state level sales taxes
  2. Most sales taxes are collected from the customer, but some sales taxes are collected in part from the customer and the seller (i.e. the sugary foods tax)
  3. Some products may be covered under multiple sales-taxes (i.e. bottled beverages > 16oz have a tax and a deposit fee)

For now, we'll likely want to allow a Space to define the SalesTax they collect across all Marketplaces, for example:

  • Sales Tax (City of Oakland): 6%
  • Bottle Deposit (State of California): $0.10
  • Tobacco Tax (State of California): 13%

And each Product can then be associated to multiple taxes on the Marketplace::ProductsController#edit

zspencer added a commit that referenced this issue Mar 5, 2023
- #1137

This throws together the basic `CRUD` operations for `TaxRate`. Going to
do a bit of tidying and add some tests, then record a video of the use
case.

I may decide I want to add in the setting of the `TaxRate` on the
`Product`, but maybe I'll wait and add that independently...
zspencer added a commit that referenced this issue Mar 5, 2023
- #1137

This throws together the basic `CRUD` operations for `TaxRate`. Going to
do a bit of tidying and add some tests, then record a video of the use
case.

I may decide I want to add in the setting of the `TaxRate` on the
`Product`, but maybe I'll wait and add that independently...
zspencer added a commit that referenced this issue Mar 5, 2023
- #1137

This throws together the basic `CRUD` operations for `TaxRate`. Going to
do a bit of tidying and add some tests, then record a video of the use
case.

I may decide I want to add in the setting of the `TaxRate` on the
`Product`, but maybe I'll wait and add that independently...
zspencer added a commit that referenced this issue Mar 7, 2023
- #1137

This throws together the basic `CRUD` operations for `TaxRate`. Going to
do a bit of tidying and add some tests, then record a video of the use
case.

I may decide I want to add in the setting of the `TaxRate` on the
`Product`, but maybe I'll wait and add that independently...
zspencer added a commit that referenced this issue Mar 7, 2023
- #1137

This throws together the basic `CRUD` operations for `TaxRate`. Going to
do a bit of tidying and add some tests, then record a video of the use
case.

I may decide I want to add in the setting of the `TaxRate` on the
`Product`, but maybe I'll wait and add that independently...

* `Marketplace`: Test Create and Update `TaxRate`

* 🧹 `Marketplace`: `TaxRate#tax_rate` is a  float! Like a 🚒

I think mayyybeeeeeeee it's better to support decimals.

* πŸ§ΉπŸ› οΈ `Marketplace`: Model `Product`<=>`TaxRate` relationship

This also addresses Ana's comments re: Tidying
zspencer added a commit that referenced this issue Mar 7, 2023
- #1137

There's a bit of low-hanging 🌸, but I don't want to block on them. In
particular:

- It would be nice if we had a well-styled `Component` or partial for
  the `collection_check_boxes` form helper, since right now the
  `input[type="checkbox"]` and the `label` for each option are stacked
  on top of each other. Nasteh!
- There's probably a way to show the tax rate amount with a humanized
  percentage when selecting options, but I didn't want to figure it out
@zspencer zspencer changed the title 🌱 Marketplace: Collect Taxes on Products 🌱 Marketplace: Collect Taxes on Products Mar 7, 2023
zspencer added a commit that referenced this issue Mar 9, 2023
- #1137

There's a bit of low-hanging 🌸, but I don't want to block on them. In
particular:

- It would be nice if we had a well-styled `Component` or partial for
  the `collection_check_boxes` form helper, since right now the
  `input[type="checkbox"]` and the `label` for each option are stacked
  on top of each other. Nasteh!
- There's probably a way to show the tax rate amount with a humanized
  percentage when selecting options, but I didn't want to figure it out
zspencer added a commit that referenced this issue Mar 9, 2023
- #1137

There's a bit of low-hanging 🌸, but I don't want to block on them. In
particular:

- It would be nice if we had a well-styled `Component` or partial for
  the `collection_check_boxes` form helper, since right now the
  `input[type="checkbox"]` and the `label` for each option are stacked
  on top of each other. Nasteh!
- There's probably a way to show the tax rate amount with a humanized
  percentage when selecting options, but I didn't want to figure it out

* `Space`: Maybe use a deterministic method in tests, eh? EH?!

Sample once, tests are slick! Sample twice? Whoops! Bad click

Co-authored-by: Dalton Pruitt <daltonrpruitt@users.noreply.github.com>
Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com>
Co-authored-by: Ana Ulin <anaulin@users.noreply.github.com>

---------

Co-authored-by: Dalton Pruitt <daltonrpruitt@users.noreply.github.com>
Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com>
Co-authored-by: Ana Ulin <anaulin@users.noreply.github.com>
zspencer added a commit that referenced this issue Mar 9, 2023
…kout`

- #1137

Whoooo! `TaxRate` gets calculated! And collected!

Co-authored-by: Ana Ulin <anaulin@users.noreply.github.com>
Co-authored-by: Dalton Pruitt <daltonrpruitt@users.noreply.github.com>
Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com>
zspencer added a commit that referenced this issue Mar 9, 2023
…kout`

- #1137

Whoooo! `TaxRate` gets calculated! And collected!

Co-authored-by: Ana Ulin <anaulin@users.noreply.github.com>
Co-authored-by: Dalton Pruitt <daltonrpruitt@users.noreply.github.com>
Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com>
zspencer added a commit that referenced this issue Mar 9, 2023
…kout`

- #1137

Whoooo! `TaxRate` gets calculated! And collected!

Co-authored-by: Ana Ulin <anaulin@users.noreply.github.com>
Co-authored-by: Dalton Pruitt <daltonrpruitt@users.noreply.github.com>
Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com>
zspencer added a commit that referenced this issue Mar 10, 2023
…kout`

- #1137

Whoooo! `TaxRate` gets calculated! And collected!

Co-authored-by: Ana Ulin <anaulin@users.noreply.github.com>
Co-authored-by: Dalton Pruitt <daltonrpruitt@users.noreply.github.com>
Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com>
zspencer added a commit that referenced this issue Mar 10, 2023
…ckout` (#1200)

- #1137

Whoooo! `TaxRate` gets calculated! And collected!

Co-authored-by: Ana Ulin <anaulin@users.noreply.github.com>
Co-authored-by: Dalton Pruitt <daltonrpruitt@users.noreply.github.com>
Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com>

* 🧹 `Marketplace`: Taxes are summed nicely now!

---------

Co-authored-by: Ana Ulin <anaulin@users.noreply.github.com>
Co-authored-by: Dalton Pruitt <daltonrpruitt@users.noreply.github.com>
Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com>
zspencer added a commit that referenced this issue Mar 10, 2023
- #1137

The entire `Marketplace::Order` page is potato-tier, but at least it
exists!
zspencer added a commit that referenced this issue Mar 10, 2023
- #1137

The entire `Marketplace::Order` page is potato-tier, but at least it
exists!
zspencer added a commit that referenced this issue Mar 10, 2023
- #1137

The entire `Marketplace::Order` page is potato-tier, but at least it
exists!
zspencer added a commit that referenced this issue Apr 10, 2023
- #1137

This makes it so the text of the button is "Edit" and the label for the
button is the fuller text which includes the kind of thing being edited.
zspencer added a commit that referenced this issue Apr 11, 2023
- #1137
- #1338

I don't know why the get actions and passing `as` do not play nicely
together, but it is annoying as heck.
zspencer added a commit that referenced this issue Apr 11, 2023
- #1137
- #1338

I don't know why the get actions and passing `as` do not play nicely
together, but it is annoying as heck.
zspencer added a commit that referenced this issue Apr 11, 2023
- #1137
- #1338

I don't know why the get actions and passing `as` do not play nicely
together, but it is annoying as heck.
zspencer added a commit that referenced this issue Apr 11, 2023
* 🌸πŸ₯—πŸ› οΈβœ¨ `Marketplace`: Tidy up managing `TaxRate`s

- #1137
- #1187

OK this is a bit bigger than it probably should be but I came in like a
wreeeckiin' ball and:

- πŸ› οΈ `Components`: `ApplicationComponent` exposes `policy` and `current_person`
- πŸ› οΈ `Components`: Component Specs have `polymorphic_path`
- πŸ₯— `Marketplace`: Tested `TaxRate`, `TaxRateComponent` and `TaxRatesController`
- 🌸 `Marketplace`: `TaxRate#edit`, `TaxRate#update`, and
  `TaxRate#destroy` via TurboStreams
- 🌸 `Marketplace`: `TaxRate#index` and `TaxRate#show` are prettier

* ✍️ `Marketplace`: Wordsmith `TaxRate#edit` and `TaxRate#destroy` buttons

- #1137

This makes it so the text of the button is "Edit" and the label for the
button is the fuller text which includes the kind of thing being edited.

* `Marketplace`: Drop the controller changes

- #1347

Pulled out to their own PR
zspencer added a commit that referenced this issue Apr 13, 2023
- #1137

Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com
zspencer added a commit that referenced this issue Apr 13, 2023
* 🧹`Marketplace`: Remove unused `TaxRate` partial!

- #1137

Co-authored-by: Kelly Hong <KellyAH@users.noreply.github.com

* πŸ› οΈπŸ₯— `Components`: Don't infer rendering when `remove`ing components

- #1187

Turns out when we are testing `remove` turbo streams it was trying to
render a partial for the thing to remove.

That's A) unnecessary and B) a recipe for cruft because the inferred
rendering will require partials named for each model; and those partials
may not need to exist if the particular leaf is done using ViewComponent
@zspencer zspencer changed the title ✨πŸ₯” Marketplace: Collect Taxes on Products ✨πŸ₯” Marketplace: Tax Collection and Compliance May 14, 2023
zspencer added a commit that referenced this issue May 14, 2023
- #1137

OK this is a bit larger than I wanted it to be, but it should be a
purely structural change.

- Creates a `Marketplace::Bazaar` class to attach the `TaxRate`
- Migrates `TaxRate` connection to the `Bazaar` on migration
- Maintains the wiring of the `TaxRate` to the `Marketplace`
zspencer added a commit that referenced this issue May 14, 2023
- #1137

OK this is a bit larger than I wanted it to be, but it should be a
purely structural change.

- Creates a `Marketplace::Bazaar` class to attach the `TaxRate`
- Migrates `TaxRate` connection to the `Bazaar` on migration
- Maintains the wiring of the `TaxRate` to the `Marketplace`
zspencer added a commit that referenced this issue May 14, 2023
@zspencer zspencer changed the title ✨πŸ₯” Marketplace: Tax Collection and Compliance πŸ₯”βœ¨ Marketplace: Tax Collection and Compliance May 14, 2023
zspencer added a commit that referenced this issue May 16, 2023
…#1466)

* `Marketplace`: `TaxRate`s connect to `Bazaar`

- #1137

OK this is a bit larger than I wanted it to be, but it should be a
purely structural change.

- Creates a `Marketplace::Bazaar` class to attach the `TaxRate`
- Migrates `TaxRate` connection to the `Bazaar` on migration
- Maintains the wiring of the `TaxRate` to the `Marketplace`

* Boop

* `Marketplace`: Missed a place to provide `TaxRate#marketplace`
zspencer added a commit that referenced this issue May 17, 2023
* `Marketplace`: Add Foreign key for `TaxRate#bazaar`

- #1137

Apply after #1466

* `Marketplace`: Run the validation on the `TaxRate` field

OK, so I *think* this actually wants to be in the same pr that adds
them, just a different migration.
zspencer added a commit that referenced this issue May 22, 2023
- #1137

Since they're all attached we don't really need them
zspencer added a commit that referenced this issue May 22, 2023
- #1137

Since they're all attached we don't really need them
zspencer added a commit that referenced this issue Feb 18, 2024
- #831
- #1325
- #2153
- #2215
- #1137
- #2169

@anaulin has mentioned at least twice how she despises italics; but no
one has taken on the task.

So I did a quick skim-through for all the `italic` that lives within the
`Marketplace`, and removed them in place of:

- Making text size smaller
- Making text color grayer
zspencer added a commit to zinc-collective/tobias that referenced this issue Mar 25, 2024
- zinc-collective#831
- zinc-collective#1325
- zinc-collective#2153
- zinc-collective#2215
- zinc-collective#1137
- zinc-collective#2169

@anaulin has mentioned at least twice how she despises italics; but no
one has taken on the task.

So I did a quick skim-through for all the `italic` that lives within the
`Marketplace`, and removed them in place of:

- Making text size smaller
- Making text color grayer
@rosschapman
Copy link
Contributor

🧹 Relegated to cold storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature Reduces Client's Burden or Grants them Benefits πŸ₯” Satisfices It's good enough to use, but not particularly great
Projects
None yet
Development

No branches or pull requests

2 participants