47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
import { modalityTitle } from './fastRequestOptions'
|
|
import { convertEnglishToPersian, formatPrice } from '../utils/numberUtils'
|
|
|
|
export const invoiceColumns = [
|
|
{
|
|
title: 'شماره فاکتور',
|
|
key: 'number',
|
|
render: (row) => convertEnglishToPersian(row.number)
|
|
},
|
|
{
|
|
title: 'شماره پرونده',
|
|
key: 'document',
|
|
render: (row) => row.document?.code ?? '-'
|
|
},
|
|
{
|
|
title: 'نوع درخواست',
|
|
key: 'modality',
|
|
render: (row) => row.document ? modalityTitle(row.document.modality) : '-'
|
|
},
|
|
{
|
|
title: 'مبلغ',
|
|
key: 'amount',
|
|
render: (row) => `${formatPrice(row.amount)} تومان`
|
|
},
|
|
{
|
|
title: 'وضعیت',
|
|
key: 'status'
|
|
},
|
|
{
|
|
title: 'روش پرداخت',
|
|
key: 'payment_method',
|
|
render: (row) => row.payment_method ?? '-'
|
|
},
|
|
{
|
|
title: 'تاریخ ثبت',
|
|
key: 'created_at',
|
|
render: (row) => row.created_at ? convertEnglishToPersian(new Date(row.created_at).toLocaleDateString('fa-IR')) : '-'
|
|
},
|
|
{
|
|
title: '',
|
|
key: 'actions',
|
|
width: 100,
|
|
style: 'grid grid-cols-1',
|
|
slot: true,
|
|
}
|
|
]
|