-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
bae4308
to
94b3fe4
Compare
Marketplace
: Show Tax
on Order
Marketplace
: Show Tax
on Marketplace::Order#show
Marketplace
: Show Tax
on Marketplace::Order#show
Marketplace
: Show Order#tax_amount
on Marketplace::Order#show
cart_products.sum(0) do |cart_product| | ||
cart_product.price_total | ||
end | ||
cart_products.sum(0, &:price_total) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 ::
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. 😊
There was a problem hiding this comment.
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.
94b3fe4
to
950be2a
Compare
- #1137 The entire `Marketplace::Order` page is potato-tier, but at least it exists!
0029d2e
to
773442f
Compare
773442f
to
53297b3
Compare
Marketplace
:Tax
Collection and Compliance #1137The entire

Marketplace::Order
page is potato-tier, but at least it exists!