Life-Pill / pharmacy-pos-main-backend

The Pharmacy POS System Backend is the server-side component of our comprehensive pharmacy management software. It is developed using Spring Boot, Java, Spring Security ,and Microservices Architecture
Apache License 2.0
5 stars 3 forks source link

`branchId` always returns zero in endpoint `/lifepill/v1/employers/get-by-id` #110

Closed TheTharz closed 5 months ago

TheTharz commented 5 months ago

Issue Title:

branchId always returns zero in endpoint /lifepill/v1/employers/get-by-id

Description:

Currently, when accessing the endpoint /lifepill/v1/employers/get-by-id, the branchId field for an employer is consistently returning zero, even though it should be the assigned branch ID. This issue is causing inaccuracies in the data retrieval process.

Steps to Reproduce:

  1. Make a request to the /lifepill/v1/employers/get-by-id endpoint with an employer ID.
  2. Check the returned data for the branchId field.

Expected Behavior:

The branchId field should return the correct assigned branch ID for the employer.

Actual Behavior:

The branchId field is always returning zero.

Additional Information:

PramithaMJ commented 5 months ago

Issue Title: Fixed branchId always returning zero in endpoint /lifepill/v1/employers/get-by-id

Description: The issue where the branchId field for an employer was consistently returning zero when accessing the endpoint /lifepill/v1/employers/get-by-id has been resolved. The branchId field now correctly returns the assigned branch ID for the employer, ensuring accurate data retrieval.

Steps Taken to Resolve:

  1. Reviewed the backend code to ensure that the branchId is correctly assigned to the employer during creation and updates.
  2. Verified that the branchId is correctly stored in the database for the affected employers.
  3. Checked the endpoint configuration and serialization process to ensure they are functioning as expected.
  4. Identified and fixed the issue causing the branchId to always return zero.

Expected Behavior Now: The branchId field now returns the correct assigned branch ID for the employer when making a request to the /lifepill/v1/employers/get-by-id endpoint.

Additional Information: This fix should improve the accuracy of employer data retrieval. Please verify on your end and close the issue if resolved.

Best regards,
Pramitha Jayasooriya, Backend Developer at LifePill, https://pramithamj.me