updade code based on the accounting deatils search
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.fineract.accounting.journalentry.data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DayWiseSummaryData {
|
||||
|
||||
private LocalDate date;
|
||||
private BigDecimal openingBalance;
|
||||
private BigDecimal totalDebit;
|
||||
private BigDecimal totalCredit;
|
||||
private BigDecimal netMovement;
|
||||
private BigDecimal closingBalance;
|
||||
private int entryCount;
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.fineract.accounting.journalentry.data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.fineract.accounting.glaccount.data.GLAccountData;
|
||||
import org.apache.fineract.infrastructure.core.service.Page;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GLAccountLedgerReportData {
|
||||
|
||||
/** GL Account details (name, code, type, description, usage) */
|
||||
private GLAccountData glAccount;
|
||||
|
||||
/** Balance of the account before the fromDate (0 if no fromDate or no glAccountId) */
|
||||
private BigDecimal openingBalance;
|
||||
|
||||
/** Balance of the account as of toDate = openingBalance + netMovement */
|
||||
private BigDecimal closingBalance;
|
||||
|
||||
/** Sum of all DEBIT entries in the requested period */
|
||||
private BigDecimal totalDebit;
|
||||
|
||||
/** Sum of all CREDIT entries in the requested period */
|
||||
private BigDecimal totalCredit;
|
||||
|
||||
/**
|
||||
* Net movement: for ASSET/EXPENSE (debit-normal) = totalDebit - totalCredit;
|
||||
* for LIABILITY/INCOME/EQUITY (credit-normal) = totalCredit - totalDebit
|
||||
*/
|
||||
private BigDecimal netMovement;
|
||||
|
||||
/** true for ASSET and EXPENSE accounts (debit-normal balance convention) */
|
||||
private boolean debitNormal;
|
||||
|
||||
private LocalDate fromDate;
|
||||
private LocalDate toDate;
|
||||
|
||||
/** Day-wise breakdown of balances for the period */
|
||||
private List<DayWiseSummaryData> dayWiseSummary;
|
||||
|
||||
/** Total number of journal entries matching the filter (for the KPI card) */
|
||||
private long totalEntries;
|
||||
|
||||
/** Paginated journal entries for the period */
|
||||
private Page<JournalEntryData> entries;
|
||||
}
|
||||
+8
@@ -19,6 +19,7 @@
|
||||
package org.apache.fineract.accounting.journalentry.service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import org.apache.fineract.accounting.journalentry.data.GLAccountLedgerReportData;
|
||||
import org.apache.fineract.accounting.journalentry.data.JournalEntryAssociationParametersData;
|
||||
import org.apache.fineract.accounting.journalentry.data.JournalEntryData;
|
||||
import org.apache.fineract.accounting.journalentry.data.OfficeOpeningBalancesData;
|
||||
@@ -36,4 +37,11 @@ public interface JournalEntryReadPlatformService {
|
||||
OfficeOpeningBalancesData retrieveOfficeOpeningBalances(Long officeId, String currencyCode);
|
||||
|
||||
Page<JournalEntryData> retrieveJournalEntriesByEntityId(String transactionId, Long entityId, Integer entityType);
|
||||
|
||||
/**
|
||||
* CBS GL Ledger Report: returns opening balance, day-wise summary, and paginated entries for a GL account.
|
||||
* Opening balance is computed as the net balance of all entries before fromDate.
|
||||
*/
|
||||
GLAccountLedgerReportData retrieveGLAccountLedger(Long glAccountId, Long officeId, Boolean onlyManualEntries,
|
||||
LocalDate fromDate, LocalDate toDate, String transactionId, SearchParameters searchParameters);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user