mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: add sample import sheet to invoices
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user