mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
feat: wip UI upload attachments
This commit is contained in:
@@ -2,6 +2,7 @@ import { Transformer } from '@/lib/Transformer/Transformer';
|
||||
import { formatNumber } from 'utils';
|
||||
import { ItemEntryTransformer } from '../Sales/Invoices/ItemEntryTransformer';
|
||||
import { ICreditNote } from '@/interfaces';
|
||||
import { AttachmentTransformer } from '../Attachments/AttachmentTransformer';
|
||||
|
||||
export class CreditNoteTransformer extends Transformer {
|
||||
/**
|
||||
@@ -16,6 +17,7 @@ export class CreditNoteTransformer extends Transformer {
|
||||
'formattedCreditsUsed',
|
||||
'formattedSubtotal',
|
||||
'entries',
|
||||
'attachments',
|
||||
];
|
||||
};
|
||||
|
||||
@@ -80,4 +82,13 @@ export class CreditNoteTransformer extends Transformer {
|
||||
currencyCode: credit.currencyCode,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the credit note attachments.
|
||||
* @param {ISaleInvoice} invoice
|
||||
* @returns
|
||||
*/
|
||||
protected attachments = (creditNote) => {
|
||||
return this.item(creditNote.attachments, new AttachmentTransformer());
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user