Skip to content

Comments

Task 2025 00504: Bureau Trip Sheet calculation#880

Merged
SherinKR merged 2 commits intomasterfrom
TASK-2025-00504
Apr 3, 2025
Merged

Task 2025 00504: Bureau Trip Sheet calculation#880
SherinKR merged 2 commits intomasterfrom
TASK-2025-00504

Conversation

@arathipk
Copy link
Contributor

@arathipk arathipk commented Mar 29, 2025

Feature description

--Implement food allowance calculation based on travel conditions
--Add allowance calculation based on travel details

Solution description

-->For batta allowance calculation based on travel conditions.

  1) Input Sanitization: Converts total_distance_travelled_km and total_hours to float values.
  2) Fetch Policy Data: Retrieves the Batta Policy for the designation (Driver) and extracts allowance values.
  3) Boolean Conversion: Converts is_travelling_outside_kerala and is_overnight_stay to boolean.
  4) Allowance Calculation:
      a) With Overnight Stay: Fetches outside_kerala__ or inside_kerala__ allowance.
      b) Without Overnight Stay: If travel exceeds 100 km & 8 hours, fetches outside_kerala or inside_kerala allowance.
      --enhanced travel allowance computation.

-->For calculate the food allowance (for breakfast, lunch, and dinner) based on the travel duration and meal times

  - Initialize Allowance: Sets default values for break_fast, lunch, and dinner as 0.
  - Fetch Policy Data: Checks if a Batta Policy exists for the given designation and retrieves meal allowances.
  - Validate Hours: If total_hrs exceeds 6 hours, meal allowances are considered.
  - Check Meal Timing:
      Same Day Travel: Compares from_date_time and to_date_time to predefined meal slots (04:00-09:00 for breakfast, 12:30-14:00 for lunch, 18:00-21:00 for dinner).
      Multi-Day Travel: Checks meal eligibility for both start and end dates, ensuring proper allowance allocation.

Output screenshots

Screencast.from.29-03-25.10.26.04.PM.IST.webm
Screencast.from.29-03-25.10.27.24.PM.IST.webm

Is there any existing behavior change of other features due to this code change?

 -- No. 

Was this feature tested on the browsers?

--Mozilla Firefox

@arathipk arathipk changed the base branch from develop to master March 29, 2025 17:00
@arathipk arathipk requested a review from MhmdSinanKT March 29, 2025 17:00
Copy link
Contributor

@MhmdSinanKT MhmdSinanKT left a comment

Choose a reason for hiding this comment

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

Please mention the calculation logic in PR

@arathipk arathipk requested a review from MhmdSinanKT April 1, 2025 10:43
@arathipk arathipk dismissed MhmdSinanKT’s stale review April 1, 2025 10:46

for uploading proper output screenshots

@SherinKR SherinKR merged commit ab65314 into master Apr 3, 2025
@SherinKR SherinKR deleted the TASK-2025-00504 branch April 3, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants