-
Notifications
You must be signed in to change notification settings - Fork 5
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
[SR-102] Suggestion - Change the SKU's displayed to normal products names and add hyperlinks #197
base: spree-reports
Are you sure you want to change the base?
[SR-102] Suggestion - Change the SKU's displayed to normal products names and add hyperlinks #197
Conversation
03ee60b
to
9c33d61
Compare
9c33d61
to
c898043
Compare
variants = variants.group('spree_variants.sku') | ||
.select('spree_variants.sku, sum(spree_line_items.quantity * spree_prices.amount) as line_item_total') | ||
variants = variants.group( | ||
'spree_variants.id', |
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.
'spree_variants.id', | |
"#{Spree::Variant.table_name}.id", |
please don't hardcode table names in SQL queries
'spree_variants.id', | ||
'spree_variants.is_master', | ||
'spree_variants.product_id', | ||
'sum(spree_line_items.quantity * spree_prices.amount) as line_item_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.
@piotrleniec-spark this calculation is wrong, it doesn't include discounts or tax, this can be fetched from LineItem
model
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.
@damianlegawiec fixed ✅
… github.com:spark-solutions/spree into SR-102-use-names-instead-of-skus-in-product-reports
No description provided.