Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
20 changes: 20 additions & 0 deletions beams/beams/doctype/bureau_trip_sheet/bureau_trip_sheet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) 2024, efeone and contributors
// For license information, please see license.txt

frappe.ui.form.on("Bureau Trip Sheet", {
refresh: function (frm) {
filter_supplier_field(frm);
}

});

// Function to filter the supplier field
function filter_supplier_field(frm) {
frm.set_query("supplier", function () {
return {
filters: {
is_transporter: 1
}
};
});
}
183 changes: 183 additions & 0 deletions beams/beams/doctype/bureau_trip_sheet/bureau_trip_sheet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:BTS-{YY}-{####}",
"creation": "2025-03-24 15:17:02.532199",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"section_break_qq5d",
"supplier",
"bureau",
"column_break_psaw",
"company",
"section_break_qavf",
"is_overnight_stay",
"is_travelling_outside_kerala",
"daily_batta_with_overnight_stay",
"daily_batta_without_overnight_stay",
"column_break_hzfr",
"ot_batta",
"batta",
"section_break_tjbr",
"work_details",
"trip_details_section",
"departure_location",
"destination_location",
"column_break_cdph",
"ending_date_and_time",
"starting_date_and_time",
"amended_from"
],
"fields": [
{
"fieldname": "section_break_qq5d",
"fieldtype": "Section Break"
},
{
"fieldname": "supplier",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Supplier",
"options": "Supplier"
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
},
{
"fieldname": "bureau",
"fieldtype": "Link",
"label": "Bureau",
"options": "Bureau"
},
{
"fieldname": "section_break_qavf",
"fieldtype": "Section Break"
},
{
"fetch_from": "supplier.ot_batta",
"fieldname": "ot_batta",
"fieldtype": "Currency",
"label": "OT Batta"
},
{
"fieldname": "daily_batta_without_overnight_stay",
"fieldtype": "Currency",
"label": "Daily Batta Without Overnight Stay"
},
{
"default": "0",
"fieldname": "is_overnight_stay",
"fieldtype": "Check",
"label": "Is Overnight Stay"
},
{
"default": "0",
"fieldname": "is_travelling_outside_kerala",
"fieldtype": "Check",
"label": " Is Travelling Outside Kerala"
},
{
"fieldname": "daily_batta_with_overnight_stay",
"fieldtype": "Currency",
"label": "Daily Batta With Overnight Stay"
},
{
"fieldname": "batta",
"fieldtype": "Currency",
"label": "Batta"
},
{
"fieldname": "column_break_hzfr",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_tjbr",
"fieldtype": "Section Break"
},
{
"fieldname": "work_details",
"fieldtype": "Table",
"label": "Work Details",
"options": "Trip Details"
},
{
"fieldname": "trip_details_section",
"fieldtype": "Section Break",
"label": "Trip Details"
},
{
"fieldname": "departure_location",
"fieldtype": "Link",
"label": "Departure Location",
"options": "Location"
},
{
"fieldname": "destination_location",
"fieldtype": "Link",
"label": "Destination Location",
"options": "Location"
},
{
"fieldname": "ending_date_and_time",
"fieldtype": "Datetime",
"in_list_view": 1,
"label": "Ending Date and Time "
},
{
"fieldname": "starting_date_and_time",
"fieldtype": "Datetime",
"in_list_view": 1,
"label": "Starting Date and Time "
},
{
"fieldname": "column_break_cdph",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_psaw",
"fieldtype": "Column Break"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Bureau Trip Sheet",
"print_hide": 1,
"read_only": 1,
"search_index": 1
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-03-25 12:23:17.388355",
"modified_by": "Administrator",
"module": "BEAMS",
"name": "Bureau Trip Sheet",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"submit": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
10 changes: 10 additions & 0 deletions beams/beams/doctype/bureau_trip_sheet/bureau_trip_sheet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2024, efeone and contributors
# For license information, please see license.txt


import frappe
from frappe.model.document import Document
from frappe import _

class BureauTripSheet(Document):
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2025, efeone and Contributors
# See license.txt

# import frappe
from frappe.tests.utils import FrappeTestCase


class TestBureauTripSheet(FrappeTestCase):
pass
Empty file.
Loading