Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Develop #815

Merged
merged 26 commits into from
Jun 17, 2024
Merged

Develop #815

merged 26 commits into from
Jun 17, 2024

Conversation

Hari-egov
Copy link
Collaborator

@Hari-egov Hari-egov commented Jun 14, 2024

Summary by CodeRabbit

  • New Features

    • Added support for userId in billing services to enhance user tracking and identification.
    • Introduced a new method for handling bill cancellation notifications.
  • Bug Fixes

    • Updated meter reading display logic to handle various scenarios correctly.
    • Addressed rounding mode issues in penalty calculations for more accurate billing.
  • Refactor

    • Modified SQL queries to include additional fields and adjusted parameter orders.
    • Simplified tenant ID retrieval logic for improved readability and performance.
  • Chores

    • Added new configuration properties and constants related to bill cancellation.
  • Documentation

    • Updated frontend and backend code to improve error handling, formatting, and comments for better maintainability.

Copy link

coderabbitai bot commented Jun 14, 2024

Walkthrough

The changes introduce new fields, enhancements, and fixes to the billing service module, particularly focusing on user ID handling, bill notifications, and database schema updates. Similarly, the frontend components received updates for improved user interface and data processing, including new fields and refactors. These modifications collectively enhance the functionality and maintainability of the billing and water connection services.

Changes

Files Summary
.../egov/demand/model/BillV2.java
.../egov/demand/repository/BillRepositoryV2.java
.../egov/demand/repository/querybuilder/BillQueryBuilder.java
.../egov/demand/repository/rowmapper/BillRowMapperV2.java
.../egov/demand/service/BillServicev2.java
.../egov/demand/util/Constants.java
.../resources/application.properties
Added new field userId, updated SQL queries and repository methods, added notification logic for bill cancellation, and updated constants and application properties.
.../resources/db/migration/main/V20221130141020__egbs_bill_alter_add_userid.sql
.../resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql
Updated database schema to include new columns and constraints.
frontend/mgramseva/lib/.../bills_table.dart
frontend/mgramseva/lib/.../generate_new_bill.dart
frontend/mgramseva/lib/.../new_consumer_bill.dart
frontend/mgramseva/lib/.../property.dart
frontend/mgramseva/lib/.../property.g.dart
frontend/mgramseva/lib/.../water_connection.dart
frontend/mgramseva/lib/.../water_connection.g.dart
frontend/mgramseva/lib/.../expenses_details.g.dart
frontend/mgramseva/lib/providers/...
Added new fields, refactored constructors and methods, updated JSON handling, and improved data processing and UI logic.
.../org/egov/wscalculation/service/DemandService.java Updated rounding mode in getAllDemands method.
.../org/egov/wscalculation/service/WSCalculationServiceImpl.java Modified logic for retrieving tenantId in calculations.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Frontend
    participant BillingService
    participant DB

    User->>Frontend: Request New Bill
    Frontend->>BillingService: Fetch Bill Details
    BillingService->>DB: Query Bill Data with User ID
    DB-->>BillingService: Return Bill Data
    BillingService->>Frontend: Send Bill Details
    Frontend->>User: Display Bill

    User->>Frontend: Request Bill Cancellation
    Frontend->>BillingService: Send Cancellation Request
    BillingService->>DB: Update Bill Status
    DB-->>BillingService: Confirm Update
    BillingService->>Frontend: Send Confirmation
    BillingService->>NotificationService: Send Notification for Cancellation
    NotificationService-->>User: Notify Cancellation
Loading

Poem

In land of code where data flows free,
A user ID joined the bill spree. 🧾
Cancellation calls and updates sung,
Databases changed, a new song begun. ⏳
Frontend dances, new fields thrive,
Bringing joy and making data alive. 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 25

Outside diff range and nitpick comments (5)
business-services/billing-service/src/main/java/org/egov/demand/repository/BillRepositoryV2.java (1)

87-88: Commented out code should be removed if not needed.

It appears that the lines setting consumerCode and tenantId have been commented out. If these lines are no longer necessary, consider removing them to keep the codebase clean and maintainable.

frontend/mgramseva/lib/providers/household_register_provider.dart (2)

376-376: Clarify the handling of 'Metered' connection types.

The code for handling 'Metered' connection types seems a bit convoluted and might benefit from a helper method or clearer inline comments to explain why certain checks are necessary.

Also applies to: 379-379, 382-382


641-649: Consider simplifying the header translation process.

The process of translating headers for the Excel and PDF generation is repetitive and could be simplified by creating a method that handles the translation based on a list of keys, reducing code duplication and increasing readability.

frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart (1)

[!TIP]
Codebase Verification

The shell script results indicate that the imports for 'dart:convert' and 'dart:developer' are present in the file but are not being used anywhere else in the code. This suggests that these imports might be unnecessary.

  • frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart: 'dart:convert' and 'dart:developer' are imported but not used.
Analysis chain

Line range hint 1-2: Ensure proper usage of newly added imports.


The shell script did not return any output, indicating that 'dart:convert' and 'dart:developer' might not be used in the file. To confirm this, we should check the entire file for any potential usage that might have been missed.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if 'dart:convert' and 'dart:developer' are used in the file.

# Test: Search for usage of 'dart:convert' and 'dart:developer' functions. Expect: At least one occurrence of each.
rg --type dart $'import "dart:convert";'
rg --type dart $'import "dart:developer";'

Length of output: 85



Script:

#!/bin/bash
# Description: Verify if 'dart:convert' and 'dart:developer' are used in the file 'consumer_details.dart'.

# Test: Search for any usage of 'dart:convert' and 'dart:developer' functions in the file.
rg 'dart:convert' frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart
rg 'dart:developer' frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart

Length of output: 227

municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java (1)

Line range hint 1031-1053: This large commented block should be removed to keep the code clean and maintainable. If this logic might be needed later, consider maintaining it in a version control system or a separate documentation area rather than commenting it out in the codebase.

- /*if (isForConnectionNo) {
-    WaterConnection connection = calculation.getWaterConnection();
-    if (connection == null) {
-        List<WaterConnection> waterConnectionList = calculatorUtils.getWaterConnection(requestInfo,
-                calculation.getConnectionNo(), calculation.getTenantId());
-        int size = waterConnectionList.size();
-        connection = waterConnectionList.get(size - 1);
-
-    }
-
-//    if(connection.getApplicationType().equalsIgnoreCase("MODIFY_WATER_CONNECTION")){
-//        WaterConnectionRequest waterConnectionRequest = WaterConnectionRequest.builder().waterConnection(connection)
-//                .requestInfo(requestInfo).build();
-//        Property property = wsCalculationUtil.getProperty(waterConnectionRequest);
-//        User owner = property.getOwners().get(0).toCommonUser();
-//        if (!CollectionUtils.isEmpty(waterConnectionRequest.getWaterConnection().getConnectionHolders())) {
-//            owner = waterConnectionRequest.getWaterConnection().getConnectionHolders().get(0).toCommonUser();
-//        }
-//        if(!(demand.getPayer().getUuid().equalsIgnoreCase(owner.getUuid())))
-//            demand.setPayer(owner);
-//    }
-
-}*/
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a408b26 and 511cb08.

Files selected for processing (36)
  • business-services/billing-service/src/main/java/org/egov/demand/model/BillV2.java (1 hunks)
  • business-services/billing-service/src/main/java/org/egov/demand/repository/BillRepositoryV2.java (2 hunks)
  • business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/BillQueryBuilder.java (3 hunks)
  • business-services/billing-service/src/main/java/org/egov/demand/repository/rowmapper/BillRowMapperV2.java (1 hunks)
  • business-services/billing-service/src/main/java/org/egov/demand/service/BillServicev2.java (6 hunks)
  • business-services/billing-service/src/main/java/org/egov/demand/util/Constants.java (1 hunks)
  • business-services/billing-service/src/main/java/org/egov/demand/web/validator/BillValidator.java (2 hunks)
  • business-services/billing-service/src/main/resources/application.properties (1 hunks)
  • business-services/billing-service/src/main/resources/db/migration/main/V20221130141020__egbs_bill_alter_add_userid.sql (1 hunks)
  • business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql (1 hunks)
  • frontend/mgramseva/lib/components/dashboard/bills_table.dart (6 hunks)
  • frontend/mgramseva/lib/components/house_connection_and_bill/generate_new_bill.dart (1 hunks)
  • frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart (5 hunks)
  • frontend/mgramseva/lib/model/connection/property.dart (4 hunks)
  • frontend/mgramseva/lib/model/connection/property.g.dart (2 hunks)
  • frontend/mgramseva/lib/model/connection/water_connection.dart (1 hunks)
  • frontend/mgramseva/lib/model/connection/water_connection.g.dart (4 hunks)
  • frontend/mgramseva/lib/model/expenses_details/expenses_details.g.dart (4 hunks)
  • frontend/mgramseva/lib/providers/collect_payment_provider.dart (6 hunks)
  • frontend/mgramseva/lib/providers/common_provider.dart (1 hunks)
  • frontend/mgramseva/lib/providers/consumer_details_provider.dart (11 hunks)
  • frontend/mgramseva/lib/providers/household_register_provider.dart (10 hunks)
  • frontend/mgramseva/lib/providers/search_connection_provider.dart (3 hunks)
  • frontend/mgramseva/lib/repository/billing_service_repo.dart (1 hunks)
  • frontend/mgramseva/lib/screeens/connection_results/connection_details_card.dart (1 hunks)
  • frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart (4 hunks)
  • frontend/mgramseva/lib/screeens/consumer_details/consumer_details_walk_through/walk_through.dart (3 hunks)
  • frontend/mgramseva/lib/screeens/household_detail/household_detail.dart (2 hunks)
  • frontend/mgramseva/lib/screeens/household_register/household_list.dart (2 hunks)
  • frontend/mgramseva/lib/utils/constants/i18_key_constants.dart (7 hunks)
  • frontend/mgramseva/lib/utils/testing_keys/testing_keys.dart (7 hunks)
  • frontend/mgramseva/lib/utils/validators/validators.dart (1 hunks)
  • frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js (3 hunks)
  • municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/consumer/DemandGenerationConsumer.java (2 hunks)
  • municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java (3 hunks)
  • municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java (1 hunks)
Files skipped from review due to trivial changes (7)
  • business-services/billing-service/src/main/resources/application.properties
  • business-services/billing-service/src/main/resources/db/migration/main/V20221130141020__egbs_bill_alter_add_userid.sql
  • frontend/mgramseva/lib/providers/common_provider.dart
  • frontend/mgramseva/lib/repository/billing_service_repo.dart
  • frontend/mgramseva/lib/screeens/connection_results/connection_details_card.dart
  • frontend/mgramseva/lib/screeens/household_detail/household_detail.dart
  • frontend/mgramseva/lib/utils/testing_keys/testing_keys.dart
Additional context used
Gitleaks
frontend/mgramseva/lib/utils/validators/validators.dart

58-58: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)


64-64: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)


68-68: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)

Additional comments not posted (45)
business-services/billing-service/src/main/resources/db/migration/main/V20221206104420__egbs_bill_alter_add_consumercode.sql (4)

1-1: The use of IF NOT EXISTS is a good practice to ensure idempotency of the migration script. Well done.


3-3: Proper usage of JOIN in the UPDATE statement to ensure accurate data association between bills and bill details.


5-5: Setting the consumercode column as NOT NULL is a good enforcement of data integrity.


7-7: The conditional index on active bills is an efficient way to handle uniqueness where it matters, reducing overhead on non-active entries.

frontend/mgramseva/lib/screeens/household_register/household_list.dart (1)

1-2: The addition of dart:convert and dart:developer suggests enhanced data handling and debugging capabilities. Ensure these imports are utilized effectively within the file.

frontend/mgramseva/lib/screeens/consumer_details/consumer_details_walk_through/walk_through.dart (3)

96-99: Proper configuration of RadioButtonFieldBuilder for handling consumer payment types. Ensure that all necessary validation and event handling logic is in place.


103-108: The addition of a required text field for consumer remarks is a good practice to ensure that important user feedback is not omitted.


66-66: The use of itemAsString to handle string representation of items in dropdowns enhances user interface flexibility. Verify that all item types are correctly handled by this method.

Also applies to: 79-79, 92-92

Verification successful

The itemAsString function is indeed used within the SelectFieldBuilder class, and it is passed as a required parameter. This confirms that the function is intended to handle the string representation of items and is correctly integrated within the widget.

  • frontend/mgramseva/lib/widgets/select_field_builder.dart:
    • final String Function(dynamic) itemAsString;
    • required this.itemAsString
    • itemAsString: widget.itemAsString

This implementation ensures that itemAsString is used consistently across different instances of SelectFieldBuilder.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all item types used in SelectFieldBuilder are correctly handled by the itemAsString method.

# Test: Search for all usages of SelectFieldBuilder to ensure correct handling.
rg --type dart $'SelectFieldBuilder'

Length of output: 3538



Script:

#!/bin/bash
# Description: Verify the implementation of itemAsString method in SelectFieldBuilder.

# Search for the definition of itemAsString within SelectFieldBuilder.
ast-grep --lang dart --pattern $'class SelectFieldBuilder extends StatefulWidget {
  $$$
  itemAsString($_) {
    $$$
  }
  $$$
}' frontend/mgramseva/lib/widgets/select_field_builder.dart

Length of output: 188



Script:

#!/bin/bash
# Description: Verify if itemAsString is passed as a parameter to SelectFieldBuilder.

# Search for the constructor of SelectFieldBuilder.
ast-grep --lang dart --pattern $'class SelectFieldBuilder extends StatefulWidget {
  const SelectFieldBuilder($_) {
    $$$
  }
}' frontend/mgramseva/lib/widgets/select_field_builder.dart

Length of output: 188



Script:

#!/bin/bash
# Description: Verify if itemAsString is passed as a parameter to SelectFieldBuilder in its usage context.

# Search for instances of SelectFieldBuilder and check for itemAsString being passed as a parameter.
rg --type dart 'SelectFieldBuilder' -A 5

Length of output: 19430



Script:

#!/bin/bash
# Description: Verify if itemAsString is used within the SelectFieldBuilder class or its state.

# Search for itemAsString within the SelectFieldBuilder class and its state.
rg --type dart 'itemAsString' frontend/mgramseva/lib/widgets/select_field_builder.dart

Length of output: 353

frontend/micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js (2)

50-59: Ensure that the conditional rendering logic for moduleForDivisionUser aligns with the intended access control requirements. It seems to only display for users with both DIV_ADMIN and MDMS_ADMIN roles. If this is as intended, the implementation is correct.


91-91: The spread operator to include moduleForDivisionUser in propsForModuleCard.links is used correctly. Ensure that this does not introduce any duplicates or override any existing properties unintentionally.

frontend/mgramseva/lib/providers/search_connection_provider.dart (1)

64-72: The method validatesearchConnectionDetails uses a conditional query based on isNameSearch. Ensure that this logic is clearly documented, as it's crucial for understanding the flow of data and conditions under which different queries are executed.

business-services/billing-service/src/main/java/org/egov/demand/repository/rowmapper/BillRowMapperV2.java (1)

53-53: The extraction of userId from the result set and its assignment to the BillV2 object is implemented correctly. Ensure that the column name b_payerid consistently corresponds to userId across all database scripts and queries.

frontend/mgramseva/lib/model/expenses_details/expenses_details.g.dart (4)

58-60: Converting dates and tax periods from num to int ensures that they are handled as whole numbers, which is typical for date and period representations. This is a good practice for clarity and to prevent potential fractional date issues.

Also applies to: 67-68


125-126: Converting timestamp fields createdTime and lastModifiedTime from num to int is suitable for timestamp data, which should be represented as integers. Ensure these fields are consistently handled as integers throughout the application.


12-12: The conversion of totalCount from num to int is a good practice for ensuring type safety. However, make sure that this change is reflected everywhere totalCount is utilized to avoid runtime type errors.

Verification successful

The search results indicate that totalCount is used in various files and contexts. Here are the key points:

  • Assignments and Initializations: totalCount is being assigned values from JSON and other sources, often with explicit type conversion to int.
  • Comparisons and Calculations: totalCount is used in comparisons and arithmetic operations, which require it to be an integer.
  • Widget Constructors and Parameters: totalCount is passed as a parameter to widgets, where it is expected to be an integer.

The change to ensure totalCount is converted to an integer in expenses_details.g.dart appears to be correctly reflected in other parts of the codebase, as all instances treat totalCount as an integer.

  • frontend/mgramseva/lib/widgets/pagination.dart uses totalCount as an int.
  • frontend/mgramseva/lib/screeens/notifications/notification_screen.dart and other screen files handle totalCount as an integer.
  • frontend/mgramseva/lib/providers files also treat totalCount as an integer in all relevant contexts.
  • The JSON serialization and deserialization in frontend/mgramseva/lib/model files ensure totalCount is an integer.

No issues were found with the usage of totalCount after ensuring its type safety as an integer.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify usage of totalCount to ensure it's correctly handled as an integer.
rg --type dart 'totalCount'

Length of output: 9410


108-108: Casting id from num to int is a prudent change for ensuring consistency in data types, particularly for identifiers which should be integers. Ensure that this id handling aligns with backend expectations.

frontend/mgramseva/lib/model/connection/water_connection.g.dart (2)

18-18: Converting fields like meterInstallationDate, proposedTaps, noOfTaps, previousReadingDate, and previousReading from num to int ensures correct data type usage for these fields, which typically should not have decimal values. This is a good implementation for data integrity.

Also applies to: 22-23, 29-30


86-87: The conversion of initialMeterReading and meterReading from num to int is appropriate as meter readings are typically whole numbers. Additionally, adding remarks as a string aligns with the need for textual user comments. Ensure these fields are used consistently across the application.

Also applies to: 99-99

frontend/mgramseva/lib/utils/validators/validators.dart (1)

58-58: The detected 'Generic API Key' issues by the static analysis tool seem to be false positives, as the lines in question involve dynamic key translation for error messages and do not include any sensitive API keys.

Also applies to: 64-64, 68-68

Tools
Gitleaks

58-58: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)

frontend/mgramseva/lib/components/dashboard/bills_table.dart (2)

117-132: The addition of sorting functionality with visual indicators (Icons.arrow_upward and Icons.arrow_downward_sharp) enhances user interactivity by providing clear feedback on the sorting status. Ensure that the callback and state management for sorting are robust to prevent UI inconsistencies.


142-146: The method columnRowIncreasedHeight dynamically adjusts row height based on label length, which is a thoughtful UI enhancement. However, ensure this method is tested across different devices to maintain a consistent user experience.

business-services/billing-service/src/main/java/org/egov/demand/repository/querybuilder/BillQueryBuilder.java (2)

25-27: Addition of new fields in INSERT_BILL_QUERY.

The addition of payerid and consumercode to the INSERT_BILL_QUERY aligns with the database schema changes and is correctly positioned in the query.


51-51: Adjustment of fields in BILL_BASE_QUERY.

The modification of BILL_BASE_QUERY to include payerid is consistent with the new database schema. Good attention to detail in maintaining the query structure.

frontend/mgramseva/lib/model/connection/property.dart (1)

191-192: Addition of remarks field and corresponding controller in Owners.

The addition of the remarks field and its corresponding controller in the Owners class is well implemented. The use of TextEditingController for handling form inputs is appropriate and follows Flutter best practices.

Also applies to: 209-211, 222-222, 231-231

frontend/mgramseva/lib/model/connection/water_connection.dart (1)

333-335: Addition of remarks field in AdditionalDetails.

The addition of the remarks field in the AdditionalDetails class of water_connection.dart is correctly implemented. This field will help in capturing additional information related to water connections, enhancing data richness.

business-services/billing-service/src/main/java/org/egov/demand/util/Constants.java (1)

178-189: New constants for bill cancellation reasons and messages are correctly declared and follow the existing naming conventions.

frontend/mgramseva/lib/model/connection/property.g.dart (2)

144-144: Ensure the remarks field is correctly handled in the fromJson method.


184-184: Ensure the remarks field is correctly handled in the toJson method.

municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java (1)

199-202: Direct use of tenantId from criteria simplifies the code by avoiding unnecessary variable declarations.

business-services/billing-service/src/main/java/org/egov/demand/service/BillServicev2.java (5)

103-106: The addition of imports related to user handling and object mapping is a good move if these functionalities are being utilized in the service methods.

Ensure all new functionalities using these imports are properly implemented and covered by unit tests.


147-154: The autowired fields producer, mapper, and the Kafka topic for bill cancellation are well initialized. This setup is crucial for the new functionality related to bill cancellation.
[APROVED]
Verify that these beans (Producer, ObjectMapper) are correctly configured in the Spring context and that the Kafka topic is correctly defined in your application properties.


Line range hint 173-184: The method cancelBill has been modified to include a validation step and to send notifications after updating the bill status. This is a robust design that ensures data integrity and user notification.

It's recommended to add error handling for potential exceptions from billRepository.updateBillStatus and sendNotificationForBillCancellation to enhance the method's robustness.


188-205: The sendNotificationForBillCancellation method is well implemented to handle the logic of sending notifications only if there are relevant bills. It uses the newly added producer bean to push notifications.

Consider adding logging before returning from the method when there are no bills or consumer codes, to aid in debugging and operational monitoring.


469-469: The addition of the userId in the BillV2 builder is aligned with the new requirement to track the user associated with a bill. This is crucial for auditing and tracking purposes.

Ensure that the userId is always populated correctly before being set here to avoid data inconsistencies.

frontend/mgramseva/lib/providers/consumer_details_provider.dart (3)

2-3: The imports for dart:convert and dart:developer have been added as part of this PR. Ensure their usage aligns with the new functionality introduced in this file.


454-464: The method getProperty has been modified to include new logic for handling properties. Ensure that the new logic correctly integrates with the existing functionalities and doesn't introduce regressions.


20-20: The import of search_connection_provider.dart has been added. Verify that the functionalities from this provider are integrated properly and used efficiently within this file.

frontend/mgramseva/lib/providers/household_register_provider.dart (1)

357-358: Ensure proper formatting of the mobile number.

The maskMobileNumber method is used here. Verify that this method handles all edge cases correctly, such as input lengths different from 10, non-numeric characters, etc.

frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart (1)

265-265: The implementation of CustomDetailsCard here seems to be missing a line number. Please verify if this is an intended part of the code or if there was an omission in the provided code snippet.

Verification successful

The CustomDetailsCard is indeed used in the new_consumer_bill.dart file at line 265. However, to ensure that the implementation is complete and correctly placed, we need to verify the surrounding context and ensure no lines are missing in the provided code snippet.


The surrounding lines of the CustomDetailsCard usage in new_consumer_bill.dart indicate that it is part of a larger widget structure and includes logical conditions. The provided snippet appears to be complete and correctly placed within the widget tree.

  • Location in codebase:
    • frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart at line 265

No missing lines or omissions were found around the CustomDetailsCard implementation in the provided context.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the presence of `CustomDetailsCard` implementation in the provided code snippet.
# Test: Search for `CustomDetailsCard` usage. Expect: At least one occurrence.
rg --type dart 'CustomDetailsCard'

Length of output: 586



Script:

#!/bin/bash
# Description: Extract surrounding lines of the `CustomDetailsCard` usage in `new_consumer_bill.dart` to verify completeness.
# Test: Display lines around the usage of `CustomDetailsCard` in `new_consumer_bill.dart`.
rg --type dart -A 10 -B 10 'CustomDetailsCard' frontend/mgramseva/lib/components/house_connection_and_bill/new_consumer_bill.dart

Length of output: 1494

frontend/mgramseva/lib/utils/constants/i18_key_constants.dart (5)

44-49: Ensure the newly added constants align with the naming conventions and usage consistency across the application.


418-419: The newly added constants CONSUMER_REMARKS_REQUIRED and CONSUMER_REMARKS are well-defined. Ensure their usage is consistent with the application's functionality regarding consumer remarks.


501-504: The constants related to service rates are correctly added. Ensure they are used in the corresponding service rate calculations and validations within the application.


654-654: The addition of CONSUMER_REMARKS_MSG is consistent with the other message constants. Ensure it is used in the correct context within the consumer-related walkthroughs or help sections.


484-484: The addition of REMARKS_VALIDATION is appropriate. Verify that this validation is implemented wherever remarks are input or edited in the application.

Verification successful

The REMARKS_VALIDATION key is used in the consumerRemarksValidator function in validators.dart, ensuring that remarks are validated correctly.

  • frontend/mgramseva/lib/utils/validators/validators.dart: consumerRemarksValidator function
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify usage of REMARKS_VALIDATION in the application.

# Test: Search for the usage of REMARKS_VALIDATION. Expect: Usage in form validations.
rg --type dart $'REMARKS_VALIDATION'

Length of output: 403



Script:

#!/bin/bash
# Extract the function or method in validators.dart that uses REMARKS_VALIDATION.
ast-grep --lang dart --pattern $'$_() {
  $$$
  REMARKS_VALIDATION
  $$$
}' frontend/mgramseva/lib/utils/validators/validators.dart

Length of output: 132



Script:

#!/bin/bash
# List all functions in validators.dart
ast-grep --lang dart --pattern $'$_() { $$$ }' frontend/mgramseva/lib/utils/validators/validators.dart

Length of output: 103



Script:

#!/bin/bash
# Search for function definitions in validators.dart and inspect the surrounding lines for REMARKS_VALIDATION.
rg '^[a-zA-Z_]+\s+[a-zA-Z_]+\s*\([^)]*\)\s*\{' frontend/mgramseva/lib/utils/validators/validators.dart -A 10

Length of output: 110



Script:

#!/bin/bash
# Search for REMARKS_VALIDATION in validators.dart and display surrounding lines for context.
rg 'REMARKS_VALIDATION' frontend/mgramseva/lib/utils/validators/validators.dart -C 5

Length of output: 742

frontend/mgramseva/lib/screeens/consumer_details/consumer_details.dart (1)

649-680: Add handling for the remarks field in ConsumerDetails.

This change correctly implements the handling for the remarks field when the consumer status is "Inactive". It aligns with the backend changes where remarks was added to the Property model.

@@ -129,6 +132,7 @@ class Common {

String get CONNECTION_ID => 'CONNECTION_ID'; //Connection ID
String get CONSUMER_NAME => 'CONSUMER_NAME'; //Consumer Name
String get CONSUMER_REMARKS => 'CONSUMER_REMARKS'; //Consumer Name
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment for CONSUMER_REMARKS seems to be a copy-paste error from the previous line. It should be updated to reflect the actual usage of the constant.

- String get CONSUMER_REMARKS => 'CONSUMER_REMARKS'; //Consumer Name
+ String get CONSUMER_REMARKS => 'CONSUMER_REMARKS'; //Consumer Remarks
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
String get CONSUMER_REMARKS => 'CONSUMER_REMARKS'; //Consumer Name
String get CONSUMER_REMARKS => 'CONSUMER_REMARKS'; //Consumer Remarks

Comment on lines +7 to +15

const ADMIN = Digit.Utils.hrmsAccess();
const STATE_ADMIN = Digit.UserService.hasAccess(["STATE_ADMIN"]);
const DIV_ADMIN = Digit.UserService.hasAccess(["DIV_ADMIN"]);
const MDMS_ADMIN = Digit.UserService.hasAccess(["MDMS_ADMIN"]);
if (!ADMIN) {
return null;
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a more descriptive variable name for role checks, such as isAdmin, isStateAdmin, etc., instead of generic names like ADMIN, STATE_ADMIN. This enhances readability and maintainability.

Comment on lines +78 to +87
if (value.waterConnectionData!.length > 0 ||
value.waterConnection!.length > 0)
{
waterConnections = value,
Navigator.pushNamed(
context, Routes.SEARCH_CONSUMER_RESULT,
arguments: {...inputJson, ...arguments, "isNameSearch" : isNameSearch })
context, Routes.SEARCH_CONSUMER_RESULT, arguments: {
...inputJson,
...arguments,
"isNameSearch": isNameSearch
})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The navigation logic after fetching connection results is complex and could benefit from further abstraction or at least detailed comments explaining each step, especially the conditions under which navigation occurs.

@@ -62,6 +62,7 @@
import java.util.UUID;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Importing java.util.stream.Stream seems unnecessary as there is no visible usage of streams that would necessitate this import in the provided code.

Please verify if the Stream import is used elsewhere in the file. If not, consider removing it to clean up unused imports.

Comment on lines +190 to +194
/*for (CalculationCriteria criteria : request.getCalculationCriteria()) {
Boolean genratedemand = true;
wsCalulationWorkflowValidator.applicationValidation(request.getRequestInfo(), criteria.getTenantId(),
criteria.getConnectionNo(), genratedemand);
}
}*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commented-out code for application validation within the generateDemandInBatch method seems to be deactivated for a reason. However, leaving commented code in production can lead to confusion and clutter.

Consider removing the commented-out code if it's no longer needed, or provide a clear comment on why it's retained (e.g., for potential future use).

@@ -159,7 +159,7 @@ class HouseholdRegisterProvider with ChangeNotifier {
(waterConnectionsDetails?.totalCount ?? 0))
? (waterConnectionsDetails!.totalCount!)
: (offset + limit) - 1));
} catch (e, s) {
} catch (e, s) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider more descriptive error messaging.

Improving the error message sent to the streamController.addError could enhance debugging and user feedback. Instead of a generic 'error', consider providing a more specific message or using the exception message.

Comment on lines +186 to +242
TableHeader(i18.common.CONNECTION_ID,
isSortingRequired: true,
isAscendingOrder:
sortBy != null && sortBy!.key == 'connectionNumber'
? sortBy!.isAscending
: null,
apiKey: 'connectionNumber',
callBack: onSort),
TableHeader(i18.common.NAME, isSortingRequired: false),
TableHeader(i18.common.GENDER, isSortingRequired: false),
TableHeader(i18.consumer.FATHER_SPOUSE_NAME, isSortingRequired: false),
TableHeader(i18.common.MOBILE_NUMBER, isSortingRequired: false),
TableHeader(i18.consumer.OLD_CONNECTION_ID, isSortingRequired: false),
TableHeader(i18.consumer.CONSUMER_CATEGORY, isSortingRequired: false),
TableHeader(i18.consumer.CONSUMER_SUBCATEGORY,
isSortingRequired: false),
TableHeader(i18.searchWaterConnection.PROPERTY_TYPE,
isSortingRequired: false),
TableHeader(i18.searchWaterConnection.CONNECTION_TYPE,
isSortingRequired: false),
TableHeader(i18.demandGenerate.METER_READING_DATE,
isSortingRequired: false),
TableHeader(i18.searchWaterConnection.METER_NUMBER,
isSortingRequired: false),
TableHeader(i18.demandGenerate.PREV_METER_READING_LABEL,
isSortingRequired: false),
TableHeader(i18.consumer.ARREARS_ON_CREATION, isSortingRequired: false),
TableHeader(i18.consumer.CORE_PENALTY_ON_CREATION,
isSortingRequired: false),
TableHeader(i18.consumer.CORE_ADVANCE_ON_CREATION,
isSortingRequired: false),
TableHeader(i18.common.CORE_TOTAL_BILL_AMOUNT,
isSortingRequired: false),
TableHeader(i18.billDetails.TOTAL_AMOUNT_COLLECTED,
isSortingRequired: false),
TableHeader(i18.common.CORE_ADVANCE_AS_ON_TODAY,
isSortingRequired: false),
TableHeader(i18.householdRegister.PENDING_COLLECTIONS,
isSortingRequired: true,
isAscendingOrder:
sortBy != null && sortBy!.key == 'collectionPendingAmount'
? sortBy!.isAscending
: null,
apiKey: 'collectionPendingAmount',
callBack: onSort),
TableHeader(i18.common.CREATED_ON_DATE, isSortingRequired: false),
TableHeader(i18.householdRegister.LAST_BILL_GEN_DATE,
isSortingRequired: true,
apiKey: 'lastDemandGeneratedDate',
isAscendingOrder:
sortBy != null && sortBy!.key == 'lastDemandGeneratedDate'
? sortBy!.isAscending
: null,
callBack: onSort),
TableHeader(i18.householdRegister.ACTIVE_INACTIVE,
isSortingRequired: false, apiKey: 'status'),
];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor to improve maintainability by reducing redundancy.

The creation of TableHeader instances is repetitive with many shared parameters. Consider creating a helper method to generate these headers to reduce redundancy and improve code maintainability.

TableHeader createTableHeader(String key, bool isSortingRequired, {bool? isAscendingOrder}) {
  return TableHeader(
    i18.common.translate(key),
    isSortingRequired: isSortingRequired,
    isAscendingOrder: isAscendingOrder,
    apiKey: key,
    callBack: onSort
  );
}

Then replace the repetitive TableHeader instantiations with calls to this new method.

@@ -377,13 +409,12 @@ class HouseholdRegisterProvider with ChangeNotifier {
'${connection.additionalDetails?.lastDemandGeneratedDate != null && connection.additionalDetails?.lastDemandGeneratedDate != '' ? DateFormats.timeStampToDate(int.parse(connection.additionalDetails?.lastDemandGeneratedDate ?? '')) : '-'}',
),
TableData(
'${connection.status.toString() == Constants.CONNECTION_STATUS.last ? 'Y' : 'N'}',
'${connection.status.toString().toLowerCase() == Constants.CONNECTION_STATUS.last.toLowerCase() ? 'Y' : 'N'}',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure consistent use of enums or constants for status checks.

The comparison of connection.status is done using a string comparison. This can be error-prone and hard to maintain. Consider using enums or defined constants for such comparisons to improve code safety and readability.

Comment on lines +596 to +634
'${connection.connectionNo ?? ''} ${connection.connectionType == 'Metered' ? '- M' : ''}',
'${connection.connectionHolders?.first.name ?? ''}',
'${connection.connectionHolders?.first.fatherOrHusbandName ?? ''}',
'${connection.additionalDetails?.collectionPendingAmount != null ? double.parse(connection.additionalDetails?.collectionPendingAmount ?? '') < 0.0 ? '-' : '₹ ${double.parse(connection.additionalDetails?.collectionPendingAmount ?? '0').abs()}' : '-'}',
'${connection.additionalDetails?.collectionPendingAmount != null ? double.parse(connection.additionalDetails?.collectionPendingAmount ?? '') < 0.0 ? '₹ ${double.parse(connection.additionalDetails?.collectionPendingAmount ?? '0').abs()}' : '₹ 0' : '₹ 0'}',
'${connection.status.toString() == Constants.CONNECTION_STATUS.last ? 'Y' : 'N'}',
'${connection.additionalDetails?.lastDemandGeneratedDate != null && connection.additionalDetails?.lastDemandGeneratedDate != '' ? DateFormats.timeStampToDate(int.parse(connection.additionalDetails?.lastDemandGeneratedDate ?? '')) : '-'}'
])
.toList() ??
[];
var excelTableData = waterConnectionsDetails.waterConnection
?.map<List<String>>((connection) => [
'${commonProvider.userDetails?.selectedtenant?.city?.code ?? 'NA'}',
'${ApplicationLocalizations.of(context).translate(connection.tenantId ?? 'NA')}',
'${connection.tenantId ?? 'NA'}',
'${connection.connectionHolders?.first.name ?? 'NA'}',
'${ApplicationLocalizations.of(context).translate(connection.connectionHolders?.first.gender ?? 'NA')}',
'${connection.connectionHolders?.first.fatherOrHusbandName ?? 'NA'}',
maskMobileNumber('${connection.connectionHolders?.first.mobileNumber ?? 'NA'}'),
'${connection.oldConnectionNo ?? 'NA'}',
'${connection.connectionNo ?? 'NA'}',
'${ApplicationLocalizations.of(context).translate(connection.additionalDetails?.category ?? 'NA')}',
'${ApplicationLocalizations.of(context).translate(connection.additionalDetails?.subCategory ?? 'NA')}',
'${ApplicationLocalizations.of(context).translate(connection.additionalDetails?.propertyType ?? 'NA')}',
'${ApplicationLocalizations.of(context).translate(connection.connectionType ?? 'NA')}',
'${connection.connectionType == 'Metered' ?connection.additionalDetails?.lastDemandGeneratedDate != null && connection.additionalDetails?.lastDemandGeneratedDate != '' ? DateFormats.timeStampToDate(int.parse(connection.additionalDetails?.lastDemandGeneratedDate ?? 'NA')) :'NA' :'NA' }',
'${connection.connectionType == 'Metered' ? connection.meterId :'NA' }',
'${connection.connectionType == 'Metered' ? connection.additionalDetails?.meterReading :'NA' }',
'${connection.arrears != null ? '₹ ${connection.arrears}' : '-'}',
'${connection.penalty != null ? '₹ ${connection.penalty}' : '-'}',
'${connection.advance != null ? '₹ ${connection.advance}' : '-'}',
'${connection.additionalDetails?.totalAmount != null ? '₹ ${connection.additionalDetails?.totalAmount}' : '-'}',
'${connection.additionalDetails?.collectionAmount != null ? '₹ ${connection.additionalDetails?.collectionAmount}' : '-'}',
'${connection.additionalDetails?.collectionPendingAmount != null ? double.parse(connection.additionalDetails?.collectionPendingAmount ?? '') < 0.0 ? '₹ ${double.parse(connection.additionalDetails?.collectionPendingAmount ?? '0').abs()}' : '-' : '-'}',
'${connection.additionalDetails?.collectionPendingAmount != null ? double.parse(connection.additionalDetails?.collectionPendingAmount ?? '') < 0.0 ? '-' : '₹ ${double.parse(connection.additionalDetails?.collectionPendingAmount ?? '0').abs()}' : '-'}',
'${connection.additionalDetails?.appCreatedDate != null ? DateFormats.timeStampToDate(connection.additionalDetails?.appCreatedDate?.toInt()) : '-'}',
'${connection.additionalDetails?.lastDemandGeneratedDate != null && connection.additionalDetails?.lastDemandGeneratedDate != '' ? DateFormats.timeStampToDate(int.parse(connection.additionalDetails?.lastDemandGeneratedDate ?? '')) : '-'}',
'${connection.status.toString() == Constants.CONNECTION_STATUS.last ? 'Y' : 'N'}',
'${commonProvider.userDetails?.selectedtenant?.city?.code ?? 'NA'}',
'${ApplicationLocalizations.of(context).translate(connection.tenantId ?? 'NA')}',
'${connection.tenantId ?? 'NA'}',
'${connection.connectionHolders?.first.name ?? 'NA'}',
'${ApplicationLocalizations.of(context).translate(connection.connectionHolders?.first.gender ?? 'NA')}',
'${connection.connectionHolders?.first.fatherOrHusbandName ?? 'NA'}',
maskMobileNumber(
'${connection.connectionHolders?.first.mobileNumber ?? 'NA'}'),
'${connection.oldConnectionNo ?? 'NA'}',
'${connection.connectionNo ?? 'NA'}',
'${ApplicationLocalizations.of(context).translate(connection.additionalDetails?.category ?? 'NA')}',
'${ApplicationLocalizations.of(context).translate(connection.additionalDetails?.subCategory ?? 'NA')}',
'${ApplicationLocalizations.of(context).translate(connection.additionalDetails?.propertyType ?? 'NA')}',
'${ApplicationLocalizations.of(context).translate(connection.connectionType ?? 'NA')}',
'${connection.connectionType == 'Metered' ? connection.additionalDetails?.lastDemandGeneratedDate != null && connection.additionalDetails?.lastDemandGeneratedDate != '' ? DateFormats.timeStampToDate(int.parse(connection.additionalDetails?.lastDemandGeneratedDate ?? 'NA')) : 'NA' : 'NA'}',
'${connection.connectionType == 'Metered' ? connection.meterId : 'NA'}',
'${connection.connectionType == 'Metered' ? connection.additionalDetails?.meterReading : 'NA'}',
'${connection.arrears != null ? '₹ ${connection.arrears}' : '-'}',
'${connection.penalty != null ? '₹ ${connection.penalty}' : '-'}',
'${connection.advance != null ? '₹ ${connection.advance}' : '-'}',
'${connection.additionalDetails?.totalAmount != null ? '₹ ${connection.additionalDetails?.totalAmount}' : '-'}',
'${connection.additionalDetails?.collectionAmount != null ? '₹ ${connection.additionalDetails?.collectionAmount}' : '-'}',
'${connection.additionalDetails?.collectionPendingAmount != null ? double.parse(connection.additionalDetails?.collectionPendingAmount ?? '') < 0.0 ? '₹ ${double.parse(connection.additionalDetails?.collectionPendingAmount ?? '0').abs()}' : '-' : '-'}',
'${connection.additionalDetails?.collectionPendingAmount != null ? double.parse(connection.additionalDetails?.collectionPendingAmount ?? '') < 0.0 ? '-' : '₹ ${double.parse(connection.additionalDetails?.collectionPendingAmount ?? '0').abs()}' : '-'}',
'${connection.additionalDetails?.appCreatedDate != null ? DateFormats.timeStampToDate(connection.additionalDetails?.appCreatedDate?.toInt()) : '-'}',
'${connection.additionalDetails?.lastDemandGeneratedDate != null && connection.additionalDetails?.lastDemandGeneratedDate != '' ? DateFormats.timeStampToDate(int.parse(connection.additionalDetails?.lastDemandGeneratedDate ?? '')) : '-'}',
'${connection.status.toString() == Constants.CONNECTION_STATUS.last ? 'Y' : 'N'}',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optimize data transformation for PDF and Excel generation.

The transformation logic for PDF and Excel data generation is duplicated and could be refactored into a single method that accepts parameters to handle differences between PDF and Excel data requirements. This would reduce code duplication and improve maintainability.

Comment on lines +315 to +316
: waterconnection.addharCtrl.text.trim(),
"remarks": property.owners?.first.remarks
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Ensure that the aadharNumber field is sanitized and validated before use. The current codebase does not show specific sanitization or validation logic for this field, which is a potential security risk.

  • frontend/mgramseva/lib/providers/consumer_details_provider.dart
  • frontend/mgramseva/lib/model/connection/water_connection.dart
Analysis chain

The field aadharNumber is conditionally added to additionalDetails. Ensure that the Aadhar number is sanitized and validated before being used here to avoid potential security risks.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the sanitization and validation of `aadharNumber`.

# Test: Search for the validation logic of `aadharNumber` in the codebase.
rg --type dart $'validateAadharNumber'

Length of output: 37



Script:

#!/bin/bash
# Description: Broaden the search to verify the sanitization and validation of `aadharNumber`.

# Search for any references to `aadharNumber` in the codebase.
rg --type dart 'aadharNumber'

# Search for common validation functions or patterns that might be used for `aadharNumber`.
rg --type dart 'validate|sanitize|regex|pattern|isValid|isAadhar'

Length of output: 14640

debasishchakraborty-egovt and others added 2 commits June 14, 2024 20:00
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 511cb08 and 1d8c2ae.

Files selected for processing (1)
  • business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java (1 hunks)
Additional comments not posted (1)
business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java (1)

687-687: The change in rounding mode from CEILING to HALF_UP for totalApplicablePenalty is correctly implemented. This should provide a more balanced rounding approach compared to always rounding up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants