From 12b47968d53605ad2b987bcdd34e23fa925e0f1a Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Wed, 7 Feb 2018 10:50:02 +0200 Subject: [PATCH] Fix breakdown unit count in daily bookings --- src/components/BookingBreakdown/LineItemBookingPeriod.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/BookingBreakdown/LineItemBookingPeriod.js b/src/components/BookingBreakdown/LineItemBookingPeriod.js index 795575d5..d585b071 100644 --- a/src/components/BookingBreakdown/LineItemBookingPeriod.js +++ b/src/components/BookingBreakdown/LineItemBookingPeriod.js @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedMessage, FormattedHTMLMessage, FormattedDate } from 'react-intl'; import moment from 'moment'; -import { LINE_ITEM_NIGHT, propTypes } from '../../util/types'; +import { LINE_ITEM_NIGHT, LINE_ITEM_DAY, propTypes } from '../../util/types'; import { daysBetween } from '../../util/dates'; import css from './BookingBreakdown.css'; @@ -42,7 +42,7 @@ const LineItemBookingPeriod = props => { const { start: startDate, end: endDateRaw } = booking.attributes; const isNightly = unitType === LINE_ITEM_NIGHT; - const isDaily = unitType === LINE_ITEM_NIGHT; + const isDaily = unitType === LINE_ITEM_DAY; const dayCount = daysBetween(startDate, endDateRaw); const isSingleDay = !isNightly && dayCount === 1;