diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue index e92e65fc7..59409e432 100644 --- a/src/pages/Claim/Card/ClaimAction.vue +++ b/src/pages/Claim/Card/ClaimAction.vue @@ -37,6 +37,7 @@ const marker_labels = [ { value: DEFAULT_MIN_RESPONSABILITY, label: t('claim.summary.company') }, { value: DEFAULT_MAX_RESPONSABILITY, label: t('claim.summary.person') }, ]; +const multiplicatorValue = ref(); const columns = computed(() => [ { @@ -134,17 +135,7 @@ async function regularizeClaim() { message: t('globals.dataSaved'), type: 'positive', }); - if (claim.value.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2) { - quasar - .dialog({ - component: VnConfirm, - componentProps: { - title: t('confirmGreuges'), - message: t('confirmGreugesMessage'), - }, - }) - .onOk(async () => await onUpdateGreugeAccept()); - } + await onUpdateGreugeAccept(); } async function onUpdateGreugeAccept() { @@ -153,9 +144,9 @@ async function onUpdateGreugeAccept() { filter: { where: { code: 'freightPickUp' } }, }) ).data.id; - const freightPickUpPrice = (await axios.get(`GreugeConfigs/findOne`)).data - .freightPickUpPrice; - + const freightPickUpPrice = + (await axios.get(`GreugeConfigs/findOne`)).data.freightPickUpPrice * + multiplicatorValue.value; await axios.post(`Greuges`, { clientFk: claim.value.clientFk, description: `${t('ClaimGreugeDescription')} ${claimId}`.toUpperCase(), @@ -226,10 +217,10 @@ async function importToNewRefundTicket() { show-if-above v-if="claim" > - + {{ `${t('Total claimed')}: ${toCurrency(totalClaimed)}` }} - +

@@ -250,13 +241,31 @@ async function importToNewRefundTicket() { - - + + + {{ t('mana') }} + + + + - {{ t('mana') }} - + diff --git a/test/cypress/integration/claim/claimAction.spec.js b/test/cypress/integration/claim/claimAction.spec.js index f181722fa..685e120ce 100644 --- a/test/cypress/integration/claim/claimAction.spec.js +++ b/test/cypress/integration/claim/claimAction.spec.js @@ -31,7 +31,6 @@ describe('ClaimAction', () => { it('should regularize', () => { cy.get('[title="Regularize"]').click(); - cy.clickConfirm(); }); it('should remove the line', () => {