parent
7325be2366
commit
78e70f2b69
|
@ -6,9 +6,8 @@ import { useAcl } from 'src/composables/useAcl';
|
|||
import axios from 'axios';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { getSupplierRisk } from 'src/composables/getRisk';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
||||
import { toCurrency, toDate, toDateHourMin } from 'src/filters';
|
||||
import { dashIfEmpty, toCurrency, toDate, toDateHourMin } from 'src/filters';
|
||||
import { useState } from 'composables/useState';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
|
@ -74,40 +73,41 @@ const companyFilterColumn = {
|
|||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
// {
|
||||
// align: 'left',
|
||||
// name: 'payed',
|
||||
// label: t('Date'),
|
||||
// format: ({ payed }) => toDate(payed),
|
||||
// cardVisible: true,
|
||||
// },
|
||||
{
|
||||
align: 'left',
|
||||
name: 'payed',
|
||||
label: t('Date'),
|
||||
format: ({ payed }) => toDate(payed),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'created',
|
||||
name: 'dated',
|
||||
label: t('Creation date'),
|
||||
format: ({ created }) => toDateHourMin(created),
|
||||
format: ({ dated }) => toDateHourMin(dated),
|
||||
cardVisible: true,
|
||||
},
|
||||
// {
|
||||
// align: 'left',
|
||||
// label: t('Employee'),
|
||||
// columnField: {
|
||||
// component: 'userLink',
|
||||
// attrs: ({ row }) => {
|
||||
// return {
|
||||
// workerId: row.workerFk,
|
||||
// name: row.userName,
|
||||
// };
|
||||
// },
|
||||
// },
|
||||
// cardVisible: true,
|
||||
// },
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Employee'),
|
||||
columnField: {
|
||||
component: 'userLink',
|
||||
attrs: ({ row }) => {
|
||||
return {
|
||||
workerId: row.workerFk,
|
||||
name: row.userName,
|
||||
};
|
||||
},
|
||||
},
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'description',
|
||||
name: 'sref',
|
||||
label: t('Reference'),
|
||||
isTitle: true,
|
||||
class: 'extend',
|
||||
format: ({ sref }) => dashIfEmpty(sref),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -117,23 +117,23 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'debit',
|
||||
name: 'invoiceEuros',
|
||||
label: t('Debit'),
|
||||
format: ({ debit }) => debit && toCurrency(debit),
|
||||
format: ({ invoiceEuros }) => invoiceEuros && toCurrency(invoiceEuros),
|
||||
isId: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'credit',
|
||||
name: 'paymentEuros',
|
||||
label: t('Havings'),
|
||||
format: ({ credit }) => credit && toCurrency(credit),
|
||||
format: ({ paymentEuros }) => paymentEuros && toCurrency(paymentEuros),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'balance',
|
||||
name: 'euroBalance',
|
||||
label: t('Balance'),
|
||||
format: ({ balance }) => toCurrency(balance),
|
||||
format: ({ euroBalance }) => toCurrency(euroBalance),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
|
@ -146,23 +146,23 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('globals.downloadPdf'),
|
||||
icon: 'cloud_download',
|
||||
show: (row) => row.isInvoice,
|
||||
action: (row) => showBalancePdf(row),
|
||||
},
|
||||
{
|
||||
title: t('Send compensation'),
|
||||
icon: 'outgoing_mail',
|
||||
show: (row) => !!row.isCompensation,
|
||||
action: ({ id }) =>
|
||||
openConfirmationModal(
|
||||
t('Send compensation'),
|
||||
t('Do you want to report compensation to the supplier by mail?'),
|
||||
() => sendEmail(`Receipts/${id}/balance-compensation-email`)
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: t('globals.downloadPdf'),
|
||||
// icon: 'cloud_download',
|
||||
// show: (row) => row.isInvoice,
|
||||
// action: (row) => showBalancePdf(row),
|
||||
// },
|
||||
// {
|
||||
// title: t('Send compensation'),
|
||||
// icon: 'outgoing_mail',
|
||||
// show: (row) => !!row.isCompensation,
|
||||
// action: ({ id }) =>
|
||||
// openConfirmationModal(
|
||||
// t('Send compensation'),
|
||||
// t('Do you want to report compensation to the supplier by mail?'),
|
||||
// () => sendEmail(`Receipts/${id}/balance-compensation-email`)
|
||||
// ),
|
||||
// },
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue