-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Reports correct sum with currencies and label #3937
Reports correct sum with currencies and label #3937
Conversation
fcaraballo
commented
Jan 20, 2016
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Fixed tickets | #3715 |
License | MIT |
Doc PR | no |
- Added field exchange_rate to sylius_order in order to save the exchange rate for the time the order was placed
- Updated query for reports in order to count check the exchange rate (o.total * o.exchange_rate)
- Behat for reports feature "Getting the correct sum with exchange rate"
- Table label: if there's a base currency it will show it. For e.g. TOTAL SUM IN GBP
- Created method for getting the channel base currency (getBaseCurrency)
- Behats and PHPSpec updated
@@ -52,4 +52,4 @@ function it_sets_currency_on_order( | |||
|
|||
$this->processOrderCurrency($event); | |||
} | |||
} | |||
} |
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.
Should be reverted.
dc44db5
to
611aa37
Compare
Updated for review |
@@ -28,7 +28,7 @@ class SalesTotalDataFetcher extends TimePeriod | |||
private $orderRepository; | |||
|
|||
/** | |||
* @param OrderRepositoryInterface $orderRepository | |||
* @param OrderRepositoryInterface $orderRepository |
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.
Should be reverted.
Updated for review |
@fcaraballo Could you rebase, please? :) Thanks! |
1989ed7
to
ed2427a
Compare
@@ -148,7 +148,16 @@ public function thereAreOrders(TableNode $table) | |||
|
|||
$this->createPayment($order, $paymentMethod); | |||
|
|||
$order->setCurrency('EUR'); | |||
if (isset($data['currency']) && '' !== trim($data['currency'])) { |
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.
Why you need to check and add trim?
$currency = isset($data['currency']) ? trim($data['currency']) : 'EUR';
$order->setCurrency($currency);
Should be enough?
86c3895
to
8cea3fd
Compare
Reports correct sum with currencies and label
Thanks Fernando! 👍 |