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: Show Order#tax_amount on Marketplace::Order#show #1206

Merged
merged 2 commits into from
Mar 11, 2023

Conversation

zspencer
Copy link
Member

@zspencer zspencer commented Mar 10, 2023

The entire Marketplace::Order page is potato-tier, but at least it exists!
Screenshot 2023-03-10 at 2 31 07 PM

@zspencer zspencer force-pushed the marketplace/show-taxes-collected-on-order branch 2 times, most recently from bae4308 to 94b3fe4 Compare March 10, 2023 22:31
@zspencer zspencer requested a review from a team March 10, 2023 22:32
@zspencer zspencer changed the title 🥔✨ Marketplace: Show Tax on Order 🥔✨ Marketplace: Show Tax on Marketplace::Order#show Mar 10, 2023
@zspencer zspencer changed the title 🥔✨ Marketplace: Show Tax on Marketplace::Order#show 🥔✨ Marketplace: Show Order#tax_amount on Marketplace::Order#show Mar 10, 2023
cart_products.sum(0) do |cart_product|
cart_product.price_total
end
cart_products.sum(0, &:price_total)
Copy link
Member

Choose a reason for hiding this comment

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

You don't need that 0. This can just be cart_products.sum(&:price_total)

end

def tax_total
ordered_products.sum(0, &:tax_amount)
Copy link
Member

Choose a reason for hiding this comment

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

:: gestures vaguely in the direction of the 0s ::

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot 2023-03-10 at 7 21 54 PM

Copy link
Member

Choose a reason for hiding this comment

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

fine, FINE

end

delegate :delivery_fee, to: :marketplace

def price_total
product_total + delivery_fee
product_total + delivery_fee + tax_total
Copy link
Member

Choose a reason for hiding this comment

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

Smol unit test would be nice. 😊

Copy link
Member Author

Choose a reason for hiding this comment

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

no, u get big unit test.

@zspencer zspencer force-pushed the marketplace/show-taxes-collected-on-order branch from 94b3fe4 to 950be2a Compare March 11, 2023 03:24
- #1137

The entire `Marketplace::Order` page is potato-tier, but at least it
exists!
@zspencer zspencer force-pushed the marketplace/show-taxes-collected-on-order branch from 0029d2e to 773442f Compare March 11, 2023 03:26
@zspencer zspencer force-pushed the marketplace/show-taxes-collected-on-order branch from 773442f to 53297b3 Compare March 11, 2023 03:27
@zspencer zspencer merged commit 8d84131 into main Mar 11, 2023
@zspencer zspencer deleted the marketplace/show-taxes-collected-on-order branch March 11, 2023 13:06
@zspencer zspencer added ✨ feature Reduces Client's Burden or Grants them Benefits 🥔 Satisfices It's good enough to use, but not particularly great labels Apr 8, 2023
@zspencer zspencer added this to the 1.0 - Andromeda milestone May 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants