Skip to content

Commit

Permalink
fix: merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
RexBearIU committed Oct 11, 2024
1 parent d3383d5 commit e23bedc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iSunFA",
"version": "0.8.2+46",
"version": "0.8.2+47",
"private": false,
"scripts": {
"dev": "next dev",
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/voucher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ export type IVoucherFromPrismaIncludeJournalLineItems = Prisma.VoucherGetPayload

export type IVoucherForCashFlow = Prisma.VoucherGetPayload<{
include: {
journal: {
invoiceVoucherJournals: {
include: {
invoice: true;
journal: true;
};
};
lineItems: {
Expand Down
17 changes: 10 additions & 7 deletions src/lib/utils/report/cash_flow_statement_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@ export default class CashFlowStatementGenerator extends FinancialReportGenerator
startDateInSecond,
endDateInSecond
);
this.voucherRelatedToCash = voucherRelatedToCash.filter((voucher) => {

const laterThanStartDate = voucher.date >= startDateInSecond;
const earlierThanEndDate = voucher.date <= endDateInSecond;
return laterThanStartDate && earlierThanEndDate;
});
this.voucherRelatedToCash = voucherRelatedToCash
.filter((voucher) => {
const laterThanStartDate = voucher.date >= startDateInSecond;
const earlierThanEndDate = voucher.date <= endDateInSecond;
return laterThanStartDate && earlierThanEndDate;
})
.map((voucher) => ({
...voucher,
invoiceVoucherJournals: voucher.invoiceVoucherJournals || [],
}));

this.voucherLastPeriod = voucherRelatedToCash.filter((voucher) => {

const earlierThanStartDate = voucher.date < startDateInSecond;
return earlierThanStartDate;
});
Expand Down

0 comments on commit e23bedc

Please sign in to comment.