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

HIB-527 fix rate amenities count filter #118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tamnguyenit
Copy link
Contributor

@tamnguyenit tamnguyenit commented Apr 27, 2021

Purpose

fix rate amenities count filter

Approach

as a view rate.amount is rounded and not accurate to use for getting best rate of a provider when merging. Let use the original totalAmountUsd.

For different providers, people normally check the amount we display (the view), ecpc will be considered if the amounts are the same. Thus for different providers we need to compare rates using the view rate.amount

{
        "id": "6d6c67c5780bdcbe:booking.com:1331161:13",
        "hotelId": 1331161,
        "providerHotelId": "1630603",
        "providerCode": "booking.com",
        "description": "Twin Guest Room",
        "price": {
            "amount": 169,
            "currencyCode": "SGD",
            "amountUsd": 127.570114,
            "taxAmount": 31,
            "taxAmountUsd": 23.431246,
            "taxInclusive": true,
            "ecpc": 0.21,
            "localTaxAmount": 7,
            "localTaxAmountUsd": 5.44517,
            "totalLocalTaxAmount": 56,
            "totalLocalTaxAmountUsd": 43.56136,
            "totalAmount": 1352,
            "totalAmountUsd": 1020.5609,
            "totalTaxAmount": 248,
            "totalTaxAmountUsd": 187.44997
        },
        "rateAmenityIds": [
            5,
            2
        ],
        
        {
        "id": "6d6c67c5780bdcbe:booking.com:1331161:17",
        "hotelId": 1331161,
        "providerHotelId": "1630603",
        "providerCode": "booking.com",
        "description": "King Guest Room",
        "price": {
            "amount": 169,
            "currencyCode": "SGD",
            "amountUsd": 127.868324,
            "taxAmount": 31,
            "taxAmountUsd": 23.487078,
            "taxInclusive": true,
            "ecpc": 0.21,
            "localTaxAmount": 7,
            "localTaxAmountUsd": 5.457461,
            "totalLocalTaxAmount": 56,
            "totalLocalTaxAmountUsd": 43.659687,
            "totalAmount": 1352,
            "totalAmountUsd": 1022.9466,
            "totalTaxAmount": 248,
            "totalTaxAmountUsd": 187.89662
        },
        "rateAmenityIds": [
            2,
            3,
            4,
            5,
            13
        ],

@tamnguyenit tamnguyenit force-pushed the HIB-527-rate-amentities-count-filter branch from 9df4b37 to 0ebe796 Compare April 27, 2021 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant