feat: configure columns of resources export

This commit is contained in:
Ahmed Bouhuolia
2024-05-01 20:15:35 +02:00
parent 495941f43a
commit 55aab76c9b
12 changed files with 74 additions and 62 deletions

View File

@@ -90,56 +90,49 @@ export default {
name: {
name: 'account.field.name',
type: 'text',
exportable: true,
},
code: {
name: 'account.field.code',
type: 'text',
exportable: true,
},
description: {
name: 'account.field.description',
type: 'text',
exportable: true,
},
rootType: {
name: 'account.field.root_type',
type: 'text',
exportable: true,
accessor: 'accountRootType',
},
accountType: {
name: 'account.field.type',
accessor: 'accountTypeLabel',
type: 'enumeration',
exportable: true,
type: 'text',
},
accountNormal: {
name: 'account.field.normal',
accessor: 'accountNormalFormatted',
exportable: true,
},
currencyCode: {
name: 'account.field.currency',
exportable: true,
type: 'text',
},
bankBalance: {
name: 'account.field.bank_balance',
accessor: 'bankBalanceFormatted',
type: 'text',
exportable: true,
},
balance: {
name: 'account.field.bank_balance',
name: 'account.field.balance',
accessor: 'amount',
exportable: true,
},
description: {
name: 'account.field.description',
type: 'text',
},
active: {
name: 'account.field.active',
type: 'boolean',
exportable: true,
},
createdAt: {
name: 'account.field.created_at',
exportable: true,
},
},
fields2: {

View File

@@ -100,12 +100,29 @@ export default {
},
vendorId: {
name: 'Vendor',
accessor: 'vendor.displayName',
type: 'text',
},
amount: {
name: 'Amount',
accessor: 'formattedAmount',
},
exchangeRate: {
name: 'Exchange Rate',
type: 'number',
},
currencyCode: {
name: 'Currency Code',
type: 'text',
},
dueAmount: {
name: 'Due Amount',
accessor: 'formattedDueAmount',
},
paidAmount: {
name: 'Paid Amount',
accessor: 'formattedPaymentAmount'
},
note: {
name: 'Note',
type: 'text',

View File

@@ -82,16 +82,25 @@ export default {
name: 'bill_payment.field.payment_number',
type: 'text',
},
paymentAccountId: {
paymentAccount: {
name: 'bill_payment.field.payment_account',
type: 'relation',
accessor: 'paymentAccount.name',
type: 'text',
},
amount: {
name: 'Amount',
accessor: 'formattedAmount',
},
currencyCode: {
name: 'Currency Code',
type: 'text',
},
exchangeRate: {
name: 'bill_payment.field.exchange_rate',
type: 'number',
},
statement: {
name: 'bill_payment.field.statement',
name: 'bill_payment.field.note',
type: 'text',
},
reference: {
@@ -131,7 +140,7 @@ export default {
fieldType: 'number',
},
statement: {
name: 'bill_payment.field.statement',
name: 'bill_payment.field.note',
fieldType: 'text',
},
reference: {

View File

@@ -161,16 +161,19 @@ export default {
costAccount: {
name: 'item.field.sell_account',
type: 'text',
accessor: 'costAccount.name',
exportable: true,
},
sellAccount: {
name: 'item.field.sell_description',
type: 'text',
accessor: 'sellAccount.name',
exportable: true,
},
inventoryAccount: {
name: 'item.field.inventory_account',
type: 'text',
accessor: 'inventoryAccount.name',
exportable: true,
},
sellDescription: {
@@ -196,6 +199,7 @@ export default {
category: {
name: 'item.field.category',
type: 'text',
accessor: 'category.name',
exportable: true,
},
active: {

View File

@@ -33,22 +33,18 @@ export default {
name: {
name: 'item_category.field.name',
type: 'text',
exportable: true,
},
description: {
name: 'item_category.field.description',
type: 'text',
exportable: true,
},
count: {
name: 'item_category.field.count',
type: 'text',
exportable: true,
},
createdAt: {
name: 'item_category.field.created_at',
type: 'text',
exportable: true,
},
},
fields2: {

View File

@@ -61,43 +61,37 @@ export default {
columns: {
customer: {
name: 'payment_receive.field.customer',
accessor: 'customer.displayName',
type: 'text',
importable: true,
},
paymentDate: {
name: 'payment_receive.field.payment_date',
type: 'date',
importable: true,
},
amount: {
name: 'payment_receive.field.amount',
type: 'number',
importable: true,
},
referenceNo: {
name: 'payment_receive.field.reference_no',
type: 'text',
importable: true,
},
depositAccount: {
name: 'payment_receive.field.deposit_account',
accessor: 'depositAccount.name',
type: 'text',
importable: true,
},
paymentReceiveNo: {
name: 'payment_receive.field.payment_receive_no',
type: 'text',
importable: true,
},
statement: {
name: 'payment_receive.field.statement',
type: 'text',
importable: true,
},
created_at: {
name: 'payment_receive.field.created_at',
type: 'date',
importable: true,
},
},
fields2: {

View File

@@ -101,6 +101,11 @@ export default {
type: 'text',
exportable: true,
},
amount: {
name: 'Amount',
accessor: 'formattedAmount',
type: 'text',
},
exchangeRate: {
name: 'Exchange Rate',
type: 'number',

View File

@@ -92,52 +92,56 @@ export default {
invoiceDate: {
name: 'invoice.field.invoice_date',
type: 'date',
exportable: true,
},
dueDate: {
name: 'invoice.field.due_date',
type: 'date',
exportable: true,
},
referenceNo: {
name: 'invoice.field.reference_no',
type: 'text',
exportable: true,
},
invoiceNo: {
name: 'invoice.field.invoice_no',
type: 'text',
exportable: true,
},
customer: {
name: 'invoice.field.customer',
type: 'text',
exportable: true,
accessor: 'customer.displayName',
},
amount: {
name: 'invoice.field.amount',
type: 'text',
accessor: 'balanceAmountFormatted',
},
exchangeRate: {
name: 'invoice.field.exchange_rate',
type: 'number',
exportable: true,
},
currencyCode: {
name: 'invoice.field.currency',
type: 'text',
exportable: true,
},
paidAmount: {
name: 'Paid Amount',
accessor: 'paymentAmountFormatted'
},
dueAmount: {
name: 'Due Amount',
accessor: 'dueAmountFormatted',
},
invoiceMessage: {
name: 'invoice.field.invoice_message',
type: 'text',
exportable: true,
},
termsConditions: {
name: 'invoice.field.terms_conditions',
type: 'text',
exportable: true,
},
delivered: {
name: 'invoice.field.delivered',
type: 'boolean',
exportable: true,
},
},
fields2: {

View File

@@ -83,31 +83,24 @@ export default {
name: 'receipt.field.amount',
column: 'amount',
type: 'number',
exportable: true,
},
depositAccount: {
column: 'deposit_account_id',
name: 'receipt.field.deposit_account',
type: 'relation',
exportable: true,
type: 'text',
accessor: 'depositAccount.name',
},
customer: {
name: 'receipt.field.customer',
column: 'customer_id',
type: 'relation',
exportable: true,
type: 'text',
accessor: 'customer.displayName',
},
receiptDate: {
name: 'receipt.field.receipt_date',
column: 'receipt_date',
type: 'date',
exportable: true,
},
receiptNumber: {
name: 'receipt.field.receipt_number',
column: 'receipt_number',
type: 'text',
exportable: true,
},
referenceNo: {
name: 'receipt.field.reference_no',
@@ -119,19 +112,14 @@ export default {
name: 'receipt.field.receipt_message',
column: 'receipt_message',
type: 'text',
exportable: true,
},
statement: {
name: 'receipt.field.statement',
column: 'statement',
type: 'text',
exportable: true,
},
createdAt: {
name: 'receipt.field.created_at',
column: 'created_at',
type: 'date',
exportable: true,
},
status: {
name: 'receipt.field.status',

View File

@@ -33,7 +33,7 @@ export default {
fieldType: 'text',
},
personal_phone: {
name: 'vendor.field.personal_pone',
name: 'vendor.field.personal_phone',
column: 'personal_phone',
fieldType: 'text',
},
@@ -118,7 +118,7 @@ export default {
exportable: true,
},
personalPhone: {
name: 'vendor.field.personal_pone',
name: 'vendor.field.personal_phone',
type: 'text',
exportable: true,
},