mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-22 15:50:32 +00:00
fix(server): storing cash flow transaction statement to GL entry note
This commit is contained in:
@@ -41,6 +41,8 @@ export interface ILedgerEntry {
|
|||||||
index: number;
|
index: number;
|
||||||
indexGroup?: number;
|
indexGroup?: number;
|
||||||
|
|
||||||
|
note?: string;
|
||||||
|
|
||||||
userId?: number;
|
userId?: number;
|
||||||
itemId?: number;
|
itemId?: number;
|
||||||
branchId?: number;
|
branchId?: number;
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ export const transformLedgerEntryToTransaction = (
|
|||||||
transactionNumber: entry.transactionNumber,
|
transactionNumber: entry.transactionNumber,
|
||||||
referenceNumber: entry.referenceNumber,
|
referenceNumber: entry.referenceNumber,
|
||||||
|
|
||||||
|
note: entry.note,
|
||||||
|
|
||||||
index: entry.index,
|
index: entry.index,
|
||||||
indexGroup: entry.indexGroup,
|
indexGroup: entry.indexGroup,
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export default class CashflowTransactionJournalEntries {
|
|||||||
/**
|
/**
|
||||||
* Retrieves the common entry of cashflow transaction.
|
* Retrieves the common entry of cashflow transaction.
|
||||||
* @param {ICashflowTransaction} cashflowTransaction
|
* @param {ICashflowTransaction} cashflowTransaction
|
||||||
* @returns {}
|
* @returns {Partial<ILedgerEntry>}
|
||||||
*/
|
*/
|
||||||
private getCommonEntry = (cashflowTransaction: ICashflowTransaction) => {
|
private getCommonEntry = (cashflowTransaction: ICashflowTransaction) => {
|
||||||
const { entries, ...transaction } = cashflowTransaction;
|
const { entries, ...transaction } = cashflowTransaction;
|
||||||
@@ -41,7 +41,9 @@ export default class CashflowTransactionJournalEntries {
|
|||||||
),
|
),
|
||||||
transactionId: transaction.id,
|
transactionId: transaction.id,
|
||||||
transactionNumber: transaction.transactionNumber,
|
transactionNumber: transaction.transactionNumber,
|
||||||
referenceNo: transaction.referenceNo,
|
referenceNumber: transaction.referenceNo,
|
||||||
|
|
||||||
|
note: transaction.description,
|
||||||
|
|
||||||
branchId: cashflowTransaction.branchId,
|
branchId: cashflowTransaction.branchId,
|
||||||
userId: cashflowTransaction.userId,
|
userId: cashflowTransaction.userId,
|
||||||
@@ -105,7 +107,7 @@ export default class CashflowTransactionJournalEntries {
|
|||||||
* @param {ICashflowTransaction} cashflowTransaction
|
* @param {ICashflowTransaction} cashflowTransaction
|
||||||
* @param {ICashflowTransactionLine} entry
|
* @param {ICashflowTransactionLine} entry
|
||||||
* @param {number} index
|
* @param {number} index
|
||||||
* @returns
|
* @returns {ILedgerEntry[]}
|
||||||
*/
|
*/
|
||||||
private getJournalEntries = (
|
private getJournalEntries = (
|
||||||
cashflowTransaction: ICashflowTransaction
|
cashflowTransaction: ICashflowTransaction
|
||||||
@@ -130,6 +132,7 @@ export default class CashflowTransactionJournalEntries {
|
|||||||
* Write the journal entries of the given cashflow transaction.
|
* Write the journal entries of the given cashflow transaction.
|
||||||
* @param {number} tenantId
|
* @param {number} tenantId
|
||||||
* @param {ICashflowTransaction} cashflowTransaction
|
* @param {ICashflowTransaction} cashflowTransaction
|
||||||
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
public writeJournalEntries = async (
|
public writeJournalEntries = async (
|
||||||
tenantId: number,
|
tenantId: number,
|
||||||
@@ -153,6 +156,7 @@ export default class CashflowTransactionJournalEntries {
|
|||||||
* Delete the journal entries.
|
* Delete the journal entries.
|
||||||
* @param {number} tenantId - Tenant id.
|
* @param {number} tenantId - Tenant id.
|
||||||
* @param {number} cashflowTransactionId - Cashflow transaction id.
|
* @param {number} cashflowTransactionId - Cashflow transaction id.
|
||||||
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
public revertJournalEntries = async (
|
public revertJournalEntries = async (
|
||||||
tenantId: number,
|
tenantId: number,
|
||||||
|
|||||||
Reference in New Issue
Block a user