|
|
@@ -91,26 +91,6 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
|
|
|
- <div class="detail-row">
|
|
|
- <span class="detail-label text-primary q-pr-sm">
|
|
|
- {{ $t('dashboard_client.pending_schedules.detail_value') }}
|
|
|
- </span>
|
|
|
-
|
|
|
- <span class="detail-value">
|
|
|
- {{ formatCurrency(schedule.total_amount) }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="detail-row">
|
|
|
- <span class="detail-label text-primary q-pr-sm">
|
|
|
- {{ $t('dashboard_client.pending_schedules.detail_service_fee') }}
|
|
|
- </span>
|
|
|
-
|
|
|
- <span class="detail-value">
|
|
|
- {{ formatCurrency(serviceFee) }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
-
|
|
|
<div class="detail-row-total font16 fontbold">
|
|
|
<span class="detail-label text-primary q-pr-sm">
|
|
|
{{ $t('dashboard_client.pending_schedules.detail_total') }}
|
|
|
@@ -166,7 +146,7 @@ import { computed, onMounted, ref } from 'vue'
|
|
|
import { formatAddress } from 'src/helpers/utils';
|
|
|
import { formatCurrency } from 'src/helpers/utils'
|
|
|
import { getScheduleClienteDetails } from 'src/api/dashboard'
|
|
|
-import { getSchedulePlatformFeeRate } from 'src/helpers/paymentPlatformFees'
|
|
|
+import { getSchedulePaymentType, getScheduleTotalWithPlatformFee } from 'src/helpers/paymentPlatformFees'
|
|
|
import { useDialogPluginComponent, useQuasar } from 'quasar'
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
import { usePaymentPlatformFees } from 'src/composables/usePaymentPlatformFees'
|
|
|
@@ -232,19 +212,11 @@ const providerAge = computed(() => {
|
|
|
return age
|
|
|
})
|
|
|
|
|
|
-const serviceFee = computed(() => {
|
|
|
- const base = parseFloat(props.schedule.total_amount) || 0
|
|
|
-
|
|
|
- const feeRate = getSchedulePlatformFeeRate(props.schedule, 'pix', platformFees.value)
|
|
|
-
|
|
|
- return parseFloat((base * (feeRate ?? 0)).toFixed(2))
|
|
|
-})
|
|
|
-
|
|
|
-const total = computed(() => {
|
|
|
- const base = parseFloat(props.schedule.total_amount) || 0
|
|
|
-
|
|
|
- return parseFloat((base + serviceFee.value).toFixed(2))
|
|
|
-})
|
|
|
+const total = computed(() => getScheduleTotalWithPlatformFee(
|
|
|
+ props.schedule,
|
|
|
+ getSchedulePaymentType(props.schedule),
|
|
|
+ platformFees.value
|
|
|
+))
|
|
|
|
|
|
const avatarColors = [
|
|
|
{ background: '#ffd5df', color: '#932e57' },
|