├── .gitignore ├── .mergify.yml ├── MANIFEST.in ├── README.md ├── license.txt ├── requirements.txt ├── setup.py └── trans_ms ├── __init__.py ├── config ├── __init__.py ├── desktop.py └── docs.py ├── fixtures ├── custom_field.json └── property_setter.json ├── hooks.py ├── modules.txt ├── patches.txt ├── templates ├── __init__.py └── pages │ └── __init__.py ├── transport_management ├── __init__.py ├── doctype │ ├── __init__.py │ ├── air_system_checklist │ │ ├── __init__.py │ │ ├── air_system_checklist.json │ │ └── air_system_checklist.py │ ├── air_system_details │ │ ├── __init__.py │ │ ├── air_system_details.json │ │ └── air_system_details.py │ ├── brake_checklist │ │ ├── __init__.py │ │ ├── brake_checklist.json │ │ └── brake_checklist.py │ ├── brake_system_details │ │ ├── __init__.py │ │ ├── brake_system_details.json │ │ └── brake_system_details.py │ ├── cargo_details │ │ ├── __init__.py │ │ ├── cargo_details.json │ │ └── cargo_details.py │ ├── driver_document_attachment │ │ ├── __init__.py │ │ ├── driver_document_attachment.json │ │ └── driver_document_attachment.py │ ├── driver_documents │ │ ├── __init__.py │ │ ├── driver_documents.js │ │ ├── driver_documents.json │ │ ├── driver_documents.py │ │ └── test_driver_documents.py │ ├── electrical_checklist │ │ ├── __init__.py │ │ ├── electrical_checklist.json │ │ └── electrical_checklist.py │ ├── electrical_details │ │ ├── __init__.py │ │ ├── electrical_details.json │ │ └── electrical_details.py │ ├── electronics_checklist │ │ ├── __init__.py │ │ ├── electronics_checklist.json │ │ └── electronics_checklist.py │ ├── electronics_details │ │ ├── __init__.py │ │ ├── electronics_details.json │ │ └── electronics_details.py │ ├── engine_checklist │ │ ├── __init__.py │ │ ├── engine_checklist.json │ │ └── engine_checklist.py │ ├── engine_details │ │ ├── __init__.py │ │ ├── engine_details.json │ │ └── engine_details.py │ ├── expense │ │ ├── __init__.py │ │ ├── expense.js │ │ ├── expense.json │ │ ├── expense.py │ │ └── test_expense.py │ ├── fixed_expense │ │ ├── __init__.py │ │ ├── fixed_expense.js │ │ ├── fixed_expense.json │ │ ├── fixed_expense.py │ │ └── test_fixed_expense.py │ ├── fixed_expense_table │ │ ├── __init__.py │ │ ├── fixed_expense_table.json │ │ └── fixed_expense_table.py │ ├── fuel_request │ │ ├── __init__.py │ │ ├── fuel_request.js │ │ ├── fuel_request.json │ │ ├── fuel_request.py │ │ └── test_fuel_request.py │ ├── fuel_request_table │ │ ├── __init__.py │ │ ├── fuel_request_table.json │ │ └── fuel_request_table.py │ ├── fuel_system_checklist │ │ ├── __init__.py │ │ ├── fuel_system_checklist.json │ │ └── fuel_system_checklist.py │ ├── fuel_system_details │ │ ├── __init__.py │ │ ├── fuel_system_details.json │ │ └── fuel_system_details.py │ ├── lighting_checklist │ │ ├── __init__.py │ │ ├── lighting_checklist.json │ │ └── lighting_checklist.py │ ├── lighting_checklist_details │ │ ├── __init__.py │ │ ├── lighting_checklist_details.json │ │ └── lighting_checklist_details.py │ ├── power_train_checklist │ │ ├── __init__.py │ │ ├── power_train_checklist.json │ │ └── power_train_checklist.py │ ├── power_train_details │ │ ├── __init__.py │ │ ├── power_train_details.json │ │ └── power_train_details.py │ ├── reference_payment_table │ │ ├── __init__.py │ │ ├── reference_payment_table.json │ │ └── reference_payment_table.py │ ├── requested_funds_accounts_table │ │ ├── __init__.py │ │ ├── requested_funds_accounts_table.json │ │ └── requested_funds_accounts_table.py │ ├── requested_funds_details │ │ ├── __init__.py │ │ ├── requested_funds_details.json │ │ └── requested_funds_details.py │ ├── requested_payments │ │ ├── __init__.py │ │ ├── requested_payments.js │ │ ├── requested_payments.json │ │ ├── requested_payments.py │ │ └── test_requested_payments.py │ ├── route_steps_table │ │ ├── __init__.py │ │ ├── route_steps_table.json │ │ └── route_steps_table.py │ ├── steering_checklist │ │ ├── __init__.py │ │ ├── steering_checklist.json │ │ └── steering_checklist.py │ ├── steering_details │ │ ├── __init__.py │ │ ├── steering_details.json │ │ └── steering_details.py │ ├── suspension_checklist │ │ ├── __init__.py │ │ ├── suspension_checklist.json │ │ └── suspension_checklist.py │ ├── suspension_details │ │ ├── __init__.py │ │ ├── suspension_details.json │ │ └── suspension_details.py │ ├── tire_checklist │ │ ├── __init__.py │ │ ├── tire_checklist.json │ │ └── tire_checklist.py │ ├── tire_details │ │ ├── __init__.py │ │ ├── tire_details.json │ │ └── tire_details.py │ ├── tires_checklist │ │ ├── __init__.py │ │ ├── tires_checklist.json │ │ └── tires_checklist.py │ ├── tires_details │ │ ├── __init__.py │ │ ├── tires_details.json │ │ └── tires_details.py │ ├── trailer │ │ ├── __init__.py │ │ ├── test_trailer.js │ │ ├── test_trailer.py │ │ ├── trailer.js │ │ ├── trailer.json │ │ └── trailer.py │ ├── transport_accounting_dimension │ │ ├── __init__.py │ │ ├── test_transport_accounting_dimension.py │ │ ├── transport_accounting_dimension.js │ │ ├── transport_accounting_dimension.json │ │ └── transport_accounting_dimension.py │ ├── transport_assignment │ │ ├── __init__.py │ │ ├── test_transport_assignment.py │ │ ├── transport_assignment.js │ │ ├── transport_assignment.json │ │ └── transport_assignment.py │ ├── transport_cargo_type │ │ ├── __init__.py │ │ ├── test_transport_cargo_type.py │ │ ├── transport_cargo_type.js │ │ ├── transport_cargo_type.json │ │ └── transport_cargo_type.py │ ├── transport_cargo_type_permit │ │ ├── __init__.py │ │ ├── transport_cargo_type_permit.json │ │ └── transport_cargo_type_permit.py │ ├── transport_cash_account_group │ │ ├── __init__.py │ │ ├── transport_cash_account_group.json │ │ └── transport_cash_account_group.py │ ├── transport_expense_account_group │ │ ├── __init__.py │ │ ├── test_transport_expense_account_group.py │ │ ├── transport_expense_account_group.js │ │ ├── transport_expense_account_group.json │ │ └── transport_expense_account_group.py │ ├── transport_location │ │ ├── __init__.py │ │ ├── test_transport_location.py │ │ ├── transport_location.js │ │ ├── transport_location.json │ │ └── transport_location.py │ ├── transport_settings │ │ ├── __init__.py │ │ ├── test_transport_settings.py │ │ ├── transport_settings.js │ │ ├── transport_settings.json │ │ └── transport_settings.py │ ├── transportation_order │ │ ├── __init__.py │ │ ├── test_transportation_order.py │ │ ├── transportation_order.js │ │ ├── transportation_order.json │ │ └── transportation_order.py │ ├── trip_attachment │ │ ├── __init__.py │ │ ├── trip_attachment.json │ │ └── trip_attachment.py │ ├── trip_cargo_permit │ │ ├── __init__.py │ │ ├── test_trip_cargo_permit.py │ │ ├── trip_cargo_permit.js │ │ ├── trip_cargo_permit.json │ │ └── trip_cargo_permit.py │ ├── trip_location │ │ ├── __init__.py │ │ ├── test_trip_location.py │ │ ├── trip_location.js │ │ ├── trip_location.json │ │ └── trip_location.py │ ├── trip_location_type │ │ ├── __init__.py │ │ ├── test_trip_location_type.py │ │ ├── trip_location_type.js │ │ ├── trip_location_type.json │ │ └── trip_location_type.py │ ├── trip_route │ │ ├── __init__.py │ │ ├── test_trip_route.py │ │ ├── trip_route.js │ │ ├── trip_route.json │ │ └── trip_route.py │ ├── trip_steps_table │ │ ├── __init__.py │ │ ├── trip_steps_table.json │ │ └── trip_steps_table.py │ ├── vehicle_axle_type │ │ ├── __init__.py │ │ ├── test_vehicle_axle_type.py │ │ ├── vehicle_axle_type.js │ │ ├── vehicle_axle_type.json │ │ └── vehicle_axle_type.py │ ├── vehicle_checklist │ │ ├── __init__.py │ │ ├── test_vehicle_checklist.js │ │ ├── test_vehicle_checklist.py │ │ ├── vehicle_checklist.js │ │ ├── vehicle_checklist.json │ │ └── vehicle_checklist.py │ ├── vehicle_documents │ │ ├── __init__.py │ │ ├── vehicle_documents.json │ │ └── vehicle_documents.py │ ├── vehicle_documents_type │ │ ├── __init__.py │ │ ├── test_vehicle_documents_type.js │ │ ├── test_vehicle_documents_type.py │ │ ├── vehicle_documents_type.js │ │ ├── vehicle_documents_type.json │ │ └── vehicle_documents_type.py │ ├── vehicle_inspection │ │ ├── __init__.py │ │ ├── test_vehicle_inspection.js │ │ ├── test_vehicle_inspection.py │ │ ├── vehicle_inspection.js │ │ ├── vehicle_inspection.json │ │ └── vehicle_inspection.py │ ├── vehicle_inspection_template │ │ ├── __init__.py │ │ ├── test_vehicle_inspection_template.js │ │ ├── test_vehicle_inspection_template.py │ │ ├── vehicle_inspection_template.js │ │ ├── vehicle_inspection_template.json │ │ └── vehicle_inspection_template.py │ ├── vehicle_log │ │ ├── __init__.py │ │ ├── test_vehicle_log.js │ │ ├── test_vehicle_log.py │ │ ├── vehicle_log.js │ │ ├── vehicle_log.json │ │ └── vehicle_log.py │ ├── vehicle_routine_checklist │ │ ├── __init__.py │ │ ├── test_vehicle_routine_checklist.js │ │ ├── test_vehicle_routine_checklist.py │ │ ├── vehicle_routine_checklist.js │ │ ├── vehicle_routine_checklist.json │ │ └── vehicle_routine_checklist.py │ ├── vehicle_service │ │ ├── __init__.py │ │ ├── vehicle_service.json │ │ └── vehicle_service.py │ ├── vehicle_trip │ │ ├── __init__.py │ │ ├── test_vehicle_trip.js │ │ ├── test_vehicle_trip.py │ │ ├── vehicle_trip.js │ │ ├── vehicle_trip.json │ │ ├── vehicle_trip.py │ │ └── vehicle_trip_dashboard.py │ ├── vehicle_trip_location_update │ │ ├── __init__.py │ │ ├── vehicle_trip_location_update.json │ │ └── vehicle_trip_location_update.py │ └── vehicle_type │ │ ├── __init__.py │ │ ├── test_vehicle_type.js │ │ ├── test_vehicle_type.py │ │ ├── vehicle_type.js │ │ ├── vehicle_type.json │ │ └── vehicle_type.py ├── report │ ├── __init__.py │ ├── document_expiry_alert_report │ │ ├── __init__.py │ │ └── document_expiry_alert_report.json │ ├── driver_document_expiry_alert_report │ │ ├── __init__.py │ │ └── driver_document_expiry_alert_report.json │ └── vehicle_tracking_report │ │ ├── __init__.py │ │ ├── vehicle_tracking_report.js │ │ ├── vehicle_tracking_report.json │ │ └── vehicle_tracking_report.py └── workspace │ └── transport │ └── transport.json └── utlis ├── __init__.py └── dimension.py /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | *.egg-info 4 | *.swp 5 | tags 6 | trans_ms/docs/current -------------------------------------------------------------------------------- /.mergify.yml: -------------------------------------------------------------------------------- 1 | pull_request_rules: 2 | - name: Assign author to review conflict and add label of 'conflict' 3 | conditions: 4 | - conflict 5 | actions: 6 | label: 7 | add: 8 | - conflict 9 | assign: 10 | add_users: 11 | - aakvatech 12 | - "{{author}}" 13 | comment: 14 | message: "@{{author}} this pull request is now in conflict 😩" 15 | 16 | 17 | - name: backport to version-14 branch 18 | conditions: 19 | - label = version-14 20 | actions: 21 | backport: 22 | branches 23 | - version-14 24 | assignees: 25 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in 2 | include requirements.txt 3 | include *.json 4 | include *.md 5 | include *.py 6 | include *.txt 7 | recursive-include trans_ms *.css 8 | recursive-include trans_ms *.csv 9 | recursive-include trans_ms *.html 10 | recursive-include trans_ms *.ico 11 | recursive-include trans_ms *.js 12 | recursive-include trans_ms *.json 13 | recursive-include trans_ms *.md 14 | recursive-include trans_ms *.png 15 | recursive-include trans_ms *.py 16 | recursive-include trans_ms *.svg 17 | recursive-include trans_ms *.txt 18 | recursive-exclude trans_ms *.pyc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Transport Management 2 | 3 | App to Manage Transportation Business. 4 |  5 | 6 | #### License 7 | 8 | MIT 9 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | License: MIT -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # frappe -- https://github.com/frappe/frappe is installed via 'bench init' -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | with open("requirements.txt") as f: 4 | install_requires = f.read().strip().split("\n") 5 | 6 | # get version from __version__ variable in trans_ms/__init__.py 7 | from trans_ms import __version__ as version 8 | 9 | setup( 10 | name="trans_ms", 11 | version=version, 12 | description="App to Manage Transportation Business.", 13 | author="Aakvatech Limited", 14 | author_email="info@aakvatech.com", 15 | packages=find_packages(), 16 | zip_safe=False, 17 | include_package_data=True, 18 | install_requires=install_requires 19 | ) 20 | -------------------------------------------------------------------------------- /trans_ms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | __version__ = '0.0.1' 3 | 4 | -------------------------------------------------------------------------------- /trans_ms/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/config/__init__.py -------------------------------------------------------------------------------- /trans_ms/config/desktop.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return [ 5 | { 6 | "module_name": "Transport Management", 7 | "color": "grey", 8 | "icon": "octicon octicon-file-directory", 9 | "type": "module", 10 | "label": _("Transport Management") 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /trans_ms/config/docs.py: -------------------------------------------------------------------------------- 1 | """ 2 | Configuration for docs 3 | """ 4 | 5 | # source_link = "https://github.com/[org_name]/trans_ms" 6 | # docs_base_url = "https://[org_name].github.io/trans_ms" 7 | # headline = "App that does everything" 8 | # sub_heading = "Yes, you got that right the first time, everything" 9 | 10 | def get_context(context): 11 | context.brand_html = "Transport Management" 12 | -------------------------------------------------------------------------------- /trans_ms/fixtures/property_setter.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /trans_ms/hooks.py: -------------------------------------------------------------------------------- 1 | from . import __version__ as app_version 2 | 3 | app_name = "trans_ms" 4 | app_title = "Transport Management" 5 | app_publisher = "Aakvatech Limited" 6 | app_description = "App to Manage Transportation Business." 7 | app_icon = "octicon octicon-file-directory" 8 | app_color = "grey" 9 | app_email = "info@aakvatech.com" 10 | app_license = "MIT" 11 | 12 | # Includes in
13 | # ------------------ 14 | 15 | # include js, css files in header of desk.html 16 | # app_include_css = "/assets/trans_ms/css/trans_ms.css" 17 | # app_include_js = "/assets/trans_ms/js/trans_ms.js" 18 | 19 | # include js, css files in header of web template 20 | # web_include_css = "/assets/trans_ms/css/trans_ms.css" 21 | # web_include_js = "/assets/trans_ms/js/trans_ms.js" 22 | 23 | # include custom scss in every website theme (without file extension ".scss") 24 | # website_theme_scss = "trans_ms/public/scss/website" 25 | 26 | # include js, css files in header of web form 27 | # webform_include_js = {"doctype": "public/js/doctype.js"} 28 | # webform_include_css = {"doctype": "public/css/doctype.css"} 29 | 30 | # include js in page 31 | # page_js = {"page" : "public/js/file.js"} 32 | 33 | # include js in doctype views 34 | # doctype_js = {"doctype" : "public/js/doctype.js"} 35 | # doctype_list_js = {"doctype" : "public/js/doctype_list.js"} 36 | # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} 37 | # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} 38 | 39 | # Home Pages 40 | # ---------- 41 | 42 | # application home page (will override Website Settings) 43 | # home_page = "login" 44 | 45 | # website user home page (by Role) 46 | # role_home_page = { 47 | # "Role": "home_page" 48 | # } 49 | 50 | # Generators 51 | # ---------- 52 | 53 | # automatically create page for each record of this doctype 54 | # website_generators = ["Web Page"] 55 | 56 | # Installation 57 | # ------------ 58 | 59 | # before_install = "trans_ms.install.before_install" 60 | # after_install = "trans_ms.install.after_install" 61 | 62 | # Desk Notifications 63 | # ------------------ 64 | # See frappe.core.notifications.get_notification_config 65 | 66 | # notification_config = "trans_ms.notifications.get_notification_config" 67 | 68 | # Permissions 69 | # ----------- 70 | # Permissions evaluated in scripted ways 71 | 72 | # permission_query_conditions = { 73 | # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", 74 | # } 75 | # 76 | # has_permission = { 77 | # "Event": "frappe.desk.doctype.event.event.has_permission", 78 | # } 79 | 80 | # DocType Class 81 | # --------------- 82 | # Override standard doctype classes 83 | 84 | # override_doctype_class = { 85 | # "ToDo": "custom_app.overrides.CustomToDo" 86 | # } 87 | 88 | # Document Events 89 | # --------------- 90 | # Hook on document methods and events 91 | 92 | # doc_events = { 93 | # "*": { 94 | # "on_update": "method", 95 | # "on_cancel": "method", 96 | # "on_trash": "method" 97 | # } 98 | # } 99 | 100 | # Scheduled Tasks 101 | # --------------- 102 | 103 | # scheduler_events = { 104 | # "all": [ 105 | # "trans_ms.tasks.all" 106 | # ], 107 | # "daily": [ 108 | # "trans_ms.tasks.daily" 109 | # ], 110 | # "hourly": [ 111 | # "trans_ms.tasks.hourly" 112 | # ], 113 | # "weekly": [ 114 | # "trans_ms.tasks.weekly" 115 | # ] 116 | # "monthly": [ 117 | # "trans_ms.tasks.monthly" 118 | # ] 119 | # } 120 | 121 | # Testing 122 | # ------- 123 | 124 | # before_tests = "trans_ms.install.before_tests" 125 | 126 | # Overriding Methods 127 | # ------------------------------ 128 | # 129 | # override_whitelisted_methods = { 130 | # "frappe.desk.doctype.event.event.get_events": "trans_ms.event.get_events" 131 | # } 132 | # 133 | # each overriding function accepts a `data` argument; 134 | # generated from the base implementation of the doctype dashboard, 135 | # along with any modifications made in other Frappe apps 136 | # override_doctype_dashboards = { 137 | # "Task": "trans_ms.task.get_dashboard_data" 138 | # } 139 | 140 | # exempt linked doctypes from being automatically cancelled 141 | # 142 | # auto_cancel_exempted_doctypes = ["Auto Repeat"] 143 | 144 | 145 | # User Data Protection 146 | # -------------------- 147 | 148 | user_data_fields = [ 149 | { 150 | "doctype": "{doctype_1}", 151 | "filter_by": "{filter_by}", 152 | "redact_fields": ["{field_1}", "{field_2}"], 153 | "partial": 1, 154 | }, 155 | { 156 | "doctype": "{doctype_2}", 157 | "filter_by": "{filter_by}", 158 | "partial": 1, 159 | }, 160 | { 161 | "doctype": "{doctype_3}", 162 | "strict": False, 163 | }, 164 | {"doctype": "{doctype_4}"}, 165 | ] 166 | 167 | # Authentication and authorization 168 | # -------------------------------- 169 | 170 | # auth_hooks = [ 171 | # "trans_ms.auth.validate" 172 | # ] 173 | 174 | fixtures = [ 175 | { 176 | "doctype": "Custom Field", 177 | "filters": [ 178 | [ 179 | "name", 180 | "in", 181 | ( 182 | "Vehicle-column_break_5", 183 | "Vehicle-status", 184 | "Vehicle-current_trip", 185 | ), 186 | ] 187 | ], 188 | }, 189 | ] 190 | -------------------------------------------------------------------------------- /trans_ms/modules.txt: -------------------------------------------------------------------------------- 1 | Transport Management -------------------------------------------------------------------------------- /trans_ms/patches.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/patches.txt -------------------------------------------------------------------------------- /trans_ms/templates/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/templates/__init__.py -------------------------------------------------------------------------------- /trans_ms/templates/pages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/templates/pages/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/air_system_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/air_system_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/air_system_checklist/air_system_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 14:54:25.467036", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "part", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "part", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Part" 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:30.831240", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Air System Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/air_system_checklist/air_system_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class AirSystemChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/air_system_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/air_system_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/air_system_details/air_system_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 14:53:56.833180", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "parts" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "parts", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Parts" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:33.978353", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Air System Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/air_system_details/air_system_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class AirSystemDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/brake_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/brake_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/brake_checklist/brake_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 15:47:52.983614", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "brake_system", 9 | "mark", 10 | "brake_remarks" 11 | ], 12 | "fields": [ 13 | { 14 | "fieldname": "brake_system", 15 | "fieldtype": "Data", 16 | "in_list_view": 1, 17 | "label": "Brake System" 18 | }, 19 | { 20 | "default": "0", 21 | "fieldname": "mark", 22 | "fieldtype": "Check", 23 | "in_list_view": 1, 24 | "label": "Mark" 25 | }, 26 | { 27 | "fieldname": "brake_remarks", 28 | "fieldtype": "Data", 29 | "label": "Remarks" 30 | } 31 | ], 32 | "istable": 1, 33 | "links": [], 34 | "modified": "2021-12-30 10:32:32.667689", 35 | "modified_by": "Administrator", 36 | "module": "Transport Management", 37 | "name": "Brake Checklist", 38 | "owner": "Administrator", 39 | "permissions": [], 40 | "quick_entry": 1, 41 | "sort_field": "modified", 42 | "sort_order": "DESC", 43 | "track_changes": 1 44 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/brake_checklist/brake_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class BrakeChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/brake_system_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/brake_system_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/brake_system_details/brake_system_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 17:20:00.313201", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "vehicle_part" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "vehicle_part", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Vehicle Part" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:33.561564", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Brake System Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/brake_system_details/brake_system_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class BrakeSystemDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/cargo_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/cargo_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/cargo_details/cargo_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "CARGO.###", 4 | "creation": "2017-02-22 18:57:43.573632", 5 | "doctype": "DocType", 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "container_size", 9 | "container_number", 10 | "bl_number", 11 | "seal_number", 12 | "no_of_packages", 13 | "column_break_12", 14 | "net_weight", 15 | "gross_weight", 16 | "tare_weight", 17 | "section_break_16", 18 | "cargo_location_country", 19 | "cargo_location_city", 20 | "column_break_19", 21 | "cargo_destination_country", 22 | "cargo_destination_city", 23 | "section_break_18", 24 | "cargo_type", 25 | "section_break_21", 26 | "extra_details", 27 | "assigned_driver", 28 | "assigned_vehicle", 29 | "transport_status" 30 | ], 31 | "fields": [ 32 | { 33 | "fieldname": "container_number", 34 | "fieldtype": "Data", 35 | "in_list_view": 1, 36 | "label": "Container Number", 37 | "reqd": 1 38 | }, 39 | { 40 | "fieldname": "container_size", 41 | "fieldtype": "Select", 42 | "in_list_view": 1, 43 | "label": "Size", 44 | "options": "Loose\n40 FT\n20 FT", 45 | "reqd": 1 46 | }, 47 | { 48 | "depends_on": "eval:doc.container_size != \"Loose\"", 49 | "fieldname": "seal_number", 50 | "fieldtype": "Data", 51 | "in_list_view": 1, 52 | "label": "Seal Number" 53 | }, 54 | { 55 | "fieldname": "no_of_packages", 56 | "fieldtype": "Int", 57 | "in_list_view": 1, 58 | "label": "Number of Packages" 59 | }, 60 | { 61 | "fieldname": "gross_weight", 62 | "fieldtype": "Float", 63 | "label": "Gross Weight (Tonnes)" 64 | }, 65 | { 66 | "fieldname": "net_weight", 67 | "fieldtype": "Float", 68 | "label": "Net Weight (Tonnes)", 69 | "reqd": 1 70 | }, 71 | { 72 | "fieldname": "tare_weight", 73 | "fieldtype": "Float", 74 | "label": "Tare Weight (Tonnes)" 75 | }, 76 | { 77 | "fieldname": "assigned_vehicle", 78 | "fieldtype": "Data", 79 | "hidden": 1, 80 | "label": "Assigned Vehicle" 81 | }, 82 | { 83 | "fieldname": "assigned_driver", 84 | "fieldtype": "Data", 85 | "hidden": 1, 86 | "label": "Assigned Driver" 87 | }, 88 | { 89 | "default": "0", 90 | "fieldname": "transport_status", 91 | "fieldtype": "Int", 92 | "hidden": 1, 93 | "label": "Transport Status" 94 | }, 95 | { 96 | "fieldname": "column_break_12", 97 | "fieldtype": "Column Break" 98 | }, 99 | { 100 | "fieldname": "extra_details", 101 | "fieldtype": "Small Text", 102 | "label": "Extra Details" 103 | }, 104 | { 105 | "fieldname": "cargo_location_country", 106 | "fieldtype": "Link", 107 | "label": "Cargo Location Country", 108 | "options": "Country" 109 | }, 110 | { 111 | "fieldname": "cargo_location_city", 112 | "fieldtype": "Link", 113 | "label": "Cargo Location City", 114 | "options": "Transport Location" 115 | }, 116 | { 117 | "fieldname": "cargo_destination_country", 118 | "fieldtype": "Link", 119 | "label": "Cargo Destination Country", 120 | "options": "Country" 121 | }, 122 | { 123 | "fieldname": "cargo_destination_city", 124 | "fieldtype": "Link", 125 | "label": "Cargo Destination City", 126 | "options": "Transport Location" 127 | }, 128 | { 129 | "fieldname": "section_break_16", 130 | "fieldtype": "Section Break" 131 | }, 132 | { 133 | "fieldname": "column_break_19", 134 | "fieldtype": "Column Break" 135 | }, 136 | { 137 | "fieldname": "section_break_21", 138 | "fieldtype": "Section Break" 139 | }, 140 | { 141 | "fieldname": "section_break_18", 142 | "fieldtype": "Section Break" 143 | }, 144 | { 145 | "fieldname": "cargo_type", 146 | "fieldtype": "Link", 147 | "label": "Cargo Type", 148 | "options": "Transport Cargo Type" 149 | }, 150 | { 151 | "fieldname": "bl_number", 152 | "fieldtype": "Data", 153 | "label": "BL Number" 154 | } 155 | ], 156 | "istable": 1, 157 | "links": [], 158 | "modified": "2022-07-14 16:28:08.169829", 159 | "modified_by": "Administrator", 160 | "module": "Transport Management", 161 | "name": "Cargo Details", 162 | "owner": "Administrator", 163 | "permissions": [], 164 | "quick_entry": 1, 165 | "sort_field": "modified", 166 | "sort_order": "DESC", 167 | "track_changes": 1 168 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/cargo_details/cargo_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class CargoDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/driver_document_attachment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/driver_document_attachment/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/driver_document_attachment/driver_document_attachment.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2022-11-23 18:27:27.375775", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "document_name", 9 | "document_number", 10 | "issue_date", 11 | "expiry_date", 12 | "attachment", 13 | "send_alert_before" 14 | ], 15 | "fields": [ 16 | { 17 | "columns": 2, 18 | "fieldname": "document_name", 19 | "fieldtype": "Link", 20 | "in_list_view": 1, 21 | "label": "Document Name", 22 | "options": "Driver Documents" 23 | }, 24 | { 25 | "columns": 2, 26 | "fieldname": "document_number", 27 | "fieldtype": "Data", 28 | "in_list_view": 1, 29 | "label": "Document Number" 30 | }, 31 | { 32 | "columns": 1, 33 | "fieldname": "issue_date", 34 | "fieldtype": "Date", 35 | "in_list_view": 1, 36 | "label": "Issue Date" 37 | }, 38 | { 39 | "columns": 1, 40 | "fieldname": "expiry_date", 41 | "fieldtype": "Date", 42 | "in_list_view": 1, 43 | "label": "Expiry Date" 44 | }, 45 | { 46 | "fieldname": "attachment", 47 | "fieldtype": "Attach", 48 | "in_list_view": 1, 49 | "label": "Attachment" 50 | }, 51 | { 52 | "fetch_from": "document_name.send_alert_before", 53 | "fieldname": "send_alert_before", 54 | "fieldtype": "Int", 55 | "label": "Send Alert Before (Days)", 56 | "read_only": 1 57 | } 58 | ], 59 | "istable": 1, 60 | "links": [], 61 | "modified": "2022-11-23 18:32:10.340657", 62 | "modified_by": "Administrator", 63 | "module": "Transport Management", 64 | "name": "Driver Document Attachment", 65 | "owner": "Administrator", 66 | "permissions": [], 67 | "quick_entry": 1, 68 | "sort_field": "modified", 69 | "sort_order": "DESC", 70 | "track_changes": 1 71 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/driver_document_attachment/driver_document_attachment.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class DriverDocumentAttachment(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/driver_documents/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/driver_documents/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/driver_documents/driver_documents.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Driver Documents', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/driver_documents/driver_documents.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:description", 5 | "creation": "2022-11-23 18:16:31.466372", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "description", 11 | "send_alert_before" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "description", 16 | "fieldtype": "Data", 17 | "in_list_view": 1, 18 | "label": "Description", 19 | "reqd": 1, 20 | "unique": 1 21 | }, 22 | { 23 | "description": "Set number of Days before the Alert should be sent. If No of Days is 0 (Zero) then NO Alert will be sent", 24 | "fieldname": "send_alert_before", 25 | "fieldtype": "Int", 26 | "in_list_view": 1, 27 | "label": "Send Alert Before (Days)", 28 | "reqd": 1 29 | } 30 | ], 31 | "index_web_pages_for_search": 1, 32 | "links": [], 33 | "modified": "2022-11-23 18:20:15.659101", 34 | "modified_by": "Administrator", 35 | "module": "Transport Management", 36 | "name": "Driver Documents", 37 | "owner": "Administrator", 38 | "permissions": [], 39 | "sort_field": "modified", 40 | "sort_order": "DESC" 41 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/driver_documents/driver_documents.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class DriverDocuments(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/driver_documents/test_driver_documents.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestDriverDocuments(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electrical_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/electrical_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electrical_checklist/electrical_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 13:47:40.595867", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "electrical_part", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "electrical_part", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Electrical " 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:32.977988", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Electrical Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electrical_checklist/electrical_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ElectricalChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electrical_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/electrical_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electrical_details/electrical_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 13:46:24.313916", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "electrical_part" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "electrical_part", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Electrical" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:32.859872", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Electrical Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electrical_details/electrical_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ElectricalDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electronics_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/electronics_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electronics_checklist/electronics_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 13:12:13.543802", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "electronics_part", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "electronics_part", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Electronics" 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:31.388863", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Electronics Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electronics_checklist/electronics_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ElectronicsChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electronics_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/electronics_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electronics_details/electronics_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 13:12:56.556089", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "electronic_part" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "electronic_part", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Electronics" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:32.132668", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Electronics Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/electronics_details/electronics_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ElectronicsDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/engine_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/engine_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/engine_checklist/engine_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 15:56:37.931062", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "engine_system", 9 | "mark", 10 | "engine_remarks" 11 | ], 12 | "fields": [ 13 | { 14 | "fieldname": "engine_system", 15 | "fieldtype": "Data", 16 | "in_list_view": 1, 17 | "label": "Engine " 18 | }, 19 | { 20 | "default": "0", 21 | "fieldname": "mark", 22 | "fieldtype": "Check", 23 | "in_list_view": 1, 24 | "label": "Mark" 25 | }, 26 | { 27 | "fieldname": "engine_remarks", 28 | "fieldtype": "Data", 29 | "label": "Remarks" 30 | } 31 | ], 32 | "istable": 1, 33 | "links": [], 34 | "modified": "2021-12-30 10:32:29.960553", 35 | "modified_by": "Administrator", 36 | "module": "Transport Management", 37 | "name": "Engine Checklist", 38 | "owner": "Administrator", 39 | "permissions": [], 40 | "quick_entry": 1, 41 | "sort_field": "modified", 42 | "sort_order": "DESC", 43 | "track_changes": 1 44 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/engine_checklist/engine_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class EngineChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/engine_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/engine_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/engine_details/engine_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 17:25:07.127543", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "criteria" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "criteria", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Criteria" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:29.486709", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Engine Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/engine_details/engine_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class EngineDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/expense/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/expense/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/expense/expense.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Expense', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/expense/expense.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "field:description", 4 | "creation": "2017-04-12 19:31:03.657227", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "description", 10 | "fixed_value" 11 | ], 12 | "fields": [ 13 | { 14 | "fieldname": "description", 15 | "fieldtype": "Data", 16 | "in_list_view": 1, 17 | "label": "Expense Description", 18 | "reqd": 1, 19 | "unique": 1 20 | }, 21 | { 22 | "fieldname": "fixed_value", 23 | "fieldtype": "Currency", 24 | "in_list_view": 1, 25 | "label": "Fixed Value", 26 | "reqd": 1 27 | } 28 | ], 29 | "links": [], 30 | "modified": "2021-12-13 16:42:18.568310", 31 | "modified_by": "Administrator", 32 | "module": "Transport Management", 33 | "name": "Expense", 34 | "owner": "Administrator", 35 | "permissions": [ 36 | { 37 | "create": 1, 38 | "delete": 1, 39 | "email": 1, 40 | "export": 1, 41 | "print": 1, 42 | "read": 1, 43 | "report": 1, 44 | "role": "Clearing Agent", 45 | "share": 1, 46 | "write": 1 47 | } 48 | ], 49 | "search_fields": "description", 50 | "sort_field": "modified", 51 | "sort_order": "DESC", 52 | "title_field": "description", 53 | "track_changes": 1 54 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/expense/expense.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class Expense(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/expense/test_expense.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestExpense(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fixed_expense/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/fixed_expense/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fixed_expense/fixed_expense.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Fixed Expense', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | onload: function (frm) { 9 | frm.set_query("expense_account", function (doc) { 10 | return { 11 | filters: [ 12 | ["Account", "parent_account", "in", doc.__onload.expense_accounts], 13 | ["Account", "is_group", "=", 0] 14 | ] 15 | } 16 | }); 17 | 18 | frm.set_query("cash_bank_account", function (doc) { 19 | return { 20 | filters: [ 21 | ["Account", "parent_account", "in", doc.__onload.cash_bank_accounts], 22 | ["Account", "is_group", "=", 0] 23 | ] 24 | } 25 | }); 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fixed_expense/fixed_expense.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:description", 5 | "creation": "2017-04-12 19:31:03.657227", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "description", 11 | "currency", 12 | "fixed_value", 13 | "expense_account", 14 | "cash_bank_account" 15 | ], 16 | "fields": [ 17 | { 18 | "fieldname": "description", 19 | "fieldtype": "Data", 20 | "in_list_view": 1, 21 | "label": "Expense Description", 22 | "reqd": 1, 23 | "unique": 1 24 | }, 25 | { 26 | "fieldname": "currency", 27 | "fieldtype": "Link", 28 | "label": "Currency", 29 | "options": "Currency", 30 | "reqd": 1 31 | }, 32 | { 33 | "fieldname": "fixed_value", 34 | "fieldtype": "Currency", 35 | "in_list_view": 1, 36 | "label": "Fixed Amount", 37 | "reqd": 1 38 | }, 39 | { 40 | "fieldname": "expense_account", 41 | "fieldtype": "Link", 42 | "label": "Expense Account", 43 | "options": "Account" 44 | }, 45 | { 46 | "fieldname": "cash_bank_account", 47 | "fieldtype": "Link", 48 | "label": "Cash / Bank Account", 49 | "options": "Account" 50 | } 51 | ], 52 | "links": [], 53 | "modified": "2022-02-22 16:53:49.124568", 54 | "modified_by": "Administrator", 55 | "module": "Transport Management", 56 | "name": "Fixed Expense", 57 | "owner": "Administrator", 58 | "permissions": [ 59 | { 60 | "create": 1, 61 | "delete": 1, 62 | "email": 1, 63 | "export": 1, 64 | "print": 1, 65 | "read": 1, 66 | "report": 1, 67 | "role": "Clearing Agent", 68 | "share": 1, 69 | "write": 1 70 | } 71 | ], 72 | "search_fields": "description", 73 | "sort_field": "modified", 74 | "sort_order": "DESC", 75 | "title_field": "description", 76 | "track_changes": 1 77 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fixed_expense/fixed_expense.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | import frappe 5 | from frappe.model.document import Document 6 | 7 | 8 | class FixedExpense(Document): 9 | pass 10 | 11 | def onload(self): 12 | self.set_onload( 13 | "expense_accounts", 14 | frappe.get_all( 15 | "Transport Expense Account Group", 16 | fields="account_group", 17 | pluck="account_group", 18 | filters={"parent": "Transport Settings"}, 19 | ), 20 | ) 21 | 22 | self.set_onload( 23 | "cash_bank_accounts", 24 | frappe.db.get_all( 25 | "Transport Cash Account Group", 26 | fields="account_group", 27 | pluck="account_group", 28 | filters={"parent": "Transport Settings"}, 29 | ), 30 | ) 31 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fixed_expense/test_fixed_expense.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestFixedExpense(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fixed_expense_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/fixed_expense_table/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fixed_expense_table/fixed_expense_table.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2017-04-12 20:21:36.041750", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "expense", 9 | "currency", 10 | "amount", 11 | "party_type" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "expense", 16 | "fieldtype": "Link", 17 | "in_list_view": 1, 18 | "label": "Expense", 19 | "options": "Fixed Expense", 20 | "reqd": 1 21 | }, 22 | { 23 | "fetch_from": "expense.currency", 24 | "fetch_if_empty": 1, 25 | "fieldname": "currency", 26 | "fieldtype": "Link", 27 | "in_list_view": 1, 28 | "label": "Currency", 29 | "options": "Currency", 30 | "read_only": 1, 31 | "reqd": 1 32 | }, 33 | { 34 | "fetch_from": "expense.fixed_value", 35 | "fetch_if_empty": 1, 36 | "fieldname": "amount", 37 | "fieldtype": "Currency", 38 | "in_list_view": 1, 39 | "label": "Amount", 40 | "options": "currency", 41 | "reqd": 1 42 | }, 43 | { 44 | "fieldname": "party_type", 45 | "fieldtype": "Select", 46 | "in_list_view": 1, 47 | "label": "Party Type", 48 | "options": "Employee\nSupplier\nAgent", 49 | "reqd": 1 50 | } 51 | ], 52 | "istable": 1, 53 | "links": [], 54 | "modified": "2022-03-04 09:03:50.555240", 55 | "modified_by": "Administrator", 56 | "module": "Transport Management", 57 | "name": "Fixed Expense Table", 58 | "owner": "Administrator", 59 | "permissions": [], 60 | "quick_entry": 1, 61 | "sort_field": "modified", 62 | "sort_order": "DESC", 63 | "track_changes": 1 64 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fixed_expense_table/fixed_expense_table.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class FixedExpenseTable(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_request/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/fuel_request/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_request/fuel_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "FREQ.###", 4 | "creation": "2017-09-22 18:34:50.811573", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "company", 10 | "customer", 11 | "vehicle", 12 | "column_break_3", 13 | "driver", 14 | "driver_name", 15 | "vehicle_plate_number", 16 | "section_break_8", 17 | "main_route", 18 | "main_approved_fuel", 19 | "column_break_4", 20 | "return_route", 21 | "return_approved_fuel", 22 | "section_requested_fuel", 23 | "requested_fuel", 24 | "approve_buttons", 25 | "section_approved_requests", 26 | "approved_requests", 27 | "section_references", 28 | "reference_doctype", 29 | "reference_docname", 30 | "column_break_9", 31 | "status", 32 | "transaction_date" 33 | ], 34 | "fields": [ 35 | { 36 | "fieldname": "vehicle_plate_number", 37 | "fieldtype": "Data", 38 | "hidden": 1, 39 | "in_list_view": 1, 40 | "label": "Vehicle Plate Number", 41 | "read_only": 1 42 | }, 43 | { 44 | "fieldname": "company", 45 | "fieldtype": "Link", 46 | "label": "Company", 47 | "options": "Company", 48 | "read_only": 1, 49 | "reqd": 1 50 | }, 51 | { 52 | "fieldname": "main_route", 53 | "fieldtype": "Link", 54 | "label": "Main Route", 55 | "options": "Trip Route", 56 | "read_only": 1 57 | }, 58 | { 59 | "fieldname": "main_approved_fuel", 60 | "fieldtype": "Data", 61 | "label": "Main Route Approved Amount", 62 | "read_only": 1 63 | }, 64 | { 65 | "fieldname": "column_break_4", 66 | "fieldtype": "Column Break" 67 | }, 68 | { 69 | "fieldname": "return_route", 70 | "fieldtype": "Link", 71 | "label": "Return Route", 72 | "options": "Trip Route", 73 | "read_only": 1 74 | }, 75 | { 76 | "fieldname": "return_approved_fuel", 77 | "fieldtype": "Data", 78 | "label": "Return Route Approved Amount", 79 | "read_only": 1 80 | }, 81 | { 82 | "fieldname": "section_requested_fuel", 83 | "fieldtype": "Section Break", 84 | "label": "Requested Fuel" 85 | }, 86 | { 87 | "fieldname": "requested_fuel", 88 | "fieldtype": "Table", 89 | "label": "Requested Fuel", 90 | "options": "Fuel Request Table" 91 | }, 92 | { 93 | "fieldname": "approve_buttons", 94 | "fieldtype": "HTML", 95 | "label": "Approve Buttons" 96 | }, 97 | { 98 | "fieldname": "section_approved_requests", 99 | "fieldtype": "Section Break", 100 | "label": "Approved/Rejected Requests" 101 | }, 102 | { 103 | "fieldname": "approved_requests", 104 | "fieldtype": "Table", 105 | "label": "Approved/Rejected Requests", 106 | "options": "Fuel Request Table", 107 | "read_only": 1 108 | }, 109 | { 110 | "fieldname": "section_references", 111 | "fieldtype": "Section Break", 112 | "label": "References" 113 | }, 114 | { 115 | "fieldname": "reference_doctype", 116 | "fieldtype": "Link", 117 | "label": "Reference Module", 118 | "options": "DocType", 119 | "read_only": 1 120 | }, 121 | { 122 | "fieldname": "reference_docname", 123 | "fieldtype": "Dynamic Link", 124 | "in_list_view": 1, 125 | "label": "Requested From", 126 | "options": "reference_doctype", 127 | "read_only": 1 128 | }, 129 | { 130 | "fieldname": "column_break_9", 131 | "fieldtype": "Column Break" 132 | }, 133 | { 134 | "default": "Waiting Approval", 135 | "fieldname": "status", 136 | "fieldtype": "Select", 137 | "in_list_view": 1, 138 | "label": "Status", 139 | "options": "Waiting Approval\nPartially Processed\nFully Processed", 140 | "read_only": 1 141 | }, 142 | { 143 | "fieldname": "transaction_date", 144 | "fieldtype": "Date", 145 | "label": "Transaction Date" 146 | }, 147 | { 148 | "fieldname": "customer", 149 | "fieldtype": "Link", 150 | "label": "Customer", 151 | "options": "Customer", 152 | "read_only": 1 153 | }, 154 | { 155 | "fieldname": "column_break_3", 156 | "fieldtype": "Column Break" 157 | }, 158 | { 159 | "fieldname": "vehicle", 160 | "fieldtype": "Link", 161 | "in_list_view": 1, 162 | "label": "Vehicle", 163 | "options": "Vehicle", 164 | "read_only": 1 165 | }, 166 | { 167 | "fieldname": "driver", 168 | "fieldtype": "Link", 169 | "label": "Driver", 170 | "options": "Driver", 171 | "read_only": 1 172 | }, 173 | { 174 | "fetch_from": "driver.full_name", 175 | "fieldname": "driver_name", 176 | "fieldtype": "Data", 177 | "label": "Driver Name", 178 | "read_only": 1 179 | }, 180 | { 181 | "fieldname": "section_break_8", 182 | "fieldtype": "Section Break" 183 | } 184 | ], 185 | "links": [], 186 | "modified": "2022-12-27 21:39:38.765948", 187 | "modified_by": "Administrator", 188 | "module": "Transport Management", 189 | "name": "Fuel Request", 190 | "owner": "Administrator", 191 | "permissions": [ 192 | { 193 | "create": 1, 194 | "delete": 1, 195 | "email": 1, 196 | "export": 1, 197 | "print": 1, 198 | "read": 1, 199 | "report": 1, 200 | "role": "System Manager", 201 | "share": 1, 202 | "write": 1 203 | } 204 | ], 205 | "sort_field": "modified", 206 | "sort_order": "DESC", 207 | "track_changes": 1 208 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_request/test_fuel_request.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestFuelRequest(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_request_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/fuel_request_table/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_request_table/fuel_request_table.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2017-09-22 17:52:10.466143", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "column_break_3", 9 | "create_purchase_order", 10 | "purchase_order", 11 | "section_description", 12 | "item_code", 13 | "quantity", 14 | "disburcement_type", 15 | "supplier", 16 | "cost_per_litre", 17 | "column_break_5", 18 | "item_name", 19 | "uom", 20 | "currency", 21 | "total_cost", 22 | "section_break_14", 23 | "status", 24 | "approved_by", 25 | "approved_date", 26 | "receipt_date", 27 | "receipt_time", 28 | "received_by", 29 | "transaction_date" 30 | ], 31 | "fields": [ 32 | { 33 | "bold": 1, 34 | "fieldname": "item_code", 35 | "fieldtype": "Link", 36 | "in_list_view": 1, 37 | "label": "Fuel Type", 38 | "options": "Item", 39 | "reqd": 1 40 | }, 41 | { 42 | "fetch_from": "item_code.item_name", 43 | "fieldname": "item_name", 44 | "fieldtype": "Read Only", 45 | "label": "Fuel Name", 46 | "reqd": 1 47 | }, 48 | { 49 | "fieldname": "section_description", 50 | "fieldtype": "Section Break" 51 | }, 52 | { 53 | "fieldname": "column_break_5", 54 | "fieldtype": "Column Break" 55 | }, 56 | { 57 | "fieldname": "quantity", 58 | "fieldtype": "Float", 59 | "in_list_view": 1, 60 | "label": "Quantity (Litres)", 61 | "reqd": 1 62 | }, 63 | { 64 | "fieldname": "disburcement_type", 65 | "fieldtype": "Select", 66 | "in_list_view": 1, 67 | "label": "Disburcement Type", 68 | "options": "From Supplier\nCash", 69 | "reqd": 1 70 | }, 71 | { 72 | "fieldname": "supplier", 73 | "fieldtype": "Link", 74 | "label": "Supplier", 75 | "options": "Supplier" 76 | }, 77 | { 78 | "fieldname": "cost_per_litre", 79 | "fieldtype": "Currency", 80 | "in_list_view": 1, 81 | "label": "Cost Per Litre", 82 | "options": "currency", 83 | "reqd": 1 84 | }, 85 | { 86 | "fieldname": "total_cost", 87 | "fieldtype": "Currency", 88 | "label": "Total Cost", 89 | "options": "currency", 90 | "read_only": 1 91 | }, 92 | { 93 | "default": "Open", 94 | "fieldname": "status", 95 | "fieldtype": "Data", 96 | "in_list_view": 1, 97 | "label": "Status", 98 | "read_only": 1 99 | }, 100 | { 101 | "fetch_from": "item_code.stock_uom", 102 | "fieldname": "uom", 103 | "fieldtype": "Read Only", 104 | "ignore_user_permissions": 1, 105 | "label": "Stock UOM", 106 | "reqd": 1 107 | }, 108 | { 109 | "fieldname": "approved_by", 110 | "fieldtype": "Data", 111 | "label": "Approved/Rejected By", 112 | "read_only": 1 113 | }, 114 | { 115 | "fieldname": "approved_date", 116 | "fieldtype": "Date", 117 | "label": "Approval/Rejection Date", 118 | "read_only": 1 119 | }, 120 | { 121 | "fieldname": "receipt_date", 122 | "fieldtype": "Date", 123 | "label": "Receipt Date", 124 | "read_only": 1 125 | }, 126 | { 127 | "fieldname": "receipt_time", 128 | "fieldtype": "Time", 129 | "label": "Receipt Time", 130 | "read_only": 1 131 | }, 132 | { 133 | "fieldname": "received_by", 134 | "fieldtype": "Link", 135 | "label": "Received By", 136 | "options": "User", 137 | "read_only": 1 138 | }, 139 | { 140 | "fieldname": "transaction_date", 141 | "fieldtype": "Date", 142 | "label": "Transaction Date" 143 | }, 144 | { 145 | "depends_on": "eval: !doc.purchase_order", 146 | "fieldname": "create_purchase_order", 147 | "fieldtype": "Button", 148 | "label": "Create Purchase Order" 149 | }, 150 | { 151 | "fieldname": "purchase_order", 152 | "fieldtype": "Link", 153 | "label": "Purchase Order", 154 | "options": "Purchase Order", 155 | "read_only": 1 156 | }, 157 | { 158 | "fieldname": "column_break_3", 159 | "fieldtype": "Column Break" 160 | }, 161 | { 162 | "fieldname": "section_break_14", 163 | "fieldtype": "Section Break" 164 | }, 165 | { 166 | "fetch_from": "supplier.default_currency", 167 | "fieldname": "currency", 168 | "fieldtype": "Link", 169 | "label": "Currency", 170 | "options": "Currency", 171 | "read_only": 1 172 | } 173 | ], 174 | "istable": 1, 175 | "links": [], 176 | "modified": "2022-10-25 16:30:34.850887", 177 | "modified_by": "Administrator", 178 | "module": "Transport Management", 179 | "name": "Fuel Request Table", 180 | "owner": "Administrator", 181 | "permissions": [], 182 | "quick_entry": 1, 183 | "sort_field": "modified", 184 | "sort_order": "DESC", 185 | "track_changes": 1 186 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_request_table/fuel_request_table.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class FuelRequestTable(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_system_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/fuel_system_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_system_checklist/fuel_system_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 16:07:54.421837", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "fuel_system", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "fuel_system", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Fuel System " 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:31.126413", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Fuel System Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_system_checklist/fuel_system_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class FuelSystemChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_system_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/fuel_system_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_system_details/fuel_system_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 17:39:40.586536", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "fuel_part" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "fuel_part", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Vehicle Part" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:30.502079", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Fuel System Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/fuel_system_details/fuel_system_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class FuelSystemDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/lighting_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/lighting_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/lighting_checklist/lighting_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 15:12:37.003334", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "lighting_check_item", 9 | "lighting_mark", 10 | "lighting_remarks" 11 | ], 12 | "fields": [ 13 | { 14 | "fieldname": "lighting_check_item", 15 | "fieldtype": "Data", 16 | "in_list_view": 1, 17 | "label": "Lighting" 18 | }, 19 | { 20 | "default": "0", 21 | "fieldname": "lighting_mark", 22 | "fieldtype": "Check", 23 | "in_list_view": 1, 24 | "label": "Mark" 25 | }, 26 | { 27 | "fieldname": "lighting_remarks", 28 | "fieldtype": "Data", 29 | "label": "Remarks" 30 | } 31 | ], 32 | "istable": 1, 33 | "links": [], 34 | "modified": "2021-12-30 10:32:31.669319", 35 | "modified_by": "Administrator", 36 | "module": "Transport Management", 37 | "name": "Lighting Checklist", 38 | "owner": "Administrator", 39 | "permissions": [], 40 | "quick_entry": 1, 41 | "sort_field": "modified", 42 | "sort_order": "DESC", 43 | "track_changes": 1 44 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/lighting_checklist/lighting_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class LightingChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/lighting_checklist_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/lighting_checklist_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/lighting_checklist_details/lighting_checklist_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 17:13:19.066798", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "vehicle_part" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "vehicle_part", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Vehicle Part" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:32:30.247465", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Lighting Checklist Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/lighting_checklist_details/lighting_checklist_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class LightingChecklistDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/power_train_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/power_train_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/power_train_checklist/power_train_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 12:44:12.846745", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "power_train_checklist", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "power_train_checklist", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Power Train" 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:32.372234", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Power Train Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/power_train_checklist/power_train_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class PowerTrainChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/power_train_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/power_train_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/power_train_details/power_train_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 12:45:36.311967", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "power_train_part" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "power_train_part", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Power Train " 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:32.572996", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Power Train Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/power_train_details/power_train_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class PowerTrainDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/reference_payment_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/reference_payment_table/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/reference_payment_table/reference_payment_table.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2017-04-25 14:10:41.177611", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "accounting_system", 9 | "amount", 10 | "currency", 11 | "date_of_payment", 12 | "reference_no", 13 | "paid_to", 14 | "payment_method", 15 | "payment_account", 16 | "status" 17 | ], 18 | "fields": [ 19 | { 20 | "default": "Pastel", 21 | "fieldname": "accounting_system", 22 | "fieldtype": "Data", 23 | "label": "Accounting System", 24 | "read_only": 1 25 | }, 26 | { 27 | "fieldname": "amount", 28 | "fieldtype": "Float", 29 | "in_list_view": 1, 30 | "label": "Amount", 31 | "reqd": 1 32 | }, 33 | { 34 | "fieldname": "currency", 35 | "fieldtype": "Link", 36 | "in_list_view": 1, 37 | "label": "Currency", 38 | "options": "Currency", 39 | "reqd": 1 40 | }, 41 | { 42 | "fieldname": "date_of_payment", 43 | "fieldtype": "Date", 44 | "in_list_view": 1, 45 | "label": "Date of Payment", 46 | "reqd": 1 47 | }, 48 | { 49 | "fieldname": "reference_no", 50 | "fieldtype": "Data", 51 | "in_list_view": 1, 52 | "label": "Reference Number" 53 | }, 54 | { 55 | "fieldname": "paid_to", 56 | "fieldtype": "Link", 57 | "in_list_view": 1, 58 | "label": "Paid To", 59 | "options": "Employee" 60 | }, 61 | { 62 | "fieldname": "payment_method", 63 | "fieldtype": "Select", 64 | "in_list_view": 1, 65 | "label": "Payment Method", 66 | "options": "\nCash\nCheque\nBank Transfer", 67 | "reqd": 1 68 | }, 69 | { 70 | "fieldname": "payment_account", 71 | "fieldtype": "Select", 72 | "in_list_view": 1, 73 | "label": "Payment Account", 74 | "options": "\nCRDB\nBank M\nStanbic Bank\nEco Bank\nPetty Cash Fund\nM-Pesa\nInter Africa\nYash International (Fuel Account)\nMount Meru (Fuel Account)\nPetcom (Fuel Account)\nVital Oil (Fuel Account)", 75 | "reqd": 1 76 | }, 77 | { 78 | "default": "new", 79 | "fieldname": "status", 80 | "fieldtype": "Data", 81 | "hidden": 1, 82 | "label": "Status" 83 | } 84 | ], 85 | "istable": 1, 86 | "links": [], 87 | "modified": "2022-02-16 21:52:36.739058", 88 | "modified_by": "Administrator", 89 | "module": "Transport Management", 90 | "name": "Reference Payment Table", 91 | "owner": "Administrator", 92 | "permissions": [], 93 | "quick_entry": 1, 94 | "sort_field": "modified", 95 | "sort_order": "DESC", 96 | "track_changes": 1 97 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/reference_payment_table/reference_payment_table.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ReferencePaymentTable(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/requested_funds_accounts_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/requested_funds_accounts_table/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/requested_funds_accounts_table/requested_funds_accounts_table.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class RequestedFundsAccountsTable(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/requested_funds_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/requested_funds_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/requested_funds_details/requested_funds_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class RequestedFundsDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/requested_payments/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/requested_payments/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/requested_payments/test_requested_payments.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestRequestedPayments(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/route_steps_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/route_steps_table/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/route_steps_table/route_steps_table.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2017-04-18 18:51:14.305423", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "location", 9 | "distance", 10 | "column_break_2", 11 | "location_type", 12 | "fuel_consumption_qty", 13 | "section_dates", 14 | "arrival_date", 15 | "departure_date", 16 | "column_break_7", 17 | "loading_date", 18 | "offloading_date", 19 | "border_details", 20 | "documents_from_driver", 21 | "doc_submitted_to_agent", 22 | "column_break_13", 23 | "doc_received_by", 24 | "crossing_time", 25 | "section_extra", 26 | "comment" 27 | ], 28 | "fields": [ 29 | { 30 | "fieldname": "location", 31 | "fieldtype": "Link", 32 | "in_list_view": 1, 33 | "label": "Location", 34 | "options": "Trip Location" 35 | }, 36 | { 37 | "fieldname": "distance", 38 | "fieldtype": "Float", 39 | "in_list_view": 1, 40 | "label": "Distance" 41 | }, 42 | { 43 | "fieldname": "column_break_2", 44 | "fieldtype": "Column Break" 45 | }, 46 | { 47 | "fieldname": "location_type", 48 | "fieldtype": "Data", 49 | "in_list_view": 1, 50 | "label": "Type" 51 | }, 52 | { 53 | "fieldname": "section_dates", 54 | "fieldtype": "Section Break", 55 | "label": "Dates" 56 | }, 57 | { 58 | "fieldname": "arrival_date", 59 | "fieldtype": "Date", 60 | "label": "Arrival Date" 61 | }, 62 | { 63 | "fieldname": "departure_date", 64 | "fieldtype": "Date", 65 | "label": "Departure Date" 66 | }, 67 | { 68 | "fieldname": "column_break_7", 69 | "fieldtype": "Column Break" 70 | }, 71 | { 72 | "fieldname": "loading_date", 73 | "fieldtype": "Date", 74 | "label": "Loading Date" 75 | }, 76 | { 77 | "fieldname": "offloading_date", 78 | "fieldtype": "Date", 79 | "label": "Offloading Date" 80 | }, 81 | { 82 | "fieldname": "border_details", 83 | "fieldtype": "Section Break", 84 | "label": "Border Details" 85 | }, 86 | { 87 | "fieldname": "documents_from_driver", 88 | "fieldtype": "Datetime", 89 | "label": "Documents received from driver" 90 | }, 91 | { 92 | "fieldname": "doc_submitted_to_agent", 93 | "fieldtype": "Date", 94 | "label": "Documents submitted to agent" 95 | }, 96 | { 97 | "fieldname": "column_break_13", 98 | "fieldtype": "Column Break" 99 | }, 100 | { 101 | "fieldname": "doc_received_by", 102 | "fieldtype": "Data", 103 | "label": "Documents received by" 104 | }, 105 | { 106 | "fieldname": "crossing_time", 107 | "fieldtype": "Datetime", 108 | "label": "Crossing date and time" 109 | }, 110 | { 111 | "fieldname": "section_extra", 112 | "fieldtype": "Section Break", 113 | "label": "Extra Information" 114 | }, 115 | { 116 | "fieldname": "comment", 117 | "fieldtype": "Data", 118 | "label": "Additional Comment" 119 | }, 120 | { 121 | "fieldname": "fuel_consumption_qty", 122 | "fieldtype": "Float", 123 | "in_list_view": 1, 124 | "label": "Fuel Consumption Qty" 125 | } 126 | ], 127 | "istable": 1, 128 | "links": [], 129 | "modified": "2022-12-27 18:22:26.475839", 130 | "modified_by": "Administrator", 131 | "module": "Transport Management", 132 | "name": "Route Steps Table", 133 | "owner": "Administrator", 134 | "permissions": [], 135 | "quick_entry": 1, 136 | "sort_field": "modified", 137 | "sort_order": "DESC", 138 | "track_changes": 1 139 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/route_steps_table/route_steps_table.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class RouteStepsTable(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/steering_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/steering_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/steering_checklist/steering_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 14:11:40.788312", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "steering_part", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "steering_part", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Steering " 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:33.257397", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Steering Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/steering_checklist/steering_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class SteeringChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/steering_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/steering_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/steering_details/steering_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 14:12:24.339233", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "steering_part" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "steering_part", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Criteria" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:30.182339", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Steering Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/steering_details/steering_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class SteeringDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/suspension_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/suspension_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/suspension_checklist/suspension_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 14:39:11.316038", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "part", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "part", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Suspension " 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:30.503587", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Suspension Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/suspension_checklist/suspension_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class SuspensionChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/suspension_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/suspension_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/suspension_details/suspension_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 14:38:44.667380", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "parts" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "parts", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Criteria" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:31.450495", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Suspension Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/suspension_details/suspension_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class SuspensionDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tire_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/tire_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tire_checklist/tire_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 16:57:29.149228", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "tire_position", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "tire_position", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Tire Position" 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:29.476114", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Tire Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tire_checklist/tire_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TireChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tire_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/tire_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tire_details/tire_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-25 17:51:55.389457", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "tire_part" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "tire_part", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Tire Part" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:34.260284", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Tire Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tire_details/tire_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TireDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tires_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/tires_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tires_checklist/tires_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 14:25:31.990583", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "criteria", 9 | "mark" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "criteria", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Tires " 17 | }, 18 | { 19 | "default": "0", 20 | "fieldname": "mark", 21 | "fieldtype": "Check", 22 | "in_list_view": 1, 23 | "label": "Mark" 24 | } 25 | ], 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2021-12-30 10:32:31.998559", 29 | "modified_by": "Administrator", 30 | "module": "Transport Management", 31 | "name": "Tires Checklist", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "quick_entry": 1, 35 | "sort_field": "modified", 36 | "sort_order": "DESC", 37 | "track_changes": 1 38 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tires_checklist/tires_checklist.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TiresChecklist(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tires_details/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/tires_details/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tires_details/tires_details.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2019-07-26 14:24:25.783159", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "criteria" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "criteria", 13 | "fieldtype": "Data", 14 | "in_list_view": 1, 15 | "label": "Criteria" 16 | } 17 | ], 18 | "istable": 1, 19 | "links": [], 20 | "modified": "2021-12-30 10:36:29.891251", 21 | "modified_by": "Administrator", 22 | "module": "Transport Management", 23 | "name": "Tires Details", 24 | "owner": "Administrator", 25 | "permissions": [], 26 | "quick_entry": 1, 27 | "sort_field": "modified", 28 | "sort_order": "DESC", 29 | "track_changes": 1 30 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/tires_details/tires_details.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TiresDetails(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trailer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/trailer/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trailer/test_trailer.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Trailer", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Trailer 13 | () => frappe.tests.make('Trailer', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trailer/test_trailer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2015, Aakvatech Limited and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | # test_records = frappe.get_test_records('Trailer') 10 | 11 | 12 | class TestTrailer(unittest.TestCase): 13 | pass 14 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trailer/trailer.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Trailer', { 5 | refresh: function (frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trailer/trailer.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:number_plate", 5 | "creation": "2017-03-03 18:29:32.299741", 6 | "doctype": "DocType", 7 | "document_type": "Document", 8 | "editable_grid": 1, 9 | "engine": "InnoDB", 10 | "field_order": [ 11 | "number_plate", 12 | "chassis_number", 13 | "make", 14 | "column_break_4", 15 | "year", 16 | "axles", 17 | "trailer_type", 18 | "section_break_7", 19 | "tyre_specification", 20 | "column_break_9", 21 | "suspension_type", 22 | "section_trailer_documents", 23 | "trailer_documents" 24 | ], 25 | "fields": [{ 26 | "fieldname": "number_plate", 27 | "fieldtype": "Data", 28 | "in_list_view": 1, 29 | "label": "Number Plate", 30 | "reqd": 1, 31 | "unique": 1 32 | }, 33 | { 34 | "fieldname": "chassis_number", 35 | "fieldtype": "Data", 36 | "in_list_view": 1, 37 | "label": "Chassis Number", 38 | "reqd": 1 39 | }, 40 | { 41 | "fieldname": "make", 42 | "fieldtype": "Data", 43 | "label": "Trailer Make" 44 | }, 45 | { 46 | "fieldname": "column_break_4", 47 | "fieldtype": "Column Break" 48 | }, 49 | { 50 | "fieldname": "year", 51 | "fieldtype": "Int", 52 | "label": "Year" 53 | }, 54 | { 55 | "fieldname": "axles", 56 | "fieldtype": "Int", 57 | "label": "Axles" 58 | }, 59 | { 60 | "fieldname": "section_trailer_documents", 61 | "fieldtype": "Section Break" 62 | }, 63 | { 64 | "fieldname": "trailer_documents", 65 | "fieldtype": "Table", 66 | "label": "Trailer Documents", 67 | "options": "Vehicle Documents" 68 | }, 69 | { 70 | "fieldname": "section_break_7", 71 | "fieldtype": "Section Break" 72 | }, 73 | { 74 | "fieldname": "tyre_specification", 75 | "fieldtype": "Select", 76 | "label": "Tyre Specification", 77 | "options": "Super Single\nDouble Tyres" 78 | }, 79 | { 80 | "fieldname": "column_break_9", 81 | "fieldtype": "Column Break" 82 | }, 83 | { 84 | "fieldname": "suspension_type", 85 | "fieldtype": "Select", 86 | "label": "Suspension Type", 87 | "options": "Leaf Spring\nAir Suspension" 88 | }, 89 | { 90 | "fieldname": "trailer_type", 91 | "fieldtype": "Select", 92 | "label": "Trailer Type", 93 | "options": "Flat Bed\nSkeleton\nBox Body\nFuel Tanker\nDropside" 94 | } 95 | ], 96 | "links": [], 97 | "modified": "2022-11-28 11:57:08.540071", 98 | "modified_by": "Administrator", 99 | "module": "Transport Management", 100 | "name": "Trailer", 101 | "name_case": "UPPER CASE", 102 | "owner": "Administrator", 103 | "permissions": [{ 104 | "create": 1, 105 | "delete": 1, 106 | "email": 1, 107 | "export": 1, 108 | "print": 1, 109 | "read": 1, 110 | "report": 1, 111 | "role": "Clearing Agent", 112 | "share": 1, 113 | "write": 1 114 | }], 115 | "search_fields": "number_plate, chassis_number, make", 116 | "show_name_in_global_search": 1, 117 | "sort_field": "modified", 118 | "sort_order": "DESC", 119 | "title_field": "number_plate", 120 | "track_changes": 1 121 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trailer/trailer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2015, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class Trailer(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_accounting_dimension/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transport_accounting_dimension/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_accounting_dimension/test_transport_accounting_dimension.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTransportAccountingDimension(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_accounting_dimension/transport_accounting_dimension.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Transport Accounting Dimension', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_accounting_dimension/transport_accounting_dimension.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2022-02-03 09:44:09.888378", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "dimension_name", 10 | "source_doctype", 11 | "source_type", 12 | "source_field_name", 13 | "child_field_name", 14 | "value", 15 | "column_break_5", 16 | "section_break_9", 17 | "target_doctype", 18 | "target_type", 19 | "target_field_name", 20 | "target_child_field_name" 21 | ], 22 | "fields": [ 23 | { 24 | "fieldname": "dimension_name", 25 | "fieldtype": "Link", 26 | "in_list_view": 1, 27 | "label": "Dimension Name", 28 | "options": "Accounting Dimension", 29 | "reqd": 1 30 | }, 31 | { 32 | "depends_on": "eval:doc.source_type == \"Value\"", 33 | "fieldname": "value", 34 | "fieldtype": "Data", 35 | "in_list_view": 1, 36 | "label": "Value", 37 | "mandatory_depends_on": "eval:doc.source_type == \"Value\"" 38 | }, 39 | { 40 | "fieldname": "column_break_5", 41 | "fieldtype": "Column Break" 42 | }, 43 | { 44 | "fieldname": "source_doctype", 45 | "fieldtype": "Link", 46 | "in_list_view": 1, 47 | "label": "Source DocType", 48 | "options": "DocType", 49 | "reqd": 1 50 | }, 51 | { 52 | "fieldname": "target_doctype", 53 | "fieldtype": "Link", 54 | "label": "Target DocType", 55 | "options": "DocType", 56 | "reqd": 1 57 | }, 58 | { 59 | "fieldname": "section_break_9", 60 | "fieldtype": "Section Break" 61 | }, 62 | { 63 | "depends_on": "eval:doc.source_type == \"Field\" || doc.source_type == \"Child\"", 64 | "description": "Field Name from Transportation Assignment Field Type", 65 | "fieldname": "source_field_name", 66 | "fieldtype": "Data", 67 | "in_list_view": 1, 68 | "label": "Source Field Name", 69 | "mandatory_depends_on": "eval:doc.source_type == \"Field\" || doc.source_type == \"Child\"" 70 | }, 71 | { 72 | "depends_on": "eval:doc.source_type == \"Child\"", 73 | "fieldname": "child_field_name", 74 | "fieldtype": "Data", 75 | "label": "Child Field Name", 76 | "mandatory_depends_on": "eval:doc.source_type == \"Child\"" 77 | }, 78 | { 79 | "fieldname": "target_type", 80 | "fieldtype": "Select", 81 | "label": "Target Type", 82 | "options": "Main\nChild" 83 | }, 84 | { 85 | "depends_on": "eval:doc.traget_type != \"\"", 86 | "fieldname": "target_field_name", 87 | "fieldtype": "Data", 88 | "label": "Target Field Name", 89 | "mandatory_depends_on": "eval:doc.traget_type == \"Main\" || doc.source_type == \"Child\"" 90 | }, 91 | { 92 | "depends_on": "eval:doc.target_type == \"Child\"", 93 | "fieldname": "target_child_field_name", 94 | "fieldtype": "Data", 95 | "label": "Target Child Field Name", 96 | "mandatory_depends_on": "eval:doc.target_type == \"Child\"" 97 | }, 98 | { 99 | "fieldname": "source_type", 100 | "fieldtype": "Select", 101 | "in_list_view": 1, 102 | "label": "Source Type", 103 | "options": "Field\nValue\nChild" 104 | } 105 | ], 106 | "index_web_pages_for_search": 1, 107 | "istable": 1, 108 | "links": [], 109 | "modified": "2022-02-22 15:31:40.803284", 110 | "modified_by": "Administrator", 111 | "module": "Transport Management", 112 | "name": "Transport Accounting Dimension", 113 | "owner": "Administrator", 114 | "permissions": [], 115 | "sort_field": "modified", 116 | "sort_order": "DESC" 117 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_accounting_dimension/transport_accounting_dimension.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TransportAccountingDimension(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_assignment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transport_assignment/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_assignment/test_transport_assignment.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTransportAssignment(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_assignment/transport_assignment.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Transport Assignment', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_assignment/transport_assignment.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TransportAssignment(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cargo_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transport_cargo_type/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cargo_type/test_transport_cargo_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTransportCargoType(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cargo_type/transport_cargo_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Transport Cargo Type', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cargo_type/transport_cargo_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:cargo_name", 5 | "creation": "2022-01-30 15:44:35.159543", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "cargo_name", 11 | "permits_section", 12 | "permits" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "cargo_name", 17 | "fieldtype": "Data", 18 | "label": "Name", 19 | "unique": 1 20 | }, 21 | { 22 | "fieldname": "permits_section", 23 | "fieldtype": "Section Break" 24 | }, 25 | { 26 | "fieldname": "permits", 27 | "fieldtype": "Table", 28 | "label": "Permits", 29 | "options": "Transport Cargo Type Permit" 30 | } 31 | ], 32 | "links": [], 33 | "modified": "2022-01-30 15:49:09.699878", 34 | "modified_by": "Administrator", 35 | "module": "Transport Management", 36 | "name": "Transport Cargo Type", 37 | "owner": "Administrator", 38 | "permissions": [ 39 | { 40 | "create": 1, 41 | "delete": 1, 42 | "email": 1, 43 | "export": 1, 44 | "print": 1, 45 | "read": 1, 46 | "report": 1, 47 | "role": "Clearing Agent", 48 | "share": 1, 49 | "write": 1 50 | } 51 | ], 52 | "sort_field": "modified", 53 | "sort_order": "DESC", 54 | "track_changes": 1 55 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cargo_type/transport_cargo_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TransportCargoType(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cargo_type_permit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transport_cargo_type_permit/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cargo_type_permit/transport_cargo_type_permit.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2022-01-30 15:45:50.859480", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "permit_name", 9 | "mandatory" 10 | ], 11 | "fields": [ 12 | { 13 | "columns": 3, 14 | "fieldname": "permit_name", 15 | "fieldtype": "Data", 16 | "in_list_view": 1, 17 | "label": "Name", 18 | "reqd": 1 19 | }, 20 | { 21 | "default": "0", 22 | "fieldname": "mandatory", 23 | "fieldtype": "Check", 24 | "in_list_view": 1, 25 | "label": "Mandatory" 26 | } 27 | ], 28 | "istable": 1, 29 | "links": [], 30 | "modified": "2022-01-30 15:46:02.804176", 31 | "modified_by": "Administrator", 32 | "module": "Transport Management", 33 | "name": "Transport Cargo Type Permit", 34 | "owner": "Administrator", 35 | "permissions": [], 36 | "quick_entry": 1, 37 | "sort_field": "modified", 38 | "sort_order": "DESC", 39 | "track_changes": 1 40 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cargo_type_permit/transport_cargo_type_permit.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TransportCargoTypePermit(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cash_account_group/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transport_cash_account_group/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cash_account_group/transport_cash_account_group.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2022-02-17 02:59:14.235779", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "account_group" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "account_group", 14 | "fieldtype": "Link", 15 | "in_list_view": 1, 16 | "label": "Account Group", 17 | "options": "Account" 18 | } 19 | ], 20 | "index_web_pages_for_search": 1, 21 | "istable": 1, 22 | "links": [], 23 | "modified": "2022-02-17 02:59:14.235779", 24 | "modified_by": "Administrator", 25 | "module": "Transport Management", 26 | "name": "Transport Cash Account Group", 27 | "owner": "Administrator", 28 | "permissions": [], 29 | "sort_field": "modified", 30 | "sort_order": "DESC" 31 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_cash_account_group/transport_cash_account_group.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TransportCashAccountGroup(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_expense_account_group/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transport_expense_account_group/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_expense_account_group/test_transport_expense_account_group.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTransportExpenseAccountGroup(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_expense_account_group/transport_expense_account_group.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Transport Expense Account Group', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_expense_account_group/transport_expense_account_group.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2022-02-17 02:11:46.102806", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "account_group" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "account_group", 14 | "fieldtype": "Link", 15 | "in_list_view": 1, 16 | "label": "Account Group", 17 | "options": "Account" 18 | } 19 | ], 20 | "index_web_pages_for_search": 1, 21 | "istable": 1, 22 | "links": [], 23 | "modified": "2022-02-17 02:17:38.666789", 24 | "modified_by": "Administrator", 25 | "module": "Transport Management", 26 | "name": "Transport Expense Account Group", 27 | "owner": "Administrator", 28 | "permissions": [], 29 | "sort_field": "modified", 30 | "sort_order": "DESC" 31 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_expense_account_group/transport_expense_account_group.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TransportExpenseAccountGroup(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_location/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transport_location/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_location/test_transport_location.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTransportLocation(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_location/transport_location.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Transport Location', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_location/transport_location.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:location", 5 | "creation": "2021-12-27 17:10:13.069258", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "location", 11 | "country" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "location", 16 | "fieldtype": "Data", 17 | "in_list_view": 1, 18 | "in_standard_filter": 1, 19 | "label": "Location ", 20 | "reqd": 1, 21 | "unique": 1 22 | }, 23 | { 24 | "fieldname": "country", 25 | "fieldtype": "Link", 26 | "in_list_view": 1, 27 | "label": "Country", 28 | "options": "Country", 29 | "reqd": 1 30 | } 31 | ], 32 | "index_web_pages_for_search": 1, 33 | "links": [], 34 | "modified": "2021-12-27 17:11:49.652429", 35 | "modified_by": "Administrator", 36 | "module": "Transport Management", 37 | "name": "Transport Location", 38 | "owner": "Administrator", 39 | "permissions": [ 40 | { 41 | "create": 1, 42 | "delete": 1, 43 | "email": 1, 44 | "export": 1, 45 | "print": 1, 46 | "read": 1, 47 | "report": 1, 48 | "role": "System Manager", 49 | "share": 1, 50 | "write": 1 51 | } 52 | ], 53 | "search_fields": "country", 54 | "sort_field": "modified", 55 | "sort_order": "DESC" 56 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_location/transport_location.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TransportLocation(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transport_settings/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_settings/test_transport_settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTransportSettings(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_settings/transport_settings.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Transport Settings', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | onload: function (frm) { 9 | frm.set_query("expense_account_group", function () { 10 | return { 11 | "filters": { 12 | "root_type": "Expense", 13 | "is_group": 1 14 | } 15 | }; 16 | }); 17 | frm.set_query("cash_bank_account_group", function () { 18 | return { 19 | "filters": { 20 | "root_type": "Asset", 21 | "is_group": 1 22 | } 23 | }; 24 | }); 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_settings/transport_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2021-08-19 12:03:11.362135", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "vehicle_fuel_parent_warehouse", 9 | "sales_item_group", 10 | "fuel_item_group", 11 | "fuel_item", 12 | "column_break_4", 13 | "expense_account_group", 14 | "cash_bank_account_group", 15 | "section_break_4", 16 | "accounting_dimension" 17 | ], 18 | "fields": [ 19 | { 20 | "fieldname": "vehicle_fuel_parent_warehouse", 21 | "fieldtype": "Link", 22 | "label": "Vehicle Fuel Parent Warehouse", 23 | "options": "Warehouse" 24 | }, 25 | { 26 | "fieldname": "sales_item_group", 27 | "fieldtype": "Link", 28 | "label": "Sales Item Group", 29 | "options": "Item Group" 30 | }, 31 | { 32 | "fieldname": "fuel_item_group", 33 | "fieldtype": "Link", 34 | "label": "Fuel Item Group", 35 | "options": "Item Group" 36 | }, 37 | { 38 | "fieldname": "section_break_4", 39 | "fieldtype": "Section Break" 40 | }, 41 | { 42 | "fieldname": "accounting_dimension", 43 | "fieldtype": "Table", 44 | "label": "Accounting Dimension", 45 | "options": "Transport Accounting Dimension" 46 | }, 47 | { 48 | "fieldname": "expense_account_group", 49 | "fieldtype": "Table MultiSelect", 50 | "label": "Expense Account Group", 51 | "options": "Transport Expense Account Group" 52 | }, 53 | { 54 | "fieldname": "cash_bank_account_group", 55 | "fieldtype": "Table MultiSelect", 56 | "label": "Cash or Bank Account Group", 57 | "options": "Transport Cash Account Group" 58 | }, 59 | { 60 | "fieldname": "column_break_4", 61 | "fieldtype": "Column Break" 62 | }, 63 | { 64 | "fieldname": "fuel_item", 65 | "fieldtype": "Link", 66 | "in_list_view": 1, 67 | "label": "Fuel Item", 68 | "options": "Item", 69 | "reqd": 1 70 | } 71 | ], 72 | "index_web_pages_for_search": 1, 73 | "issingle": 1, 74 | "links": [], 75 | "modified": "2022-02-22 00:29:15.407565", 76 | "modified_by": "Administrator", 77 | "module": "Transport Management", 78 | "name": "Transport Settings", 79 | "owner": "Administrator", 80 | "permissions": [ 81 | { 82 | "create": 1, 83 | "delete": 1, 84 | "email": 1, 85 | "print": 1, 86 | "read": 1, 87 | "role": "System Manager", 88 | "share": 1, 89 | "write": 1 90 | } 91 | ], 92 | "sort_field": "modified", 93 | "sort_order": "DESC", 94 | "track_changes": 1 95 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transport_settings/transport_settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TransportSettings(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transportation_order/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/transportation_order/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/transportation_order/test_transportation_order.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTransportationOrder(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_attachment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/trip_attachment/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_attachment/trip_attachment.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2021-12-30 00:06:23.613308", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "file_attachment" 9 | ], 10 | "fields": [ 11 | { 12 | "fieldname": "file_attachment", 13 | "fieldtype": "Data", 14 | "label": "File Attachment" 15 | } 16 | ], 17 | "istable": 1, 18 | "links": [], 19 | "modified": "2022-03-18 16:13:02.361280", 20 | "modified_by": "Administrator", 21 | "module": "Transport Management", 22 | "name": "Trip Attachment", 23 | "owner": "Administrator", 24 | "permissions": [], 25 | "quick_entry": 1, 26 | "sort_field": "modified", 27 | "sort_order": "DESC", 28 | "track_changes": 1 29 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_attachment/trip_attachment.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TripAttachment(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_cargo_permit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/trip_cargo_permit/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_cargo_permit/test_trip_cargo_permit.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTripCargoPermit(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_cargo_permit/trip_cargo_permit.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Trip Cargo Permit', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_cargo_permit/trip_cargo_permit.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "creation": "2022-02-28 15:33:30.669129", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "permit_name", 10 | "mandatory", 11 | "document_number", 12 | "attachement" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "permit_name", 17 | "fieldtype": "Data", 18 | "in_list_view": 1, 19 | "label": "Permit Name" 20 | }, 21 | { 22 | "default": "0", 23 | "fieldname": "mandatory", 24 | "fieldtype": "Check", 25 | "in_list_view": 1, 26 | "label": "Mandatory" 27 | }, 28 | { 29 | "fieldname": "document_number", 30 | "fieldtype": "Data", 31 | "in_list_view": 1, 32 | "label": "Document Number" 33 | }, 34 | { 35 | "fieldname": "attachement", 36 | "fieldtype": "Attach", 37 | "in_list_view": 1, 38 | "label": "Attachement" 39 | } 40 | ], 41 | "index_web_pages_for_search": 1, 42 | "istable": 1, 43 | "links": [], 44 | "modified": "2022-11-21 17:43:36.430801", 45 | "modified_by": "Administrator", 46 | "module": "Transport Management", 47 | "name": "Trip Cargo Permit", 48 | "owner": "Administrator", 49 | "permissions": [], 50 | "sort_field": "modified", 51 | "sort_order": "DESC" 52 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_cargo_permit/trip_cargo_permit.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TripCargoPermit(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/trip_location/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location/test_trip_location.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTripLocation(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location/trip_location.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Trip Location', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location/trip_location.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:description", 5 | "creation": "2017-04-11 23:42:13.642259", 6 | "doctype": "DocType", 7 | "document_type": "Setup", 8 | "editable_grid": 1, 9 | "engine": "InnoDB", 10 | "field_order": [ 11 | "description", 12 | "location", 13 | "is_local_border", 14 | "is_international_border" 15 | ], 16 | "fields": [ 17 | { 18 | "fieldname": "description", 19 | "fieldtype": "Data", 20 | "label": "Description", 21 | "unique": 1 22 | }, 23 | { 24 | "fieldname": "location", 25 | "fieldtype": "Data", 26 | "label": "Location (Latitude, Longitude)" 27 | }, 28 | { 29 | "default": "0", 30 | "fieldname": "is_local_border", 31 | "fieldtype": "Check", 32 | "label": "Is Local Border" 33 | }, 34 | { 35 | "default": "0", 36 | "fieldname": "is_international_border", 37 | "fieldtype": "Check", 38 | "label": "Is International Border" 39 | } 40 | ], 41 | "links": [], 42 | "modified": "2021-12-13 16:54:51.174965", 43 | "modified_by": "Administrator", 44 | "module": "Transport Management", 45 | "name": "Trip Location", 46 | "owner": "Administrator", 47 | "permissions": [ 48 | { 49 | "create": 1, 50 | "delete": 1, 51 | "email": 1, 52 | "export": 1, 53 | "print": 1, 54 | "read": 1, 55 | "report": 1, 56 | "role": "Clearing Agent", 57 | "share": 1, 58 | "write": 1 59 | } 60 | ], 61 | "sort_field": "modified", 62 | "sort_order": "DESC", 63 | "track_changes": 1 64 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location/trip_location.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TripLocation(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/trip_location_type/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location_type/test_trip_location_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTripLocationType(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location_type/trip_location_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Trip Location Type', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location_type/trip_location_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:location_type", 5 | "creation": "2017-04-12 16:51:22.056811", 6 | "doctype": "DocType", 7 | "document_type": "Setup", 8 | "editable_grid": 1, 9 | "engine": "InnoDB", 10 | "field_order": [ 11 | "location_type", 12 | "section_information", 13 | "arrival_date", 14 | "departure_date", 15 | "column_break_7", 16 | "loading_date", 17 | "offloading_date" 18 | ], 19 | "fields": [ 20 | { 21 | "fieldname": "location_type", 22 | "fieldtype": "Data", 23 | "in_list_view": 1, 24 | "label": "Location Type", 25 | "reqd": 1, 26 | "unique": 1 27 | }, 28 | { 29 | "fieldname": "section_information", 30 | "fieldtype": "Section Break", 31 | "label": "Information to Capture" 32 | }, 33 | { 34 | "default": "0", 35 | "fieldname": "arrival_date", 36 | "fieldtype": "Check", 37 | "label": "Arrival Date" 38 | }, 39 | { 40 | "default": "0", 41 | "fieldname": "departure_date", 42 | "fieldtype": "Check", 43 | "label": "Departure Date" 44 | }, 45 | { 46 | "fieldname": "column_break_7", 47 | "fieldtype": "Column Break" 48 | }, 49 | { 50 | "default": "0", 51 | "fieldname": "loading_date", 52 | "fieldtype": "Check", 53 | "label": "Loading Date" 54 | }, 55 | { 56 | "default": "0", 57 | "fieldname": "offloading_date", 58 | "fieldtype": "Check", 59 | "label": "Offloading Date" 60 | } 61 | ], 62 | "links": [], 63 | "modified": "2021-12-13 16:57:33.128523", 64 | "modified_by": "Administrator", 65 | "module": "Transport Management", 66 | "name": "Trip Location Type", 67 | "owner": "Administrator", 68 | "permissions": [ 69 | { 70 | "create": 1, 71 | "delete": 1, 72 | "email": 1, 73 | "export": 1, 74 | "print": 1, 75 | "read": 1, 76 | "report": 1, 77 | "role": "Clearing Agent", 78 | "share": 1, 79 | "write": 1 80 | } 81 | ], 82 | "sort_field": "modified", 83 | "sort_order": "DESC", 84 | "track_changes": 1 85 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_location_type/trip_location_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TripLocationType(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_route/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/trip_route/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_route/test_trip_route.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestTripRoute(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_route/trip_route.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Trip Route', { 5 | refresh: function (frm) { 6 | }, 7 | 8 | validate: function (frm) { 9 | //Check not more than two local borders 10 | var local_border = 0; 11 | for (var key in locals['Trip Steps Table']) { 12 | if (1 == locals['Trip Steps Table'][key].is_local_border) { 13 | local_border++; 14 | } 15 | } 16 | if (local_border > 2) { 17 | msgprint('You cannot have more than two local borders in a route.', 'Error'); 18 | validated = false; 19 | } 20 | }, 21 | 22 | calculate_total_expenses: function (frm) { 23 | var totals = { 24 | "USD": 0, 25 | "TZS": 0 26 | }; 27 | frm.doc.fixed_expenses.forEach(function (row) { 28 | if (row.currency && row.amount) { 29 | totals[row.currency] += row.amount; 30 | } 31 | }); 32 | 33 | frm.set_value('total_usd', totals['USD']); 34 | frm.set_value('total_tzs', totals['TZS']); 35 | } 36 | }); 37 | 38 | 39 | frappe.ui.form.on('Trip Steps Table', { 40 | location: function (frm, cdt, cdn) { 41 | if (locals[cdt][cdn].location != "") { 42 | frappe.model.with_doc('Trip Location', locals[cdt][cdn].location, function () { 43 | reference_doc = frappe.model.get_doc('Trip Location', locals[cdt][cdn].location); 44 | if (1 == reference_doc.is_local_border) { 45 | frappe.model.set_value(cdt, cdn, 'is_local_border', 1); 46 | frappe.model.set_value(cdt, cdn, 'is_international_border', 0); 47 | } else if (1 == reference_doc.is_international_border) { 48 | frappe.model.set_value(cdt, cdn, 'is_international_border', 1); 49 | frappe.model.set_value(cdt, cdn, 'is_local_border', 0); 50 | } else { 51 | frappe.model.set_value(cdt, cdn, 'is_local_border', 0); 52 | frappe.model.set_value(cdt, cdn, 'is_international_border', 0); 53 | } 54 | }); 55 | } 56 | }, 57 | 58 | distance: function (frm, cdt, cdn) { 59 | var total_distance = 0; 60 | frm.doc.trip_steps.forEach(function (row) { 61 | if (row.distance) { 62 | total_distance += row.distance; 63 | } 64 | }); 65 | frm.set_value('total_distance', total_distance); 66 | }, 67 | 68 | fuel_consumption_qty: function (frm, cdt, cdn) { 69 | var total_fuel_consumption = 0; 70 | frm.doc.trip_steps.forEach(function (row) { 71 | if (row.fuel_consumption_qty) { 72 | total_fuel_consumption += row.fuel_consumption_qty; 73 | } 74 | }) 75 | frm.set_value('total_fuel_consumption_qty', total_fuel_consumption); 76 | }, 77 | }); 78 | 79 | frappe.ui.form.on('Fixed Expense Table', { 80 | currency: function (frm, cdt, cdn) { 81 | frm.events.calculate_total_expenses(frm); 82 | }, 83 | 84 | amount: function (frm, cdt, cdn) { 85 | frm.events.calculate_total_expenses(frm); 86 | } 87 | }); 88 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_route/trip_route.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:route_name", 5 | "creation": "2017-04-12 20:25:11.245694", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "route_name", 11 | "section_break_2", 12 | "section_steps", 13 | "trip_steps", 14 | "section_break_5", 15 | "total_distance", 16 | "column_break_7", 17 | "total_fuel_consumption_qty", 18 | "section_fixed_expenses", 19 | "fixed_expenses", 20 | "total_tzs", 21 | "total_usd" 22 | ], 23 | "fields": [ 24 | { 25 | "fieldname": "route_name", 26 | "fieldtype": "Data", 27 | "in_list_view": 1, 28 | "label": "Route Name", 29 | "reqd": 1, 30 | "unique": 1 31 | }, 32 | { 33 | "fieldname": "total_distance", 34 | "fieldtype": "Int", 35 | "in_list_view": 1, 36 | "label": "Total Distance (km)", 37 | "read_only": 1, 38 | "reqd": 1 39 | }, 40 | { 41 | "fieldname": "section_steps", 42 | "fieldtype": "Section Break", 43 | "label": "Route Steps" 44 | }, 45 | { 46 | "fieldname": "trip_steps", 47 | "fieldtype": "Table", 48 | "options": "Trip Steps Table", 49 | "reqd": 1 50 | }, 51 | { 52 | "fieldname": "section_fixed_expenses", 53 | "fieldtype": "Section Break", 54 | "label": "Fixed Expenses" 55 | }, 56 | { 57 | "fieldname": "fixed_expenses", 58 | "fieldtype": "Table", 59 | "options": "Fixed Expense Table" 60 | }, 61 | { 62 | "fieldname": "total_tzs", 63 | "fieldtype": "Float", 64 | "label": "Total TZS", 65 | "read_only": 1 66 | }, 67 | { 68 | "fieldname": "total_usd", 69 | "fieldtype": "Float", 70 | "label": "Total USD", 71 | "read_only": 1 72 | }, 73 | { 74 | "fieldname": "section_break_2", 75 | "fieldtype": "Section Break" 76 | }, 77 | { 78 | "fieldname": "section_break_5", 79 | "fieldtype": "Section Break" 80 | }, 81 | { 82 | "fieldname": "column_break_7", 83 | "fieldtype": "Column Break" 84 | }, 85 | { 86 | "fieldname": "total_fuel_consumption_qty", 87 | "fieldtype": "Data", 88 | "label": "Total Fuel Consumption Qty (Ltr.)", 89 | "read_only": 1 90 | } 91 | ], 92 | "links": [], 93 | "modified": "2022-11-11 10:34:42.032641", 94 | "modified_by": "Administrator", 95 | "module": "Transport Management", 96 | "name": "Trip Route", 97 | "owner": "Administrator", 98 | "permissions": [ 99 | { 100 | "create": 1, 101 | "delete": 1, 102 | "email": 1, 103 | "export": 1, 104 | "print": 1, 105 | "read": 1, 106 | "report": 1, 107 | "role": "Clearing Agent", 108 | "share": 1, 109 | "write": 1 110 | } 111 | ], 112 | "sort_field": "modified", 113 | "sort_order": "DESC", 114 | "track_changes": 1 115 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_route/trip_route.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | from __future__ import unicode_literals 5 | import frappe 6 | from frappe.model.document import Document 7 | from telegram import Location 8 | 9 | 10 | class TripRoute(Document): 11 | def validate(self): 12 | self.before_save() 13 | 14 | def before_save(self): 15 | for d in self.get("trip_steps"): 16 | if ( 17 | d and d.idx == 1 and hasattr(d, 'location_type') 18 | and d.location_type and d.location_type.lower() != "loading point" 19 | ): 20 | frappe.throw("Set 1st location type to LOADING POINT") 21 | break 22 | if ( 23 | d and d.idx == len(self.get("trip_steps")) and d.location_type 24 | and d.location_type.lower() != "offloading point" 25 | ): 26 | frappe.throw("Set last location type to OFFLOADING POINT") 27 | break 28 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_steps_table/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/trip_steps_table/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_steps_table/trip_steps_table.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2017-04-12 20:15:10.664163", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "location", 9 | "distance", 10 | "fuel_consumption_qty", 11 | "location_type", 12 | "is_local_border", 13 | "is_international_border" 14 | ], 15 | "fields": [ 16 | { 17 | "fieldname": "location", 18 | "fieldtype": "Link", 19 | "in_list_view": 1, 20 | "label": "Location", 21 | "options": "Trip Location", 22 | "reqd": 1 23 | }, 24 | { 25 | "fieldname": "distance", 26 | "fieldtype": "Float", 27 | "in_list_view": 1, 28 | "label": "Distance" 29 | }, 30 | { 31 | "fieldname": "location_type", 32 | "fieldtype": "Link", 33 | "in_list_view": 1, 34 | "label": "Location Type", 35 | "options": "Trip Location Type" 36 | }, 37 | { 38 | "default": "0", 39 | "fieldname": "is_local_border", 40 | "fieldtype": "Check", 41 | "in_list_view": 1, 42 | "label": "Is Local Border", 43 | "read_only": 1 44 | }, 45 | { 46 | "default": "0", 47 | "fieldname": "is_international_border", 48 | "fieldtype": "Check", 49 | "in_list_view": 1, 50 | "label": "Is International Border", 51 | "read_only": 1 52 | }, 53 | { 54 | "fieldname": "fuel_consumption_qty", 55 | "fieldtype": "Float", 56 | "in_list_view": 1, 57 | "label": "Fuel Consumption Qty (Ltr.)", 58 | "precision": "2" 59 | } 60 | ], 61 | "istable": 1, 62 | "links": [], 63 | "modified": "2022-11-11 10:29:55.431006", 64 | "modified_by": "Administrator", 65 | "module": "Transport Management", 66 | "name": "Trip Steps Table", 67 | "owner": "Administrator", 68 | "permissions": [], 69 | "quick_entry": 1, 70 | "sort_field": "modified", 71 | "sort_order": "DESC", 72 | "track_changes": 1 73 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/trip_steps_table/trip_steps_table.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class TripStepsTable(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_axle_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_axle_type/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_axle_type/test_vehicle_axle_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestVehicleAxleType(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_axle_type/vehicle_axle_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Vehicle Axle Type', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_axle_type/vehicle_axle_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:axle_type", 5 | "creation": "2022-02-07 09:15:37.292962", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "axle_type" 11 | ], 12 | "fields": [ 13 | { 14 | "fieldname": "axle_type", 15 | "fieldtype": "Data", 16 | "label": "Axle Type", 17 | "unique": 1 18 | } 19 | ], 20 | "index_web_pages_for_search": 1, 21 | "links": [], 22 | "modified": "2022-02-07 09:23:30.700666", 23 | "modified_by": "Administrator", 24 | "module": "Transport Management", 25 | "name": "Vehicle Axle Type", 26 | "owner": "Administrator", 27 | "permissions": [ 28 | { 29 | "create": 1, 30 | "delete": 1, 31 | "email": 1, 32 | "export": 1, 33 | "print": 1, 34 | "read": 1, 35 | "report": 1, 36 | "role": "System Manager", 37 | "share": 1, 38 | "write": 1 39 | } 40 | ], 41 | "sort_field": "modified", 42 | "sort_order": "DESC" 43 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_axle_type/vehicle_axle_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class VehicleAxleType(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_checklist/test_vehicle_checklist.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Vehicle Checklist", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Vehicle Checklist 13 | () => frappe.tests.make('Vehicle Checklist', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_checklist/test_vehicle_checklist.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2019, Aakvatech Limited and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | 10 | class TestVehicleChecklist(unittest.TestCase): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_checklist/vehicle_checklist.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Vehicle Checklist', { 5 | refresh: function (frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_checklist/vehicle_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_copy": 0, 3 | "allow_guest_to_view": 0, 4 | "allow_import": 0, 5 | "allow_rename": 0, 6 | "beta": 0, 7 | "creation": "2019-07-25 15:12:37.003334", 8 | "custom": 0, 9 | "docstatus": 0, 10 | "doctype": "DocType", 11 | "document_type": "", 12 | "editable_grid": 1, 13 | "engine": "InnoDB", 14 | "fields": [ 15 | { 16 | "allow_bulk_edit": 0, 17 | "allow_on_submit": 0, 18 | "bold": 0, 19 | "collapsible": 0, 20 | "columns": 0, 21 | "fieldname": "lighting_check_item", 22 | "fieldtype": "Data", 23 | "hidden": 0, 24 | "ignore_user_permissions": 0, 25 | "ignore_xss_filter": 0, 26 | "in_filter": 0, 27 | "in_global_search": 0, 28 | "in_list_view": 1, 29 | "in_standard_filter": 0, 30 | "label": "Lighting", 31 | "length": 0, 32 | "no_copy": 0, 33 | "permlevel": 0, 34 | "precision": "", 35 | "print_hide": 0, 36 | "print_hide_if_no_value": 0, 37 | "read_only": 0, 38 | "remember_last_selected_value": 0, 39 | "report_hide": 0, 40 | "reqd": 0, 41 | "search_index": 0, 42 | "set_only_once": 0, 43 | "unique": 0 44 | }, 45 | { 46 | "allow_bulk_edit": 0, 47 | "allow_on_submit": 0, 48 | "bold": 0, 49 | "collapsible": 0, 50 | "columns": 0, 51 | "fieldname": "lighting_mark", 52 | "fieldtype": "Check", 53 | "hidden": 0, 54 | "ignore_user_permissions": 0, 55 | "ignore_xss_filter": 0, 56 | "in_filter": 0, 57 | "in_global_search": 0, 58 | "in_list_view": 1, 59 | "in_standard_filter": 0, 60 | "label": "Mark", 61 | "length": 0, 62 | "no_copy": 0, 63 | "permlevel": 0, 64 | "precision": "", 65 | "print_hide": 0, 66 | "print_hide_if_no_value": 0, 67 | "read_only": 0, 68 | "remember_last_selected_value": 0, 69 | "report_hide": 0, 70 | "reqd": 0, 71 | "search_index": 0, 72 | "set_only_once": 0, 73 | "unique": 0 74 | }, 75 | { 76 | "allow_bulk_edit": 0, 77 | "allow_on_submit": 0, 78 | "bold": 0, 79 | "collapsible": 0, 80 | "columns": 0, 81 | "fieldname": "column_break_4", 82 | "fieldtype": "Column Break", 83 | "hidden": 0, 84 | "ignore_user_permissions": 0, 85 | "ignore_xss_filter": 0, 86 | "in_filter": 0, 87 | "in_global_search": 0, 88 | "in_list_view": 0, 89 | "in_standard_filter": 0, 90 | "length": 0, 91 | "no_copy": 0, 92 | "permlevel": 0, 93 | "precision": "", 94 | "print_hide": 0, 95 | "print_hide_if_no_value": 0, 96 | "read_only": 0, 97 | "remember_last_selected_value": 0, 98 | "report_hide": 0, 99 | "reqd": 0, 100 | "search_index": 0, 101 | "set_only_once": 0, 102 | "unique": 0 103 | }, 104 | { 105 | "allow_bulk_edit": 0, 106 | "allow_on_submit": 0, 107 | "bold": 0, 108 | "collapsible": 0, 109 | "columns": 0, 110 | "fieldname": "brake_system", 111 | "fieldtype": "Heading", 112 | "hidden": 0, 113 | "ignore_user_permissions": 0, 114 | "ignore_xss_filter": 0, 115 | "in_filter": 0, 116 | "in_global_search": 0, 117 | "in_list_view": 0, 118 | "in_standard_filter": 0, 119 | "label": "Brake System", 120 | "length": 0, 121 | "no_copy": 0, 122 | "permlevel": 0, 123 | "precision": "", 124 | "print_hide": 0, 125 | "print_hide_if_no_value": 0, 126 | "read_only": 0, 127 | "remember_last_selected_value": 0, 128 | "report_hide": 0, 129 | "reqd": 0, 130 | "search_index": 0, 131 | "set_only_once": 0, 132 | "unique": 0 133 | }, 134 | { 135 | "allow_bulk_edit": 0, 136 | "allow_on_submit": 0, 137 | "bold": 0, 138 | "collapsible": 0, 139 | "columns": 0, 140 | "fieldname": "brake_check_item", 141 | "fieldtype": "Data", 142 | "hidden": 0, 143 | "ignore_user_permissions": 0, 144 | "ignore_xss_filter": 0, 145 | "in_filter": 0, 146 | "in_global_search": 0, 147 | "in_list_view": 1, 148 | "in_standard_filter": 0, 149 | "label": "Item", 150 | "length": 0, 151 | "no_copy": 0, 152 | "permlevel": 0, 153 | "precision": "", 154 | "print_hide": 0, 155 | "print_hide_if_no_value": 0, 156 | "read_only": 0, 157 | "remember_last_selected_value": 0, 158 | "report_hide": 0, 159 | "reqd": 0, 160 | "search_index": 0, 161 | "set_only_once": 0, 162 | "unique": 0 163 | }, 164 | { 165 | "allow_bulk_edit": 0, 166 | "allow_on_submit": 0, 167 | "bold": 0, 168 | "collapsible": 0, 169 | "columns": 0, 170 | "fieldname": "brake_mark", 171 | "fieldtype": "Data", 172 | "hidden": 0, 173 | "ignore_user_permissions": 0, 174 | "ignore_xss_filter": 0, 175 | "in_filter": 0, 176 | "in_global_search": 0, 177 | "in_list_view": 1, 178 | "in_standard_filter": 0, 179 | "label": "Mark", 180 | "length": 0, 181 | "no_copy": 0, 182 | "permlevel": 0, 183 | "precision": "", 184 | "print_hide": 0, 185 | "print_hide_if_no_value": 0, 186 | "read_only": 0, 187 | "remember_last_selected_value": 0, 188 | "report_hide": 0, 189 | "reqd": 0, 190 | "search_index": 0, 191 | "set_only_once": 0, 192 | "unique": 0 193 | } 194 | ], 195 | "has_web_view": 0, 196 | "hide_heading": 0, 197 | "hide_toolbar": 0, 198 | "idx": 0, 199 | "image_view": 0, 200 | "in_create": 0, 201 | "is_submittable": 0, 202 | "issingle": 0, 203 | "istable": 1, 204 | "max_attachments": 0, 205 | "modified": "2019-07-25 15:41:22.659341", 206 | "modified_by": "Administrator", 207 | "module": "Transport Management", 208 | "name": "Vehicle Checklist", 209 | "name_case": "", 210 | "owner": "Administrator", 211 | "permissions": [], 212 | "quick_entry": 1, 213 | "read_only": 0, 214 | "read_only_onload": 0, 215 | "show_name_in_global_search": 0, 216 | "sort_field": "modified", 217 | "sort_order": "DESC", 218 | "track_changes": 1, 219 | "track_seen": 0 220 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_checklist/vehicle_checklist.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2019, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class VehicleChecklist(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_documents/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents/vehicle_documents.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2017-05-01 10:34:36.523614", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "description", 9 | "reference_no", 10 | "issue_date", 11 | "expire_date", 12 | "attachment", 13 | "send_alert_before" 14 | ], 15 | "fields": [ 16 | { 17 | "fieldname": "description", 18 | "fieldtype": "Link", 19 | "in_list_view": 1, 20 | "label": "Description", 21 | "options": "Vehicle Documents Type" 22 | }, 23 | { 24 | "fieldname": "reference_no", 25 | "fieldtype": "Data", 26 | "in_list_view": 1, 27 | "label": "Reference Number" 28 | }, 29 | { 30 | "fieldname": "issue_date", 31 | "fieldtype": "Date", 32 | "in_list_view": 1, 33 | "label": "Issue Date" 34 | }, 35 | { 36 | "fieldname": "expire_date", 37 | "fieldtype": "Date", 38 | "in_list_view": 1, 39 | "label": "Expire Date" 40 | }, 41 | { 42 | "fieldname": "attachment", 43 | "fieldtype": "Attach", 44 | "in_list_view": 1, 45 | "label": "Attachment" 46 | }, 47 | { 48 | "fetch_from": "description.send_alert_before", 49 | "fieldname": "send_alert_before", 50 | "fieldtype": "Data", 51 | "label": "Send Alert Before (Days)", 52 | "read_only": 1 53 | } 54 | ], 55 | "istable": 1, 56 | "links": [], 57 | "modified": "2022-11-23 18:05:43.278053", 58 | "modified_by": "Administrator", 59 | "module": "Transport Management", 60 | "name": "Vehicle Documents", 61 | "owner": "Administrator", 62 | "permissions": [], 63 | "quick_entry": 1, 64 | "sort_field": "modified", 65 | "sort_order": "DESC", 66 | "track_changes": 1 67 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents/vehicle_documents.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2017, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class VehicleDocuments(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_documents_type/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents_type/test_vehicle_documents_type.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Vehicle Documents Type", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Vehicle Documents Type 13 | () => frappe.tests.make('Vehicle Documents Type', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents_type/test_vehicle_documents_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2017, Aakvatech Limited and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | 10 | class TestVehicleDocumentsType(unittest.TestCase): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents_type/vehicle_documents_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Vehicle Documents Type', { 5 | refresh: function (frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents_type/vehicle_documents_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:description", 5 | "creation": "2017-05-01 10:30:15.592754", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "description", 11 | "send_alert_before" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "description", 16 | "fieldtype": "Data", 17 | "in_list_view": 1, 18 | "label": "Description", 19 | "reqd": 1, 20 | "unique": 1 21 | }, 22 | { 23 | "description": "Set number of Days before the Alert should be sent. If No of Days is 0 (Zero) then NO Alert will be sent", 24 | "fieldname": "send_alert_before", 25 | "fieldtype": "Int", 26 | "label": "Send Alert Before (Days)", 27 | "reqd": 1 28 | } 29 | ], 30 | "links": [], 31 | "modified": "2022-11-23 18:01:11.092135", 32 | "modified_by": "Administrator", 33 | "module": "Transport Management", 34 | "name": "Vehicle Documents Type", 35 | "owner": "Administrator", 36 | "permissions": [ 37 | { 38 | "create": 1, 39 | "delete": 1, 40 | "email": 1, 41 | "export": 1, 42 | "print": 1, 43 | "read": 1, 44 | "report": 1, 45 | "role": "Fleet Manager", 46 | "share": 1, 47 | "write": 1 48 | } 49 | ], 50 | "quick_entry": 1, 51 | "sort_field": "modified", 52 | "sort_order": "DESC", 53 | "track_changes": 1 54 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_documents_type/vehicle_documents_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2017, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class VehicleDocumentsType(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_inspection/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection/test_vehicle_inspection.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Vehicle Inspection", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Vehicle Inspection 13 | () => frappe.tests.make('Vehicle Inspection', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection/test_vehicle_inspection.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2019, Aakvatech Limited and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | 10 | class TestVehicleInspection(unittest.TestCase): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection/vehicle_inspection.js: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2022, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Vehicle Inspection', { 5 | 6 | //function to load pre-entered checklist of inspection routine checklist 7 | vehicle_type: function (frm) { 8 | frappe.model.with_doc("Vehicle Inspection Template", frm.doc.vehicle_type, function () { 9 | var ref_doc = frappe.get_doc("Vehicle Inspection Template", frm.doc.vehicle_type); 10 | console.log(ref_doc); 11 | 12 | //for Lighting checklist 13 | if (ref_doc.lighting_checklist_details && ref_doc.lighting_checklist_details.length > 0) { 14 | 15 | frm.clear_table("lighting_checklist"); 16 | 17 | ref_doc.lighting_checklist_details.forEach(function (row) { 18 | var new_row = frm.add_child("lighting_checklist"); 19 | new_row.lighting_check_item = row.vehicle_part; 20 | }) 21 | } 22 | 23 | //for brake system checklist 24 | if (ref_doc.brake_system_checklist_details && ref_doc.brake_system_checklist_details.length > 0) { 25 | 26 | frm.clear_table("brake_checklist"); 27 | 28 | ref_doc.brake_system_checklist_details.forEach(function (row) { 29 | var new_row = frm.add_child("brake_checklist"); 30 | new_row.brake_system = row.vehicle_part; 31 | }) 32 | } 33 | 34 | //for Engine checklist 35 | if (ref_doc.engine_checklist_details && ref_doc.engine_checklist_details.length > 0) { 36 | 37 | frm.clear_table("engine_checklist"); 38 | 39 | ref_doc.engine_checklist_details.forEach(function (row) { 40 | var new_row = frm.add_child("engine_checklist"); 41 | new_row.engine_system = row.criteria; 42 | }) 43 | } 44 | 45 | //for fuel system checklist 46 | if (ref_doc.fuel_system_checklist_details && ref_doc.fuel_system_checklist_details.length > 0) { 47 | 48 | frm.clear_table("fuel_system_checklist"); 49 | 50 | ref_doc.fuel_system_checklist_details.forEach(function (row) { 51 | var new_row = frm.add_child("fuel_system_checklist"); 52 | new_row.fuel_system = row.fuel_part; 53 | }) 54 | } 55 | 56 | //for tire status and pressure 57 | if (ref_doc.tire_checklist_details && ref_doc.tire_checklist_details.length > 0) { 58 | 59 | frm.clear_table("tire_checklist"); 60 | 61 | ref_doc.tire_checklist_details.forEach(function (row) { 62 | var new_row = frm.add_child("tire_checklist"); 63 | new_row.tire_position = row.tire_part; 64 | }) 65 | } 66 | //for power train checklist 67 | if (ref_doc.power_train_details && ref_doc.power_train_details.length > 0) { 68 | 69 | frm.clear_table("power_train_checklist"); 70 | 71 | ref_doc.power_train_details.forEach(function (row) { 72 | var new_row = frm.add_child("power_train_checklist"); 73 | new_row.power_train_checklist = row.power_train_part; 74 | }) 75 | } 76 | 77 | //for electronics checklist 78 | if (ref_doc.electronics_details && ref_doc.electronics_details.length > 0) { 79 | 80 | frm.clear_table("electronics_checklist"); 81 | 82 | ref_doc.electronics_details.forEach(function (row) { 83 | var new_row = frm.add_child("electronics_checklist"); 84 | new_row.electronics_part = row.electronic_part; 85 | }) 86 | } 87 | 88 | //for electrical checklist 89 | if (ref_doc.electrical_details && ref_doc.electrical_details.length > 0) { 90 | 91 | frm.clear_table("electrical_checklist"); 92 | 93 | ref_doc.electrical_details.forEach(function (row) { 94 | var new_row = frm.add_child("electrical_checklist"); 95 | new_row.electrical_part = row.electrical_part; 96 | }) 97 | } 98 | 99 | //for steering checklist 100 | if (ref_doc.steering_details && ref_doc.steering_details.length > 0) { 101 | 102 | frm.clear_table("steering_checklist"); 103 | 104 | ref_doc.steering_details.forEach(function (row) { 105 | var new_row = frm.add_child("steering_checklist"); 106 | new_row.steering_part = row.steering_part; 107 | }) 108 | } 109 | 110 | //for tires checklist 111 | if (ref_doc.tires_details && ref_doc.tires_details.length > 0) { 112 | 113 | frm.clear_table("tires_checklist"); 114 | 115 | ref_doc.tires_details.forEach(function (row) { 116 | var new_row = frm.add_child("tires_checklist"); 117 | new_row.criteria = row.criteria; 118 | }) 119 | } 120 | 121 | //for suspension checklist 122 | if (ref_doc.suspension_details && ref_doc.suspension_details.length > 0) { 123 | 124 | frm.clear_table("suspension_checklist"); 125 | 126 | ref_doc.suspension_details.forEach(function (row) { 127 | var new_row = frm.add_child("suspension_checklist"); 128 | new_row.part = row.parts; 129 | }) 130 | } 131 | 132 | 133 | //for air system/others checklist 134 | if (ref_doc.air_system_details && ref_doc.air_system_details.length > 0) { 135 | 136 | frm.clear_table("air_system_checklist"); 137 | 138 | ref_doc.air_system_details.forEach(function (row) { 139 | var new_row = frm.add_child("air_system_checklist"); 140 | new_row.part = row.parts; 141 | }) 142 | } 143 | 144 | 145 | 146 | }); 147 | frappe.after_ajax(function () { 148 | //list of table_names_fields from Vehicle Inspection to Update Values 149 | var field_lists = ["lighting_checklist", "brake_checklist", "engine_checklist", "fuel_system_checklist", "tire_checklist", "power_train_checklist", "electronics_checklist", "electrical_checklist", "steering_checklist", "tires_checklist", "suspension_checklist", "air_system_checklist"]; 150 | field_lists.forEach(function (row) { 151 | frm.refresh_field(row); 152 | }) 153 | 154 | }) 155 | }, 156 | refresh: function (frm) { 157 | 158 | 159 | } 160 | }); 161 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection/vehicle_inspection.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2022, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class VehicleInspection(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection_template/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_inspection_template/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection_template/test_vehicle_inspection_template.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Vehicle Inspection Template", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Vehicle Inspection Template 13 | () => frappe.tests.make('Vehicle Inspection Template', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection_template/test_vehicle_inspection_template.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2019, Aakvatech Limited and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | 10 | class TestVehicleInspectionTemplate(unittest.TestCase): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection_template/vehicle_inspection_template.js: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2022, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Vehicle Inspection Template', { 5 | refresh: function (frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_inspection_template/vehicle_inspection_template.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright(c) 2022, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class VehicleInspectionTemplate(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_log/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_log/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_log/test_vehicle_log.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Vehicle Log", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Vehicle Log 13 | () => frappe.tests.make('Vehicle Log', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_log/test_vehicle_log.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | from frappe.utils import nowdate,flt, cstr,random_string 9 | # test_records = frappe.get_test_records('Vehicle Log') 10 | class TestVehicleLog(unittest.TestCase): 11 | def test_make_vehicle_log(self): 12 | license_plate=random_string(10).upper() 13 | employee_id=frappe.db.sql("""select name from `tabEmployee` order by modified desc limit 1""")[0][0] 14 | vehicle = frappe.get_doc({ 15 | "doctype": "Vehicle", 16 | "license_plate": cstr(license_plate), 17 | "make": "Maruti", 18 | "model": "PCM", 19 | "last_odometer":5000, 20 | "acquisition_date":frappe.utils.nowdate(), 21 | "location": "Mumbai", 22 | "chassis_no": "1234ABCD", 23 | "vehicle_value":frappe.utils.flt(500000) 24 | }) 25 | try: 26 | vehicle.insert() 27 | except frappe.DuplicateEntryError: 28 | pass 29 | vehicle_log = frappe.get_doc({ 30 | "doctype": "Vehicle Log", 31 | "license_plate": cstr(license_plate), 32 | "employee":employee_id, 33 | "date":frappe.utils.nowdate(), 34 | "odometer":5010, 35 | "fuel_qty":frappe.utils.flt(50), 36 | "price": frappe.utils.flt(500) 37 | }) 38 | vehicle_log.insert() 39 | vehicle_log.submit() -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_log/vehicle_log.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on("Vehicle Log", { 5 | refresh: function(frm,cdt,cdn) { 6 | vehicle_log=frappe.model.get_doc(cdt,cdn); 7 | if (vehicle_log.license_plate) { 8 | frappe.call({ 9 | method: "erpnext.hr.doctype.vehicle_log.vehicle_log.get_make_model", 10 | args: { 11 | license_plate: vehicle_log.license_plate 12 | }, 13 | callback: function(r) { 14 | frappe.model.set_value(cdt, cdn, ("model"), r.message[0]); 15 | frappe.model.set_value(cdt, cdn, ("make"), r.message[1]); 16 | } 17 | }) 18 | } 19 | }, 20 | expense_claim: function(frm){ 21 | frappe.call({ 22 | method: "erpnext.hr.doctype.vehicle_log.vehicle_log.make_expense_claim", 23 | args:{ 24 | docname: frm.doc.name 25 | }, 26 | callback: function(r){ 27 | var doc = frappe.model.sync(r.message); 28 | frappe.set_route('Form', 'Expense Claim', r.message.name); 29 | } 30 | }) 31 | } 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_log/vehicle_log.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe import _ 8 | from frappe.utils import flt, cstr 9 | from frappe.model.mapper import get_mapped_doc 10 | from frappe.model.document import Document 11 | 12 | class VehicleLog(Document): 13 | def validate(self): 14 | last_odometer=frappe.db.get_value("Vehicle", self.license_plate, "last_odometer") 15 | if flt(self.odometer) < flt(last_odometer): 16 | frappe.throw(_("Current Odometer reading entered should be greater than initial Vehicle Odometer {0}").format(last_odometer)) 17 | for service_detail in self.service_detail: 18 | if (service_detail.service_item or service_detail.type or service_detail.frequency or service_detail.expense_amount): 19 | if not (service_detail.service_item and service_detail.type and service_detail.frequency and service_detail.expense_amount): 20 | frappe.throw(_("Service Item,Type,frequency and expense amount are required")) 21 | 22 | def on_submit(self): 23 | frappe.db.sql("update `tabVehicle` set last_odometer=%s where license_plate=%s", 24 | (self.odometer, self.license_plate)) 25 | 26 | @frappe.whitelist() 27 | def get_make_model(license_plate): 28 | vehicle=frappe.get_doc("Vehicle",license_plate) 29 | return (vehicle.make,vehicle.model) 30 | 31 | @frappe.whitelist() 32 | def make_expense_claim(docname): 33 | def check_exp_claim_exists(): 34 | exp_claim = frappe.db.sql("""select name from `tabExpense Claim` where vehicle_log=%s""",vehicle_log.name) 35 | return exp_claim[0][0] if exp_claim else "" 36 | def calc_service_exp(): 37 | total_exp_amt=0 38 | exp_claim = check_exp_claim_exists() 39 | if exp_claim: 40 | frappe.throw(_("Expense Claim {0} already exists for the Vehicle Log").format(exp_claim)) 41 | for serdetail in vehicle_log.service_detail: 42 | total_exp_amt = total_exp_amt + serdetail.expense_amount 43 | return total_exp_amt 44 | 45 | vehicle_log = frappe.get_doc("Vehicle Log", docname) 46 | exp_claim = frappe.new_doc("Expense Claim") 47 | exp_claim.employee=vehicle_log.employee 48 | exp_claim.vehicle_log=vehicle_log.name 49 | exp_claim.remark=_("Expense Claim for Vehicle Log {0}").format(vehicle_log.name) 50 | fuel_price=vehicle_log.price 51 | total_claim_amt=calc_service_exp() + fuel_price 52 | exp_claim.append("expenses",{ 53 | "expense_date":vehicle_log.date, 54 | "description":_("Vehicle Expenses"), 55 | "claim_amount":total_claim_amt 56 | }) 57 | return exp_claim.as_dict() 58 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_routine_checklist/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_routine_checklist/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_routine_checklist/test_vehicle_routine_checklist.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Vehicle Routine Checklist", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Vehicle Routine Checklist 13 | () => frappe.tests.make('Vehicle Routine Checklist', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_routine_checklist/test_vehicle_routine_checklist.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2019, Aakvatech Limited and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | 10 | class TestVehicleRoutineChecklist(unittest.TestCase): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_routine_checklist/vehicle_routine_checklist.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Vehicle Routine Checklist', { 5 | refresh: function (frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_routine_checklist/vehicle_routine_checklist.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_copy": 0, 3 | "allow_guest_to_view": 0, 4 | "allow_import": 0, 5 | "allow_rename": 0, 6 | "beta": 0, 7 | "creation": "2019-07-25 15:33:20.688701", 8 | "custom": 0, 9 | "docstatus": 0, 10 | "doctype": "DocType", 11 | "document_type": "", 12 | "editable_grid": 1, 13 | "engine": "InnoDB", 14 | "fields": [ 15 | { 16 | "allow_bulk_edit": 0, 17 | "allow_on_submit": 0, 18 | "bold": 0, 19 | "collapsible": 0, 20 | "columns": 0, 21 | "fieldname": "data_1", 22 | "fieldtype": "Data", 23 | "hidden": 0, 24 | "ignore_user_permissions": 0, 25 | "ignore_xss_filter": 0, 26 | "in_filter": 0, 27 | "in_global_search": 0, 28 | "in_list_view": 0, 29 | "in_standard_filter": 0, 30 | "length": 0, 31 | "no_copy": 0, 32 | "permlevel": 0, 33 | "precision": "", 34 | "print_hide": 0, 35 | "print_hide_if_no_value": 0, 36 | "read_only": 0, 37 | "remember_last_selected_value": 0, 38 | "report_hide": 0, 39 | "reqd": 0, 40 | "search_index": 0, 41 | "set_only_once": 0, 42 | "unique": 0 43 | } 44 | ], 45 | "has_web_view": 0, 46 | "hide_heading": 0, 47 | "hide_toolbar": 0, 48 | "idx": 0, 49 | "image_view": 0, 50 | "in_create": 0, 51 | "is_submittable": 0, 52 | "issingle": 0, 53 | "istable": 0, 54 | "max_attachments": 0, 55 | "modified": "2019-07-25 15:33:20.688701", 56 | "modified_by": "Administrator", 57 | "module": "Transport Management", 58 | "name": "Vehicle Routine Checklist", 59 | "name_case": "", 60 | "owner": "Administrator", 61 | "permissions": [ 62 | { 63 | "amend": 0, 64 | "apply_user_permissions": 0, 65 | "cancel": 0, 66 | "create": 1, 67 | "delete": 1, 68 | "email": 1, 69 | "export": 1, 70 | "if_owner": 0, 71 | "import": 0, 72 | "permlevel": 0, 73 | "print": 1, 74 | "read": 1, 75 | "report": 1, 76 | "role": "System Manager", 77 | "set_user_permissions": 0, 78 | "share": 1, 79 | "submit": 0, 80 | "write": 1 81 | } 82 | ], 83 | "quick_entry": 1, 84 | "read_only": 0, 85 | "read_only_onload": 0, 86 | "show_name_in_global_search": 0, 87 | "sort_field": "modified", 88 | "sort_order": "DESC", 89 | "track_changes": 1, 90 | "track_seen": 0 91 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_routine_checklist/vehicle_routine_checklist.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2019, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class VehicleRoutineChecklist(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_service/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_service/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_service/vehicle_service.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_copy": 0, 3 | "allow_import": 0, 4 | "allow_rename": 0, 5 | "beta": 0, 6 | "creation": "2016-09-03 19:20:14.561962", 7 | "custom": 0, 8 | "docstatus": 0, 9 | "doctype": "DocType", 10 | "document_type": "Document", 11 | "editable_grid": 1, 12 | "fields": [ 13 | { 14 | "allow_on_submit": 0, 15 | "bold": 0, 16 | "collapsible": 0, 17 | "columns": 0, 18 | "fieldname": "service_item", 19 | "fieldtype": "Select", 20 | "hidden": 0, 21 | "ignore_user_permissions": 0, 22 | "ignore_xss_filter": 0, 23 | "in_filter": 0, 24 | "in_list_view": 1, 25 | "in_standard_filter": 0, 26 | "label": "Service Item", 27 | "length": 0, 28 | "no_copy": 0, 29 | "options": "\nBrake Oil\nBrake Pad\nClutch Plate\nEngine Oil\nOil Change\nWheels", 30 | "permlevel": 0, 31 | "precision": "", 32 | "print_hide": 0, 33 | "print_hide_if_no_value": 0, 34 | "read_only": 0, 35 | "remember_last_selected_value": 0, 36 | "report_hide": 0, 37 | "reqd": 0, 38 | "search_index": 0, 39 | "set_only_once": 0, 40 | "unique": 0 41 | }, 42 | { 43 | "allow_on_submit": 0, 44 | "bold": 0, 45 | "collapsible": 0, 46 | "columns": 0, 47 | "fieldname": "type", 48 | "fieldtype": "Select", 49 | "hidden": 0, 50 | "ignore_user_permissions": 0, 51 | "ignore_xss_filter": 0, 52 | "in_filter": 0, 53 | "in_list_view": 1, 54 | "in_standard_filter": 0, 55 | "label": "Type", 56 | "length": 0, 57 | "no_copy": 0, 58 | "options": "\nInspection\nService\nChange", 59 | "permlevel": 0, 60 | "precision": "", 61 | "print_hide": 0, 62 | "print_hide_if_no_value": 0, 63 | "read_only": 0, 64 | "remember_last_selected_value": 0, 65 | "report_hide": 0, 66 | "reqd": 0, 67 | "search_index": 0, 68 | "set_only_once": 0, 69 | "unique": 0 70 | }, 71 | { 72 | "allow_on_submit": 0, 73 | "bold": 0, 74 | "collapsible": 0, 75 | "columns": 0, 76 | "fieldname": "frequency", 77 | "fieldtype": "Select", 78 | "hidden": 0, 79 | "ignore_user_permissions": 0, 80 | "ignore_xss_filter": 0, 81 | "in_filter": 0, 82 | "in_list_view": 1, 83 | "in_standard_filter": 0, 84 | "label": "Frequency", 85 | "length": 0, 86 | "no_copy": 0, 87 | "options": "\nMileage\nMonthly\nQuarterly\nHalf Yearly\nYearly", 88 | "permlevel": 0, 89 | "precision": "", 90 | "print_hide": 0, 91 | "print_hide_if_no_value": 0, 92 | "read_only": 0, 93 | "remember_last_selected_value": 0, 94 | "report_hide": 0, 95 | "reqd": 0, 96 | "search_index": 0, 97 | "set_only_once": 0, 98 | "unique": 0 99 | }, 100 | { 101 | "allow_on_submit": 0, 102 | "bold": 0, 103 | "collapsible": 0, 104 | "columns": 0, 105 | "fieldname": "expense_amount", 106 | "fieldtype": "Currency", 107 | "hidden": 0, 108 | "ignore_user_permissions": 0, 109 | "ignore_xss_filter": 0, 110 | "in_filter": 0, 111 | "in_list_view": 1, 112 | "in_standard_filter": 0, 113 | "label": "Expense", 114 | "length": 0, 115 | "no_copy": 0, 116 | "permlevel": 0, 117 | "precision": "", 118 | "print_hide": 0, 119 | "print_hide_if_no_value": 0, 120 | "read_only": 0, 121 | "remember_last_selected_value": 0, 122 | "report_hide": 0, 123 | "reqd": 0, 124 | "search_index": 0, 125 | "set_only_once": 0, 126 | "unique": 0 127 | } 128 | ], 129 | "hide_heading": 0, 130 | "hide_toolbar": 0, 131 | "idx": 0, 132 | "image_view": 0, 133 | "in_create": 0, 134 | "in_dialog": 0, 135 | "is_submittable": 0, 136 | "issingle": 0, 137 | "istable": 1, 138 | "max_attachments": 0, 139 | "modified": "2017-01-09 11:10:29.476907", 140 | "modified_by": "Administrator", 141 | "module": "Transport Management", 142 | "name": "Vehicle Service", 143 | "name_case": "", 144 | "owner": "Administrator", 145 | "permissions": [], 146 | "quick_entry": 1, 147 | "read_only": 0, 148 | "read_only_onload": 0, 149 | "sort_field": "modified", 150 | "sort_order": "DESC", 151 | "track_changes": 1, 152 | "track_seen": 0 153 | } 154 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_service/vehicle_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | class VehicleService(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_trip/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_trip/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_trip/test_vehicle_trip.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Vehicle Trip", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Vehicle Trip 13 | () => frappe.tests.make('Vehicle Trip', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_trip/test_vehicle_trip.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2015, Aakvatech Limited and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | # test_records = frappe.get_test_records('Vehicle Trip') 10 | 11 | 12 | class TestVehicleTrip(unittest.TestCase): 13 | pass 14 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_trip/vehicle_trip_dashboard.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return { 5 | 'fieldname': 'purchase_invoice', 6 | 'non_standard_fieldnames': { 7 | 'Requested Payments': 'reference_docname', 8 | 'Fuel Request':'reference_docname', 9 | 'Transport Assignment' :'vehicle_trip' 10 | }, 11 | 'internal_links': { 12 | #'Purchase Order': ['items', 'purchase_order'], 13 | #'Purchase Receipt': ['items', 'purchase_receipt'], 14 | }, 15 | 'transactions': [ 16 | 17 | { 18 | 'label': _('Reference'), 19 | 'items': ['Requested Payments','Fuel Request','Transport Assignment'] 20 | }, 21 | 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_trip_location_update/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_trip_location_update/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_trip_location_update/vehicle_trip_location_update.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2017, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class VehicleTripLocationUpdate(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_type/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/doctype/vehicle_type/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_type/test_vehicle_type.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // rename this file from _test_[name] to test_[name] to activate 3 | // and remove above this line 4 | 5 | QUnit.test("test: Vehicle Type", function (assert) { 6 | let done = assert.async(); 7 | 8 | // number of asserts 9 | assert.expect(1); 10 | 11 | frappe.run_serially([ 12 | // insert a new Vehicle Type 13 | () => frappe.tests.make('Vehicle Type', [ 14 | // values to be set 15 | {key: 'value'} 16 | ]), 17 | () => { 18 | assert.equal(cur_frm.doc.key, 'value'); 19 | }, 20 | () => done() 21 | ]); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_type/test_vehicle_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2019, Aakvatech Limited and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | 10 | class TestVehicleType(unittest.TestCase): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_type/vehicle_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Vehicle Type', { 5 | refresh: function (frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_type/vehicle_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_copy": 0, 3 | "allow_guest_to_view": 0, 4 | "allow_import": 0, 5 | "allow_rename": 0, 6 | "autoname": "field:vehicle_type", 7 | "beta": 0, 8 | "creation": "2019-07-25 14:46:28.040192", 9 | "custom": 0, 10 | "docstatus": 0, 11 | "doctype": "DocType", 12 | "document_type": "", 13 | "editable_grid": 1, 14 | "engine": "InnoDB", 15 | "fields": [ 16 | { 17 | "allow_bulk_edit": 0, 18 | "allow_on_submit": 0, 19 | "bold": 0, 20 | "collapsible": 0, 21 | "columns": 0, 22 | "fieldname": "vehicle_type", 23 | "fieldtype": "Data", 24 | "hidden": 0, 25 | "ignore_user_permissions": 0, 26 | "ignore_xss_filter": 0, 27 | "in_filter": 0, 28 | "in_global_search": 0, 29 | "in_list_view": 0, 30 | "in_standard_filter": 0, 31 | "label": "Vehicle Type", 32 | "length": 0, 33 | "no_copy": 0, 34 | "permlevel": 0, 35 | "precision": "", 36 | "print_hide": 0, 37 | "print_hide_if_no_value": 0, 38 | "read_only": 0, 39 | "remember_last_selected_value": 0, 40 | "report_hide": 0, 41 | "reqd": 0, 42 | "search_index": 0, 43 | "set_only_once": 0, 44 | "unique": 0 45 | } 46 | ], 47 | "has_web_view": 0, 48 | "hide_heading": 0, 49 | "hide_toolbar": 0, 50 | "idx": 0, 51 | "image_view": 0, 52 | "in_create": 0, 53 | "is_submittable": 0, 54 | "issingle": 0, 55 | "istable": 0, 56 | "max_attachments": 0, 57 | "modified": "2019-07-25 14:53:17.594531", 58 | "modified_by": "Administrator", 59 | "module": "Transport Management", 60 | "name": "Vehicle Type", 61 | "name_case": "", 62 | "owner": "Administrator", 63 | "permissions": [ 64 | { 65 | "amend": 0, 66 | "apply_user_permissions": 0, 67 | "cancel": 0, 68 | "create": 1, 69 | "delete": 1, 70 | "email": 1, 71 | "export": 1, 72 | "if_owner": 0, 73 | "import": 0, 74 | "permlevel": 0, 75 | "print": 1, 76 | "read": 1, 77 | "report": 1, 78 | "role": "System Manager", 79 | "set_user_permissions": 0, 80 | "share": 1, 81 | "submit": 0, 82 | "write": 1 83 | } 84 | ], 85 | "quick_entry": 0, 86 | "read_only": 0, 87 | "read_only_onload": 0, 88 | "show_name_in_global_search": 0, 89 | "sort_field": "modified", 90 | "sort_order": "DESC", 91 | "track_changes": 1, 92 | "track_seen": 0 93 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/doctype/vehicle_type/vehicle_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2019, Aakvatech Limited and contributors 3 | # For license information, please see license.txt 4 | 5 | from __future__ import unicode_literals 6 | import frappe 7 | from frappe.model.document import Document 8 | 9 | 10 | class VehicleType(Document): 11 | pass 12 | -------------------------------------------------------------------------------- /trans_ms/transport_management/report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/report/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/report/document_expiry_alert_report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/report/document_expiry_alert_report/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/report/document_expiry_alert_report/document_expiry_alert_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "columns": [], 4 | "creation": "2023-01-10 09:04:07.605551", 5 | "disable_prepared_report": 0, 6 | "disabled": 0, 7 | "docstatus": 0, 8 | "doctype": "Report", 9 | "filters": [], 10 | "idx": 0, 11 | "is_standard": "Yes", 12 | "letter_head": "Main Letter Head", 13 | "modified": "2023-01-10 09:04:07.605551", 14 | "modified_by": "Administrator", 15 | "module": "Transport Management", 16 | "name": "Document Expiry Alert Report", 17 | "owner": "Administrator", 18 | "prepared_report": 0, 19 | "query": "SELECT \n vd.parenttype AS \"Vehicle Type:Data:150\",\n vd.parent AS \"Vehicle No:Data:100\",\n vd.description AS \"Document Type:Data:250\",\n vd.reference_no AS \"Reference No:Data:200\",\n vd.issue_date AS \"Issued On:Date:100\",\n vd.expire_date AS \"Expiring On:Date:100\"\nFROM `tabVehicle Documents` vd\nWHERE vd.expire_date <= date_add(curdate(),interval vd.send_alert_before day)\nAND vd.expire_date IS NOT NULL\nAND vd.send_alert_before > 0 \nORDER BY vd.expire_date", 20 | "ref_doctype": "Vehicle", 21 | "report_name": "Document Expiry Alert Report", 22 | "report_type": "Query Report", 23 | "roles": [ 24 | { 25 | "role": "Clearing Agent" 26 | }, 27 | { 28 | "role": "System Manager" 29 | }, 30 | { 31 | "role": "Item Manager" 32 | }, 33 | { 34 | "role": "Accounts Manager" 35 | }, 36 | { 37 | "role": "Accounts User" 38 | }, 39 | { 40 | "role": "Sales User" 41 | }, 42 | { 43 | "role": "Maintenance User" 44 | }, 45 | { 46 | "role": "Sales Manager" 47 | }, 48 | { 49 | "role": "Stock User" 50 | }, 51 | { 52 | "role": "Fleet Manager" 53 | }, 54 | { 55 | "role": "Employee Self Service" 56 | } 57 | ] 58 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/report/driver_document_expiry_alert_report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/report/driver_document_expiry_alert_report/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/report/driver_document_expiry_alert_report/driver_document_expiry_alert_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "columns": [], 4 | "creation": "2023-01-10 09:04:58.315243", 5 | "disable_prepared_report": 0, 6 | "disabled": 0, 7 | "docstatus": 0, 8 | "doctype": "Report", 9 | "filters": [], 10 | "idx": 0, 11 | "is_standard": "Yes", 12 | "letter_head": "Main Letter Head", 13 | "modified": "2023-01-10 09:04:58.315243", 14 | "modified_by": "Administrator", 15 | "module": "Transport Management", 16 | "name": "Driver Document Expiry Alert Report", 17 | "owner": "Administrator", 18 | "prepared_report": 0, 19 | "query": "SELECT \n d.full_name AS \"Driver Name:Data:400\",\n dda.document_name AS \"Document Type:Data:250\",\n dda.document_number AS \"Reference No:Data:200\",\n dda.issue_date AS \"Issued On:Date:100\",\n dda.expiry_date AS \"Expiring On:Date:100\"\n\nFROM `tabDriver` d\nINNER JOIN `tabDriver Document Attachment` dda\nON d.name=dda.parent\n\nWHERE dda.expiry_date <= date_add(curdate(),interval dda.send_alert_before day)\nAND dda.expiry_date IS NOT NULL\nAND dda.send_alert_before > 0 \nAND d.status = 'Active'\nORDER BY dda.expiry_date", 20 | "ref_doctype": "Driver", 21 | "report_name": "Driver Document Expiry Alert Report", 22 | "report_type": "Query Report", 23 | "roles": [ 24 | { 25 | "role": "Clearing Agent" 26 | }, 27 | { 28 | "role": "System Manager" 29 | }, 30 | { 31 | "role": "Item Manager" 32 | }, 33 | { 34 | "role": "Accounts Manager" 35 | }, 36 | { 37 | "role": "Accounts User" 38 | }, 39 | { 40 | "role": "Sales User" 41 | }, 42 | { 43 | "role": "Maintenance User" 44 | }, 45 | { 46 | "role": "Sales Manager" 47 | }, 48 | { 49 | "role": "Stock User" 50 | }, 51 | { 52 | "role": "Fleet Manager" 53 | }, 54 | { 55 | "role": "Employee Self Service" 56 | } 57 | ] 58 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/report/vehicle_tracking_report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/transport_management/report/vehicle_tracking_report/__init__.py -------------------------------------------------------------------------------- /trans_ms/transport_management/report/vehicle_tracking_report/vehicle_tracking_report.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023, Aakvatech Limited and contributors 2 | // For license information, please see license.txt 3 | /* eslint-disable */ 4 | 5 | frappe.query_reports["Vehicle Tracking Report"] = { 6 | "filters": [ 7 | { 8 | "fieldname": "from_date", 9 | "label": __("From Date"), 10 | "fieldtype": "Date", 11 | "reqd": 1 12 | }, 13 | { 14 | "fieldname": "to_date", 15 | "label": __("To Date"), 16 | "fieldtype": "Date", 17 | "reqd": 1 18 | }, 19 | { 20 | "fieldname": "customer", 21 | "label": __("Customer"), 22 | "fieldtype": "Link", 23 | "options": "Customer", 24 | }, 25 | { 26 | "fieldname": "transportation_order", 27 | "label": __("Transportation Order"), 28 | "fieldtype": "Link", 29 | "options": "Transportation Order", 30 | }, 31 | { 32 | "fieldname": "vehicle", 33 | "label": __("Vehicle"), 34 | "fieldtype": "Link", 35 | "options": "Vehicle", 36 | }, 37 | { 38 | "fieldname": "driver", 39 | "label": __("Driver"), 40 | "fieldtype": "Link", 41 | "options": "Driver", 42 | }, 43 | { 44 | "fieldname": "transporter_type", 45 | "label": __("Transporter Type"), 46 | "fieldtype": "Select", 47 | "options": "\nIn House\nSub- Contractor", 48 | }, 49 | { 50 | "fieldname": "main_route", 51 | "label": __("Main Route"), 52 | "fieldtype": "Link", 53 | "options": "Trip Route", 54 | } 55 | ] 56 | }; 57 | -------------------------------------------------------------------------------- /trans_ms/transport_management/report/vehicle_tracking_report/vehicle_tracking_report.json: -------------------------------------------------------------------------------- 1 | { 2 | "add_total_row": 0, 3 | "columns": [], 4 | "creation": "2023-02-10 16:56:50.753074", 5 | "disable_prepared_report": 0, 6 | "disabled": 0, 7 | "docstatus": 0, 8 | "doctype": "Report", 9 | "filters": [], 10 | "idx": 0, 11 | "is_standard": "Yes", 12 | "javascript": "", 13 | "letter_head": "Main Letter Head", 14 | "modified": "2023-02-10 16:58:44.565815", 15 | "modified_by": "Administrator", 16 | "module": "Transport Management", 17 | "name": "Vehicle Tracking Report", 18 | "owner": "Administrator", 19 | "prepared_report": 0, 20 | "ref_doctype": "Vehicle Trip", 21 | "report_name": "Vehicle Tracking Report", 22 | "report_type": "Script Report", 23 | "roles": [] 24 | } -------------------------------------------------------------------------------- /trans_ms/transport_management/report/vehicle_tracking_report/vehicle_tracking_report.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | import frappe 5 | from frappe import _ 6 | 7 | 8 | def execute(filters=None): 9 | data = [] 10 | trips, name_list = get_trip_details(filters) 11 | if len(trips) == 0: 12 | frappe.msgprint(_("No data found, Please check your filters")) 13 | return [], [] 14 | 15 | trip_steps = get_trip_steps(name_list) 16 | 17 | columns = get_columns(filters) 18 | locations = [{"location": d.location, "type": d.location_type} for d in trip_steps if d.parent == name_list[0]] 19 | 20 | for d in locations: 21 | columns.append({"fieldname": "arrival_" + frappe.scrub(d.get("location")), "fieldtype": "Date", "label": _("Arrived " + d.get("location")), "width": "100px"}) 22 | columns.append({"fieldname": "departure_" + frappe.scrub(d.get("location")), "fieldtype": "Date", "label": _("Depart " + d.get("location")), "width": "100px"}) 23 | 24 | for row in trips: 25 | new_row = {} 26 | for step in trip_steps: 27 | if row.name == step.parent: 28 | arrival_name = "arrival_" + frappe.scrub(step.location) 29 | departure_name = "departure_" + frappe.scrub(step.location) 30 | new_row[arrival_name] = step.arrival_date 31 | new_row[departure_name] = step.departure_date 32 | 33 | new_row.update({ 34 | "hose": row.vehicle, 35 | "trailer": row.trailer, 36 | "driver_name": row.driver_name, 37 | "contact_number": row.cell_number, 38 | "tonage": row.net_weight, 39 | "position": "", 40 | "loaded_date": row.start_date, 41 | "tracking_date": "" 42 | }) 43 | data.append(new_row) 44 | 45 | return columns, data 46 | 47 | def get_columns(filters): 48 | columns = [ 49 | {"fieldname": "hose", "fieldtype": "Data", "label": _("Hose"), "width": "100px"}, 50 | {"fieldname": "trailer", "fieldtype": "Data", "label": _("Trailer"), "width": "100px"}, 51 | {"fieldname": "driver_name", "fieldtype": "Data", "label": _("Driver Name"), "width": "100px"}, 52 | {"fieldname": "contact_number", "fieldtype": "Data", "label": _("Contact Number"), "width": "100px"}, 53 | {"fieldname": "tonage", "fieldtype": "Float", "label": _("Tonage"), "width": "100px"}, 54 | {"fieldname": "position", "fieldtype": "Data", "label": _("Position"), "width": "100px"}, 55 | {"fieldname": "loaded_date", "fieldtype": "Date", "label": _("Loaded Date"), "width": "100px"}, 56 | {"fieldname": "tracking_date", "fieldtype": "Date", "label": _("Tracking_date"), "width": "100px"}, 57 | ] 58 | return columns 59 | 60 | def get_trip_details(filters): 61 | conditions = get_conditions(filters) 62 | trip_details = frappe.db.sql(""" 63 | SELECT vt.name, vt.vehicle, vt.trailer, vt.customer, 64 | vt.driver, vt.driver_name, vt.start_date, d.cell_number, cd.net_weight 65 | FROM `tabVehicle Trip` vt 66 | INNER JOIN `tabDriver` d ON vt.driver = d.name 67 | INNER JOIN `tabTransport Assignment` ta ON vt.name = ta.created_trip 68 | INNER JOIN `tabCargo Details` cd ON ta.cargo = cd.name 69 | WHERE vt.docstatus = 1 {conditions} 70 | """.format(conditions=conditions), filters,as_dict=True) 71 | 72 | trip_names = list(map(lambda x: x.name, trip_details)) 73 | return trip_details, trip_names 74 | 75 | def get_trip_steps(trip_names): 76 | if len(trip_names) == 0: 77 | return 78 | trip_steps = frappe.db.sql(""" 79 | SELECT ts.parent, ts.location, ts.location_type, 80 | ts.arrival_date, ts.departure_date, 81 | ts.loading_date, ts.offloading_date 82 | FROM `tabRoute Steps Table` ts 83 | WHERE ts.parent IN %(trip_names)s 84 | """, {'trip_names': trip_names}, as_dict=True) 85 | 86 | return trip_steps 87 | 88 | def get_conditions(filters): 89 | conditions = "" 90 | if filters.get("from_date"): 91 | conditions += " AND vt.start_date >= %(from_date)s" 92 | if filters.get("to_date"): 93 | conditions += " AND vt.start_date <= %(to_date)s" 94 | if filters.get("customer"): 95 | conditions += " AND vt.customer = %(customer)s" 96 | if filters.get("transportation_order"): 97 | conditions += " AND vt.transportation_order = %(transportation_order)s" 98 | if filters.get("vehicle"): 99 | conditions += " AND vt.vehicle = %(vehicle)s" 100 | if filters.get("transporter_type"): 101 | conditions += " AND vt.transporter_type = %(transporter_type)s" 102 | if filters.get("driver"): 103 | conditions += " AND vt.driver = %(driver)s" 104 | if filters.get("main_route"): 105 | conditions += " AND vt.main_route = %(main_route)s" 106 | 107 | return conditions -------------------------------------------------------------------------------- /trans_ms/transport_management/workspace/transport/transport.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": "Domains", 3 | "charts": [], 4 | "creation": "2021-08-19 11:51:33.330890", 5 | "developer_mode_only": 0, 6 | "disable_user_customization": 0, 7 | "docstatus": 0, 8 | "doctype": "Workspace", 9 | "extends_another_page": 0, 10 | "hide_custom": 0, 11 | "icon": "map", 12 | "idx": 0, 13 | "is_default": 0, 14 | "is_standard": 1, 15 | "label": "Transport", 16 | "links": [ 17 | { 18 | "hidden": 0, 19 | "is_query_report": 0, 20 | "label": "Document", 21 | "link_type": "DocType", 22 | "onboard": 0, 23 | "type": "Card Break" 24 | }, 25 | { 26 | "hidden": 0, 27 | "is_query_report": 0, 28 | "label": "Transport Order", 29 | "link_to": "Transportation Order", 30 | "link_type": "DocType", 31 | "onboard": 0, 32 | "type": "Link" 33 | }, 34 | { 35 | "hidden": 0, 36 | "is_query_report": 0, 37 | "label": "Vehicle Trip", 38 | "link_to": "Vehicle Trip", 39 | "link_type": "DocType", 40 | "onboard": 0, 41 | "type": "Link" 42 | }, 43 | { 44 | "hidden": 0, 45 | "is_query_report": 0, 46 | "label": "Fuel Request", 47 | "link_to": "Fuel Request", 48 | "link_type": "DocType", 49 | "onboard": 0, 50 | "type": "Link" 51 | }, 52 | { 53 | "hidden": 0, 54 | "is_query_report": 0, 55 | "label": "Requested Payment", 56 | "link_to": "Requested Payments", 57 | "link_type": "DocType", 58 | "onboard": 0, 59 | "type": "Link" 60 | }, 61 | { 62 | "hidden": 0, 63 | "is_query_report": 0, 64 | "label": "Trip", 65 | "link_type": "DocType", 66 | "onboard": 0, 67 | "type": "Card Break" 68 | }, 69 | { 70 | "hidden": 0, 71 | "is_query_report": 0, 72 | "label": "Trip Route", 73 | "link_to": "Trip Route", 74 | "link_type": "DocType", 75 | "onboard": 0, 76 | "type": "Link" 77 | }, 78 | { 79 | "hidden": 0, 80 | "is_query_report": 0, 81 | "label": "Trip Location", 82 | "link_to": "Trip Location", 83 | "link_type": "DocType", 84 | "onboard": 0, 85 | "type": "Link" 86 | }, 87 | { 88 | "hidden": 0, 89 | "is_query_report": 0, 90 | "label": "Trip Location Type", 91 | "link_to": "Trip Location Type", 92 | "link_type": "DocType", 93 | "onboard": 0, 94 | "type": "Link" 95 | }, 96 | { 97 | "hidden": 0, 98 | "is_query_report": 0, 99 | "label": "Setup", 100 | "link_type": "DocType", 101 | "onboard": 0, 102 | "type": "Card Break" 103 | }, 104 | { 105 | "hidden": 0, 106 | "is_query_report": 0, 107 | "label": "Vehicle", 108 | "link_to": "Vehicle", 109 | "link_type": "DocType", 110 | "onboard": 0, 111 | "type": "Link" 112 | }, 113 | { 114 | "hidden": 0, 115 | "is_query_report": 0, 116 | "label": "Vehicle Inspection Template", 117 | "link_to": "Vehicle Inspection Template", 118 | "link_type": "DocType", 119 | "onboard": 0, 120 | "type": "Link" 121 | }, 122 | { 123 | "hidden": 0, 124 | "is_query_report": 0, 125 | "label": "Trailer", 126 | "link_to": "Trailer", 127 | "link_type": "DocType", 128 | "onboard": 0, 129 | "type": "Link" 130 | }, 131 | { 132 | "hidden": 0, 133 | "is_query_report": 0, 134 | "label": "Fixed Expense", 135 | "link_to": "Fixed Expense", 136 | "link_type": "DocType", 137 | "onboard": 0, 138 | "type": "Link" 139 | }, 140 | { 141 | "hidden": 0, 142 | "is_query_report": 0, 143 | "label": "Cargo Type", 144 | "link_to": "Transport Cargo Type", 145 | "link_type": "DocType", 146 | "onboard": 0, 147 | "only_for": "", 148 | "type": "Link" 149 | }, 150 | { 151 | "hidden": 0, 152 | "is_query_report": 0, 153 | "label": "Vehicle Document Type", 154 | "link_to": "Vehicle Documents Type", 155 | "link_type": "DocType", 156 | "onboard": 0, 157 | "only_for": "", 158 | "type": "Link" 159 | }, 160 | { 161 | "hidden": 0, 162 | "is_query_report": 0, 163 | "label": "Driver Document", 164 | "link_to": "Driver Documents", 165 | "link_type": "DocType", 166 | "onboard": 0, 167 | "only_for": "", 168 | "type": "Link" 169 | }, 170 | { 171 | "hidden": 0, 172 | "is_query_report": 0, 173 | "label": "Settings", 174 | "link_type": "DocType", 175 | "onboard": 0, 176 | "type": "Card Break" 177 | }, 178 | { 179 | "hidden": 0, 180 | "is_query_report": 0, 181 | "label": "Transport Settings", 182 | "link_to": "Transport Settings", 183 | "link_type": "DocType", 184 | "onboard": 0, 185 | "type": "Link" 186 | } 187 | ], 188 | "modified": "2022-11-28 13:08:32.166360", 189 | "modified_by": "Administrator", 190 | "module": "Transport Management", 191 | "name": "Transport", 192 | "owner": "Administrator", 193 | "pin_to_bottom": 0, 194 | "pin_to_top": 0, 195 | "shortcuts": [] 196 | } -------------------------------------------------------------------------------- /trans_ms/utlis/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aakvatech/transport/3cedebca774e0a40c3090d22d1622163481fd6a0/trans_ms/utlis/__init__.py -------------------------------------------------------------------------------- /trans_ms/utlis/dimension.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Aakvatech Limited and contributors 2 | # For license information, please see license.txt 3 | 4 | from __future__ import unicode_literals 5 | import frappe 6 | from frappe import _ 7 | 8 | 9 | def set_dimension(src_doc, tr_doc, src_child=None, tr_child=None): 10 | set = frappe.get_cached_doc("Transport Settings", "Transport Settings") 11 | if len(set.accounting_dimension) == 0: 12 | return 13 | for dim in set.accounting_dimension: 14 | if ( 15 | dim.source_doctype == src_doc.doctype 16 | and dim.target_doctype == tr_doc.doctype 17 | ): 18 | value = None 19 | 20 | if dim.source_type == "Field": 21 | value = src_doc.get(dim.source_field_name) 22 | elif dim.source_type == "Value": 23 | value = dim.value 24 | elif dim.source_type == "Child" and src_child: 25 | value = src_child.get(dim.child_field_name) 26 | 27 | if dim.target_type == "Main": 28 | setattr(tr_doc, dim.target_field_name, value) 29 | elif dim.target_type == "Child" and tr_child: 30 | setattr(tr_child, dim.target_child_field_name, value) 31 | 32 | --------------------------------------------------------------------------------