Skip to content

Conversation

@hoantony
Copy link
Contributor

@hoantony hoantony commented Jun 20, 2018

Purpose

https://wegomushi.atlassian.net/browse/BE-1332

When the provider status is set to direct priority, when rates are in parity, irrespective of the cpc's of various providers the direct priority provider has to be displayed on top.

Status

  • deployed and tested on staging
var basePriceA = totalAmountA - totalTaxAmountA,
basePriceB = totalAmountB - totalTaxAmountB;

if (basePriceA !== basePriceB) return basePriceA - basePriceB;
Copy link
Contributor

Choose a reason for hiding this comment

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

hey @hoantony, from JIRA ticket, looks like we want to have direct partner on top disregard of the price. Can you confirm if that is the logic? If so, comparing by provider type will be higher priority than by price.

Copy link
Contributor Author

@hoantony hoantony Jun 20, 2018

Choose a reason for hiding this comment

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

@viettienn the logic here is correct. We only compare the Provider_types (which DRIECT_PRIORITY has higher priority) only when the prices are in parity. So the sorting conditions will be in order: amount -> provider_type -> ecpc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants