| | |
| | | package com.tourguide.modules.order.dto; |
| | | |
| | | import com.tourguide.modules.order.domain.RefundAmountCalculator; |
| | | import com.tourguide.modules.order.entity.TourOrder; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | this.orderType = order.getOrderType(); |
| | | this.orderAmount = order.getPaymentAmount() == null ? order.getAmount() : order.getPaymentAmount(); |
| | | this.commissionRate = order.getCommissionRate(); |
| | | this.earningAmount = order.getGuideEarningAmount(); |
| | | this.earningAmount = RefundAmountCalculator.refundableAmount(order); |
| | | this.completedAt = order.getCompletedAt(); |
| | | } |
| | | |