TASK-2026-00376: Bureau Trip Sheet and Monthly Consolidated Trip Sheet Enhancements for Bata, Fuel Expense, OT, and Supplier Settlement Calculation#1456
Merged
MhmdSinanKT merged 5 commits intodevelopfrom Mar 18, 2026
Conversation
MhmdSinanKT
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature description
Bureau Trip Sheet and Monthly Consolidated Trip Sheet updates: parent-only OT/total hours and batta calculation (no child table), correct total OT batta on save, fuel card expense deduction from bureau fuel card, and settlement via Journal Entry instead of Purchase Invoice
Solution description
Bureau Trip Sheet: calculate_hours_and_days() and calculate_ot_batta() now work on parent fields (starting_date_and_time, ending_date_and_time, total_hours, ot_batta). Server-side calculate_total_ot_batta() computes OT using get_ot_working_hours(supplier) so saved docs show the right total. Renamed settlement button/add vs submit to avoid calling the API on refresh; added supplier/total_hours checks before calling get_ot_working_hours.
Monthly Consolidated Trip Sheet: Server sets total_distance_travelled, total_fuel_consumed, and total_fuel_expense on validate. Entered total_fuel_card_expense is validated against bureau fuel card limit and applied in on_update (and restored on delete). Replaced Purchase Invoice with Journal Entry creation: debits (Batta, OT, Fuel Expense) and credits (Fuel Card, Advance) from Beams Accounts Settings, balancing on Supplier; set party_type/party on Payable/Receivable rows so ERPNext validation passes.
Output screenshots (optional)
Was this feature tested on these browsers?