feat: add sample import sheet to invoices

This commit is contained in:
Ahmed Bouhuolia
2024-04-07 15:26:23 +02:00
parent bbafdcd8bd
commit 086b060351
8 changed files with 81 additions and 21 deletions

View File

@@ -3,6 +3,7 @@ import { Knex } from 'knex';
import { ISaleInvoiceCreateDTO } from '@/interfaces';
import { CreateSaleInvoice } from './CreateSaleInvoice';
import { Importable } from '@/services/Import/Importable';
import { SaleInvoicesSampleData } from './constants';
@Service()
export class SaleInvoicesImportable extends Importable {
@@ -40,6 +41,6 @@ export class SaleInvoicesImportable extends Importable {
* Retrieves the sample data that used to download accounts sample sheet.
*/
public sampleData(): any[] {
return [];
return SaleInvoicesSampleData;
}
}

View File

@@ -109,3 +109,52 @@ export const DEFAULT_VIEWS = [
columns: DEFAULT_VIEW_COLUMNS,
},
];
export const SaleInvoicesSampleData = [
{
'Invoice No.': 'B-101',
'Reference No.': 'REF0',
'Invoice Date': '2024-01-01',
'Due Date': '2024-03-01',
Customer: 'Harley Veum',
'Exchange Rate': 1,
'Invoice Message': 'Aspernatur doloremque amet quia aut.',
'Terms & Conditions': 'Quia illum aut dolores.',
Delivered: 'T',
Item: 'VonRueden, Ruecker and Hettinger',
Quantity: 100,
Rate: 100,
Description: 'Description',
},
{
'Invoice No.': 'B-102',
'Reference No.': 'REF0',
'Invoice Date': '2024-01-01',
'Due Date': '2024-03-01',
Customer: 'Harley Veum',
'Exchange Rate': 1,
'Invoice Message': 'Est omnis enim vel.',
'Terms & Conditions': 'Iusto et sint nobis sit.',
Delivered: 'T',
Item: 'Thompson - Reichert',
Quantity: 200,
Rate: 50,
Description: 'Description',
},
{
'Invoice No.': 'B-103',
'Reference No.': 'REF0',
'Invoice Date': '2024-01-01',
'Due Date': '2024-03-01',
Customer: 'Harley Veum',
'Exchange Rate': 1,
'Invoice Message':
'Repudiandae voluptatibus repellat minima voluptatem rerum veniam.',
'Terms & Conditions': 'Id quod inventore ex rerum velit sed.',
Delivered: 'T',
Item: 'VonRueden, Ruecker and Hettinger',
Quantity: 100,
Rate: 100,
Description: 'Description',
},
];

View File

@@ -3,6 +3,7 @@ import { Knex } from 'knex';
import { IPaymentReceiveCreateDTO } from '@/interfaces';
import { Importable } from '@/services/Import/Importable';
import { CreatePaymentReceive } from './CreatePaymentReceive';
import { PaymentsReceiveSampleData } from './constants';
@Service()
export class PaymentReceivesImportable extends Importable {
@@ -40,6 +41,6 @@ export class PaymentReceivesImportable extends Importable {
* Retrieves the sample data that used to download accounts sample sheet.
*/
public sampleData(): any[] {
return [];
return PaymentsReceiveSampleData;
}
}

View File

@@ -31,3 +31,17 @@ export const ERRORS = {
};
export const DEFAULT_VIEWS = [];
export const PaymentsReceiveSampleData = [
{
Customer: 'Randall Kohler',
'Payment Date': '2024-10-10',
'Payment Receive No.': 'PAY-0001',
'Reference No.': 'REF-0001',
'Deposit Account': 'Petty Cash',
'Exchange Rate': '',
Statement: 'Totam optio quisquam qui.',
Invoice: 'INV-00001',
'Payment Amount': 850,
},
];