|
|
@@ -231,6 +231,9 @@ class RefundRepository extends Repository
|
|
|
$vipDiscountAmount = round($order->vip_discount_amount * $subtotalRatio, 2);
|
|
|
$baseVipDiscountAmount = round($order->base_vip_discount_amount * $subtotalRatio, 2);
|
|
|
|
|
|
+ $rewardPointsAmount = round($order->reward_points_amount * $subtotalRatio, 2);
|
|
|
+ $baseRewardPointsAmount = round($order->base_reward_points_amount * $subtotalRatio, 2);
|
|
|
+
|
|
|
$refund->grand_total = $refund->sub_total
|
|
|
+ $refund->tax_amount
|
|
|
+ $refund->shipping_amount
|
|
|
@@ -238,6 +241,7 @@ class RefundRepository extends Repository
|
|
|
- $giftcardAmount
|
|
|
+ $vipPlusAmount
|
|
|
- $vipDiscountAmount
|
|
|
+ - $rewardPointsAmount
|
|
|
+ $refund->adjustment_refund
|
|
|
- $refund->adjustment_fee
|
|
|
- $refund->discount_amount;
|
|
|
@@ -249,6 +253,7 @@ class RefundRepository extends Repository
|
|
|
- $baseGiftcardAmount
|
|
|
+ $baseVipPlusAmount
|
|
|
- $baseVipDiscountAmount
|
|
|
+ - $baseRewardPointsAmount
|
|
|
+ $refund->base_adjustment_refund
|
|
|
- $refund->base_adjustment_fee
|
|
|
- $refund->base_discount_amount;
|
|
|
@@ -329,6 +334,11 @@ class RefundRepository extends Repository
|
|
|
'label' => trans('member::app.member.vip_discount'),
|
|
|
];
|
|
|
|
|
|
+ $totals['reward_points'] = [
|
|
|
+ 'price' => round($order->base_reward_points_amount * $subtotalRatio, 2),
|
|
|
+ 'label' => trans('rewardpoints::rewardpoints.reward-points-amount'),
|
|
|
+ ];
|
|
|
+
|
|
|
$totals['grand_total']['price'] += $totals['subtotal']['price']
|
|
|
+ $totals['tax']['price']
|
|
|
+ $totals['shipping']['price']
|
|
|
@@ -336,6 +346,7 @@ class RefundRepository extends Repository
|
|
|
- $totals['giftcard']['price']
|
|
|
+ $totals['vip_plus']['price']
|
|
|
- $totals['vip_discount']['price']
|
|
|
+ - $totals['reward_points']['price']
|
|
|
+ $data['adjustment_refund']
|
|
|
- $data['adjustment_fee']
|
|
|
- $totals['discount']['price'];
|