├── license.txt ├── travel_agency ├── patches.txt ├── config │ ├── __init__.py │ ├── desktop.py │ └── docs.py ├── modules.txt ├── templates │ ├── __init__.py │ └── pages │ │ └── __init__.py ├── travel_agency │ ├── __init__.py │ └── doctype │ │ ├── __init__.py │ │ ├── airlines │ │ ├── __init__.py │ │ ├── airlines.js │ │ ├── test_airlines.py │ │ ├── airlines.py │ │ ├── test_airlines.js │ │ └── airlines.json │ │ ├── airports │ │ ├── __init__.py │ │ ├── airports.js │ │ ├── test_airports.py │ │ ├── airports.py │ │ ├── test_airports.js │ │ └── airports.json │ │ ├── via_table │ │ ├── __init__.py │ │ ├── via_table.py │ │ └── via_table.json │ │ ├── travel_settings │ │ ├── __init__.py │ │ ├── test_travel_settings.py │ │ ├── travel_settings.py │ │ ├── test_travel_settings.js │ │ ├── travel_settings.js │ │ └── travel_settings.json │ │ ├── travel_sales_invoice │ │ ├── __init__.py │ │ ├── test_travel_sales_invoice.py │ │ ├── test_travel_sales_invoice.js │ │ ├── travel_sales_invoice.py │ │ ├── travel_sales_invoice.js │ │ ├── travel_sales_invoice.old.py │ │ └── travel_sales_invoice.json │ │ ├── travel_sales_item │ │ ├── __init__.py │ │ ├── travel_sales_item.py │ │ └── travel_sales_item.json │ │ ├── travel_invoice_payment │ │ ├── __init__.py │ │ ├── travel_invoice_payment.py │ │ └── travel_invoice_payment.json │ │ └── travel_invoice_supplier_payment │ │ ├── __init__.py │ │ ├── travel_invoice_supplier_payment.py │ │ └── travel_invoice_supplier_payment.json ├── __init__.py └── hooks.py ├── requirements.txt ├── .gitignore ├── README.md ├── MANIFEST.in ├── setup.py └── sftp-config.json /license.txt: -------------------------------------------------------------------------------- 1 | License: MIT -------------------------------------------------------------------------------- /travel_agency/patches.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | frappe 2 | erpnext -------------------------------------------------------------------------------- /travel_agency/modules.txt: -------------------------------------------------------------------------------- 1 | Travel Agency -------------------------------------------------------------------------------- /travel_agency/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/templates/pages/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airlines/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airports/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/via_table/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_settings/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_invoice/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_item/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_invoice_payment/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_invoice_supplier_payment/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | *.egg-info 4 | *.swp 5 | tags 6 | travel_agency/docs/current -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Travel Agency 2 | 3 | ERPNext Module for Travel Agents 4 | 5 | #### License 6 | 7 | MIT -------------------------------------------------------------------------------- /travel_agency/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | __version__ = '0.0.1' 5 | 6 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airlines/airlines.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, Element Labs and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Airlines', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airports/airports.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, Element Labs and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Airports', { 5 | refresh: function(frm) { 6 | 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airlines/test_airlines.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestAirlines(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airports/test_airports.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestAirports(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_settings/test_travel_settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestTravelSettings(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/config/desktop.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from frappe import _ 4 | 5 | def get_data(): 6 | return [ 7 | { 8 | "module_name": "Travel Agency", 9 | "color": "blue", 10 | "icon": "fa fa-plane", 11 | "type": "module", 12 | "label": _("Travel Agency") 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_invoice/test_travel_sales_invoice.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs and Contributors 3 | # See license.txt 4 | from __future__ import unicode_literals 5 | 6 | import frappe 7 | import unittest 8 | 9 | class TestTravelSalesInvoice(unittest.TestCase): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airlines/airlines.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 Airlines(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airports/airports.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 Airports(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/via_table/via_table.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 ViaTable(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_settings/travel_settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 TravelSettings(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_item/travel_sales_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 TravelSalesItem(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_invoice_payment/travel_invoice_payment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 TravelInvoicePayment(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/config/docs.py: -------------------------------------------------------------------------------- 1 | """ 2 | Configuration for docs 3 | """ 4 | 5 | # source_link = "https://github.com/[org_name]/travel_agency" 6 | # docs_base_url = "https://[org_name].github.io/travel_agency" 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 = "Travel Agency" 12 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_invoice_supplier_payment/travel_invoice_supplier_payment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 TravelInvoiceSupplierPayment(Document): 10 | pass 11 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airlines/test_airlines.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: Airlines", 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 Airlines 13 | () => frappe.tests.make('Airlines', [ 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 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airports/test_airports.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: Airports", 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 Airports 13 | () => frappe.tests.make('Airports', [ 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 | -------------------------------------------------------------------------------- /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 travel_agency *.css 8 | recursive-include travel_agency *.csv 9 | recursive-include travel_agency *.html 10 | recursive-include travel_agency *.ico 11 | recursive-include travel_agency *.js 12 | recursive-include travel_agency *.json 13 | recursive-include travel_agency *.md 14 | recursive-include travel_agency *.png 15 | recursive-include travel_agency *.py 16 | recursive-include travel_agency *.svg 17 | recursive-include travel_agency *.txt 18 | recursive-exclude travel_agency *.pyc -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_settings/test_travel_settings.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: Travel Settings", 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 Travel Settings 13 | () => frappe.tests.make('Travel Settings', [ 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 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_invoice/test_travel_sales_invoice.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: Travel Sales Invoice", 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 Travel Sales Invoice 13 | () => frappe.tests.make('Travel Sales Invoice', [ 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 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from setuptools import setup, find_packages 3 | import re, ast 4 | 5 | with open('requirements.txt') as f: 6 | install_requires = f.read().strip().split('\n') 7 | 8 | # get version from __version__ variable in travel_agency/__init__.py 9 | _version_re = re.compile(r'__version__\s+=\s+(.*)') 10 | 11 | with open('travel_agency/__init__.py', 'rb') as f: 12 | version = str(ast.literal_eval(_version_re.search( 13 | f.read().decode('utf-8')).group(1))) 14 | 15 | setup( 16 | name='travel_agency', 17 | version=version, 18 | description='ERPNext Module for Travel Agents', 19 | author='Element Labs', 20 | author_email='saeed@elementlabs.xyz', 21 | packages=find_packages(), 22 | zip_safe=False, 23 | include_package_data=True, 24 | install_requires=install_requires 25 | ) 26 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_settings/travel_settings.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, Element Labs and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Travel Settings', { 5 | refresh: function(frm) { 6 | 7 | }, 8 | onload: function(frm){ 9 | frm.set_query("income_account",function(){ 10 | return { 11 | "filters":{ 12 | "account_type":"Income Account", 13 | "is_group":0 14 | } 15 | } 16 | }); 17 | frm.set_query("debit_to",function(){ 18 | return { 19 | "filters":{ 20 | "account_type":"Receivable" 21 | } 22 | } 23 | }); 24 | frm.set_query("cost_center",function(){ 25 | return { 26 | "filters":{ 27 | "is_group": 0 28 | } 29 | } 30 | }); 31 | frm.set_query("credit_to",function(){ 32 | return { 33 | "filters":{ 34 | "account_type":"Payable", 35 | "is_group":0 36 | } 37 | } 38 | }); 39 | frm.set_query("cost_account",function(){ 40 | return { 41 | "filters":{ 42 | "account_type":"Cost of Goods Sold" 43 | } 44 | } 45 | }); 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /sftp-config.json: -------------------------------------------------------------------------------- 1 | { 2 | // The tab key will cycle through the settings when first created 3 | // Visit http://wbond.net/sublime_packages/sftp/settings for help 4 | 5 | // sftp, ftp or ftps 6 | "type": "sftp", 7 | 8 | "save_before_upload": true, 9 | "upload_on_save": true, 10 | "sync_down_on_open": false, 11 | "sync_skip_deletes": false, 12 | "sync_same_age": true, 13 | "confirm_downloads": false, 14 | "confirm_sync": true, 15 | "confirm_overwrite_newer": false, 16 | 17 | "host": "localhost", 18 | "user": "frappe", 19 | "password": "frappe", 20 | "port": "3022", 21 | 22 | "remote_path": "/home/frappe/frappe-bench/apps/travel_agency", 23 | "ignore_regexes": [ 24 | "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json", 25 | "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/", 26 | "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini" 27 | ], 28 | //"file_permissions": "664", 29 | //"dir_permissions": "775", 30 | 31 | //"extra_list_connections": 0, 32 | 33 | "connect_timeout": 30, 34 | //"keepalive": 120, 35 | //"ftp_passive_mode": true, 36 | //"ftp_obey_passive_host": false, 37 | //"ssh_key_file": "~/.ssh/id_rsa", 38 | //"sftp_flags": ["-F", "/path/to/ssh_config"], 39 | 40 | //"preserve_modification_times": false, 41 | //"remote_time_offset_in_hours": 0, 42 | //"remote_encoding": "utf-8", 43 | //"remote_locale": "C", 44 | //"allow_config_upload": false, 45 | } 46 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/via_table/via_table.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": "2018-08-20 17:39:47.542333", 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_in_quick_entry": 0, 18 | "allow_on_submit": 0, 19 | "bold": 0, 20 | "collapsible": 0, 21 | "columns": 0, 22 | "fieldname": "via", 23 | "fieldtype": "Link", 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": 1, 30 | "in_standard_filter": 0, 31 | "label": "Via", 32 | "length": 0, 33 | "no_copy": 0, 34 | "options": "Airports", 35 | "permlevel": 0, 36 | "precision": "", 37 | "print_hide": 0, 38 | "print_hide_if_no_value": 0, 39 | "read_only": 0, 40 | "remember_last_selected_value": 0, 41 | "report_hide": 0, 42 | "reqd": 1, 43 | "search_index": 0, 44 | "set_only_once": 0, 45 | "translatable": 0, 46 | "unique": 0 47 | } 48 | ], 49 | "has_web_view": 0, 50 | "hide_heading": 0, 51 | "hide_toolbar": 0, 52 | "idx": 0, 53 | "image_view": 0, 54 | "in_create": 0, 55 | "is_submittable": 0, 56 | "issingle": 0, 57 | "istable": 1, 58 | "max_attachments": 0, 59 | "modified": "2018-08-20 17:39:47.542333", 60 | "modified_by": "Administrator", 61 | "module": "Travel Agency", 62 | "name": "Via Table", 63 | "name_case": "", 64 | "owner": "Administrator", 65 | "permissions": [], 66 | "quick_entry": 1, 67 | "read_only": 0, 68 | "read_only_onload": 0, 69 | "show_name_in_global_search": 0, 70 | "sort_field": "modified", 71 | "sort_order": "DESC", 72 | "track_changes": 1, 73 | "track_seen": 0, 74 | "track_views": 0 75 | } -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_invoice_payment/travel_invoice_payment.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": "2018-08-16 17:33:24.774909", 8 | "custom": 0, 9 | "docstatus": 0, 10 | "doctype": "DocType", 11 | "document_type": "Document", 12 | "editable_grid": 1, 13 | "engine": "InnoDB", 14 | "fields": [ 15 | { 16 | "allow_bulk_edit": 0, 17 | "allow_in_quick_entry": 0, 18 | "allow_on_submit": 0, 19 | "bold": 0, 20 | "collapsible": 0, 21 | "columns": 0, 22 | "fieldname": "payment_account", 23 | "fieldtype": "Link", 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": 1, 30 | "in_standard_filter": 0, 31 | "label": "Mode Of Payment", 32 | "length": 0, 33 | "no_copy": 0, 34 | "options": "Account", 35 | "permlevel": 0, 36 | "precision": "", 37 | "print_hide": 0, 38 | "print_hide_if_no_value": 0, 39 | "read_only": 0, 40 | "remember_last_selected_value": 0, 41 | "report_hide": 0, 42 | "reqd": 1, 43 | "search_index": 0, 44 | "set_only_once": 0, 45 | "translatable": 0, 46 | "unique": 0 47 | }, 48 | { 49 | "allow_bulk_edit": 0, 50 | "allow_in_quick_entry": 0, 51 | "allow_on_submit": 0, 52 | "bold": 0, 53 | "collapsible": 0, 54 | "columns": 0, 55 | "fieldname": "amount", 56 | "fieldtype": "Currency", 57 | "hidden": 0, 58 | "ignore_user_permissions": 0, 59 | "ignore_xss_filter": 0, 60 | "in_filter": 0, 61 | "in_global_search": 0, 62 | "in_list_view": 1, 63 | "in_standard_filter": 0, 64 | "label": "Amount", 65 | "length": 0, 66 | "no_copy": 0, 67 | "permlevel": 0, 68 | "precision": "", 69 | "print_hide": 0, 70 | "print_hide_if_no_value": 0, 71 | "read_only": 0, 72 | "remember_last_selected_value": 0, 73 | "report_hide": 0, 74 | "reqd": 1, 75 | "search_index": 0, 76 | "set_only_once": 0, 77 | "translatable": 0, 78 | "unique": 0 79 | } 80 | ], 81 | "has_web_view": 0, 82 | "hide_heading": 0, 83 | "hide_toolbar": 0, 84 | "idx": 0, 85 | "image_view": 0, 86 | "in_create": 0, 87 | "is_submittable": 0, 88 | "issingle": 0, 89 | "istable": 1, 90 | "max_attachments": 0, 91 | "modified": "2018-08-18 12:28:59.121325", 92 | "modified_by": "Administrator", 93 | "module": "Travel Agency", 94 | "name": "Travel Invoice Payment", 95 | "name_case": "", 96 | "owner": "Administrator", 97 | "permissions": [], 98 | "quick_entry": 1, 99 | "read_only": 0, 100 | "read_only_onload": 0, 101 | "show_name_in_global_search": 0, 102 | "sort_field": "modified", 103 | "sort_order": "DESC", 104 | "track_changes": 1, 105 | "track_seen": 0, 106 | "track_views": 0 107 | } -------------------------------------------------------------------------------- /travel_agency/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from . import __version__ as app_version 4 | 5 | app_name = "travel_agency" 6 | app_title = "Travel Agency" 7 | app_publisher = "Element Labs" 8 | app_description = "ERPNext Module for Travel Agents" 9 | app_icon = "fa fa-plane" 10 | app_color = "blue" 11 | app_email = "saeed@elementlabs.xyz" 12 | app_license = "MIT" 13 | 14 | # Includes in 15 | # ------------------ 16 | 17 | # include js, css files in header of desk.html 18 | # app_include_css = "/assets/travel_agency/css/travel_agency.css" 19 | # app_include_js = "/assets/travel_agency/js/travel_agency.js" 20 | 21 | # include js, css files in header of web template 22 | # web_include_css = "/assets/travel_agency/css/travel_agency.css" 23 | # web_include_js = "/assets/travel_agency/js/travel_agency.js" 24 | 25 | # include js in page 26 | # page_js = {"page" : "public/js/file.js"} 27 | 28 | # include js in doctype views 29 | # doctype_js = {"doctype" : "public/js/doctype.js"} 30 | # doctype_list_js = {"doctype" : "public/js/doctype_list.js"} 31 | # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} 32 | # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} 33 | 34 | # Home Pages 35 | # ---------- 36 | 37 | # application home page (will override Website Settings) 38 | # home_page = "login" 39 | 40 | # website user home page (by Role) 41 | # role_home_page = { 42 | # "Role": "home_page" 43 | # } 44 | 45 | # Website user home page (by function) 46 | # get_website_user_home_page = "travel_agency.utils.get_home_page" 47 | 48 | # Generators 49 | # ---------- 50 | 51 | # automatically create page for each record of this doctype 52 | # website_generators = ["Web Page"] 53 | 54 | # Installation 55 | # ------------ 56 | 57 | # before_install = "travel_agency.install.before_install" 58 | # after_install = "travel_agency.install.after_install" 59 | 60 | # Desk Notifications 61 | # ------------------ 62 | # See frappe.core.notifications.get_notification_config 63 | 64 | # notification_config = "travel_agency.notifications.get_notification_config" 65 | 66 | # Permissions 67 | # ----------- 68 | # Permissions evaluated in scripted ways 69 | 70 | # permission_query_conditions = { 71 | # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", 72 | # } 73 | # 74 | # has_permission = { 75 | # "Event": "frappe.desk.doctype.event.event.has_permission", 76 | # } 77 | 78 | # Document Events 79 | # --------------- 80 | # Hook on document methods and events 81 | 82 | # doc_events = { 83 | # "*": { 84 | # "on_update": "method", 85 | # "on_cancel": "method", 86 | # "on_trash": "method" 87 | # } 88 | # } 89 | 90 | # Scheduled Tasks 91 | # --------------- 92 | 93 | # scheduler_events = { 94 | # "all": [ 95 | # "travel_agency.tasks.all" 96 | # ], 97 | # "daily": [ 98 | # "travel_agency.tasks.daily" 99 | # ], 100 | # "hourly": [ 101 | # "travel_agency.tasks.hourly" 102 | # ], 103 | # "weekly": [ 104 | # "travel_agency.tasks.weekly" 105 | # ] 106 | # "monthly": [ 107 | # "travel_agency.tasks.monthly" 108 | # ] 109 | # } 110 | 111 | # Testing 112 | # ------- 113 | 114 | # before_tests = "travel_agency.install.before_tests" 115 | 116 | # Overriding Whitelisted Methods 117 | # ------------------------------ 118 | # 119 | # override_whitelisted_methods = { 120 | # "frappe.desk.doctype.event.event.get_events": "travel_agency.event.get_events" 121 | # } 122 | 123 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_invoice_supplier_payment/travel_invoice_supplier_payment.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": "2018-08-27 18:37:22.245028", 8 | "custom": 0, 9 | "docstatus": 0, 10 | "doctype": "DocType", 11 | "document_type": "Document", 12 | "editable_grid": 1, 13 | "engine": "InnoDB", 14 | "fields": [ 15 | { 16 | "allow_bulk_edit": 0, 17 | "allow_in_quick_entry": 0, 18 | "allow_on_submit": 0, 19 | "bold": 0, 20 | "collapsible": 0, 21 | "columns": 0, 22 | "fieldname": "supplier", 23 | "fieldtype": "Link", 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": 1, 30 | "in_standard_filter": 0, 31 | "label": "Supplier", 32 | "length": 0, 33 | "no_copy": 0, 34 | "options": "Supplier", 35 | "permlevel": 0, 36 | "precision": "", 37 | "print_hide": 0, 38 | "print_hide_if_no_value": 0, 39 | "read_only": 0, 40 | "remember_last_selected_value": 0, 41 | "report_hide": 0, 42 | "reqd": 1, 43 | "search_index": 0, 44 | "set_only_once": 0, 45 | "translatable": 0, 46 | "unique": 0 47 | }, 48 | { 49 | "allow_bulk_edit": 0, 50 | "allow_in_quick_entry": 0, 51 | "allow_on_submit": 0, 52 | "bold": 0, 53 | "collapsible": 0, 54 | "columns": 0, 55 | "fieldname": "payment_account", 56 | "fieldtype": "Link", 57 | "hidden": 0, 58 | "ignore_user_permissions": 0, 59 | "ignore_xss_filter": 0, 60 | "in_filter": 0, 61 | "in_global_search": 0, 62 | "in_list_view": 1, 63 | "in_standard_filter": 0, 64 | "label": "Mode Of Payment", 65 | "length": 0, 66 | "no_copy": 0, 67 | "options": "Account", 68 | "permlevel": 0, 69 | "precision": "", 70 | "print_hide": 0, 71 | "print_hide_if_no_value": 0, 72 | "read_only": 0, 73 | "remember_last_selected_value": 0, 74 | "report_hide": 0, 75 | "reqd": 1, 76 | "search_index": 0, 77 | "set_only_once": 0, 78 | "translatable": 0, 79 | "unique": 0 80 | }, 81 | { 82 | "allow_bulk_edit": 0, 83 | "allow_in_quick_entry": 0, 84 | "allow_on_submit": 0, 85 | "bold": 0, 86 | "collapsible": 0, 87 | "columns": 0, 88 | "fieldname": "amount", 89 | "fieldtype": "Currency", 90 | "hidden": 0, 91 | "ignore_user_permissions": 0, 92 | "ignore_xss_filter": 0, 93 | "in_filter": 0, 94 | "in_global_search": 0, 95 | "in_list_view": 1, 96 | "in_standard_filter": 0, 97 | "label": "Amount", 98 | "length": 0, 99 | "no_copy": 0, 100 | "permlevel": 0, 101 | "precision": "", 102 | "print_hide": 0, 103 | "print_hide_if_no_value": 0, 104 | "read_only": 0, 105 | "remember_last_selected_value": 0, 106 | "report_hide": 0, 107 | "reqd": 1, 108 | "search_index": 0, 109 | "set_only_once": 0, 110 | "translatable": 0, 111 | "unique": 0 112 | } 113 | ], 114 | "has_web_view": 0, 115 | "hide_heading": 0, 116 | "hide_toolbar": 0, 117 | "idx": 0, 118 | "image_view": 0, 119 | "in_create": 0, 120 | "is_submittable": 0, 121 | "issingle": 0, 122 | "istable": 1, 123 | "max_attachments": 0, 124 | "modified": "2018-08-27 21:36:08.668190", 125 | "modified_by": "Administrator", 126 | "module": "Travel Agency", 127 | "name": "Travel Invoice Supplier Payment", 128 | "name_case": "", 129 | "owner": "Administrator", 130 | "permissions": [], 131 | "quick_entry": 1, 132 | "read_only": 0, 133 | "read_only_onload": 0, 134 | "show_name_in_global_search": 0, 135 | "sort_field": "modified", 136 | "sort_order": "DESC", 137 | "track_changes": 1, 138 | "track_seen": 0, 139 | "track_views": 0 140 | } -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_invoice/travel_sales_invoice.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 | from frappe import _ 9 | from frappe.utils import money_in_words 10 | from frappe.utils.csvutils import getlink 11 | from erpnext.controllers.accounts_controller import AccountsController 12 | from erpnext.accounts.general_ledger import delete_gl_entries 13 | 14 | class TravelSalesInvoice(AccountsController): 15 | def validate(self): 16 | for item in self.items: 17 | if not item.supplier: 18 | if self.supplier: 19 | item.supplier = self.supplier 20 | else: 21 | frappe.throw('Row number {0} is Blank. Default Supplier Not Set.'.format(item.idx)) 22 | 23 | if self.is_paid_by_customer: 24 | if not self.customer_payments: 25 | frappe.throw('Customer Payments Table is Empty') 26 | 27 | if self.is_paid_supplier: 28 | if not self.supplier_payments: 29 | frappe.throw('Supplier Payments Table is Empty') 30 | 31 | def on_submit(self): 32 | gl_entries = [] 33 | settings = frappe.get_single('Travel Settings') 34 | #customer gl entries 35 | gl_entries.append({ 36 | "account": settings.debit_to, 37 | "party": self.customer, 38 | "party_type": "Customer", 39 | "debit": self.total_amount, 40 | "debit_in_account_currency": self.total_amount 41 | }) 42 | 43 | gl_entries.append({ 44 | "account": settings.income_account, 45 | "credit": self.total_amount, 46 | "credit_in_account_currency": self.total_amount, 47 | "cost_center": settings.cost_center 48 | }) 49 | 50 | for item in self.items: 51 | gl_entries.append({ 52 | "account": settings.credit_to, 53 | "party": item.supplier, 54 | "party_type": "Supplier", 55 | "credit": item.cost_amount, 56 | "credit_in_account_currency": item.cost_amount 57 | }) 58 | gl_entries.append({ 59 | "account": settings.cost_account, 60 | "debit": item.cost_amount, 61 | "debit_in_account_currency": item.cost_amount, 62 | "cost_center": settings.cost_center 63 | }) 64 | 65 | if self.is_paid_by_customer: 66 | for item in self.customer_payments: 67 | gl_entries.append({ 68 | "account": item.payment_account, 69 | "debit": item.amount, 70 | "debit_in_account_currency": item.amount 71 | }) 72 | 73 | gl_entries.append({ 74 | "account": settings.debit_to, 75 | "party": self.customer, 76 | "party_type": "Customer", 77 | "credit": item.amount, 78 | "credit_in_account_currency": item.amount 79 | }) 80 | 81 | 82 | if self.is_paid_supplier: 83 | for item in self.supplier_payments: 84 | gl_entries.append({ 85 | "account": item.payment_account, 86 | "credit": item.amount, 87 | "credit_in_account_currency": item.amount 88 | }) 89 | 90 | gl_entries.append({ 91 | "account": settings.credit_to, 92 | "party": item.supplier, 93 | "party_type": "Supplier", 94 | "debit": item.amount, 95 | "debit_in_account_currency": item.amount 96 | }) 97 | 98 | doc = frappe.get_doc({ 99 | "doctype": "Journal Entry", 100 | "company": self.company, 101 | "posting_date": self.posting_date, 102 | "voucher_type": "Journal Entry", 103 | "accounts" : gl_entries, 104 | "docstatus": 1 105 | }) 106 | jv = doc.insert() 107 | self.journal_entry = jv.name 108 | self.save() 109 | 110 | def on_cancel(self): 111 | jv = frappe.get_doc("Journal Entry", self.journal_entry) 112 | jv.docstatus = 2 113 | jv.save() 114 | 115 | self.journal_entry = "" 116 | self.save() -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airlines/airlines.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_copy": 0, 3 | "allow_guest_to_view": 0, 4 | "allow_import": 1, 5 | "allow_rename": 0, 6 | "autoname": "field:airlines_code", 7 | "beta": 0, 8 | "creation": "2018-08-19 18:51:18.578824", 9 | "custom": 0, 10 | "docstatus": 0, 11 | "doctype": "DocType", 12 | "document_type": "Setup", 13 | "editable_grid": 1, 14 | "engine": "InnoDB", 15 | "fields": [ 16 | { 17 | "allow_bulk_edit": 0, 18 | "allow_in_quick_entry": 0, 19 | "allow_on_submit": 0, 20 | "bold": 0, 21 | "collapsible": 0, 22 | "columns": 0, 23 | "fieldname": "airlines_code", 24 | "fieldtype": "Data", 25 | "hidden": 0, 26 | "ignore_user_permissions": 0, 27 | "ignore_xss_filter": 0, 28 | "in_filter": 0, 29 | "in_global_search": 0, 30 | "in_list_view": 1, 31 | "in_standard_filter": 0, 32 | "label": "Airlines Code", 33 | "length": 0, 34 | "no_copy": 0, 35 | "permlevel": 0, 36 | "precision": "", 37 | "print_hide": 0, 38 | "print_hide_if_no_value": 0, 39 | "read_only": 0, 40 | "remember_last_selected_value": 0, 41 | "report_hide": 0, 42 | "reqd": 1, 43 | "search_index": 0, 44 | "set_only_once": 0, 45 | "translatable": 0, 46 | "unique": 1 47 | }, 48 | { 49 | "allow_bulk_edit": 0, 50 | "allow_in_quick_entry": 0, 51 | "allow_on_submit": 0, 52 | "bold": 0, 53 | "collapsible": 0, 54 | "columns": 0, 55 | "fieldname": "airlines_name", 56 | "fieldtype": "Data", 57 | "hidden": 0, 58 | "ignore_user_permissions": 0, 59 | "ignore_xss_filter": 0, 60 | "in_filter": 0, 61 | "in_global_search": 0, 62 | "in_list_view": 0, 63 | "in_standard_filter": 0, 64 | "label": "Airlines Name", 65 | "length": 0, 66 | "no_copy": 0, 67 | "permlevel": 0, 68 | "precision": "", 69 | "print_hide": 0, 70 | "print_hide_if_no_value": 0, 71 | "read_only": 0, 72 | "remember_last_selected_value": 0, 73 | "report_hide": 0, 74 | "reqd": 0, 75 | "search_index": 0, 76 | "set_only_once": 0, 77 | "translatable": 0, 78 | "unique": 0 79 | }, 80 | { 81 | "allow_bulk_edit": 0, 82 | "allow_in_quick_entry": 0, 83 | "allow_on_submit": 0, 84 | "bold": 0, 85 | "collapsible": 0, 86 | "columns": 0, 87 | "fieldname": "country", 88 | "fieldtype": "Link", 89 | "hidden": 0, 90 | "ignore_user_permissions": 0, 91 | "ignore_xss_filter": 0, 92 | "in_filter": 0, 93 | "in_global_search": 0, 94 | "in_list_view": 0, 95 | "in_standard_filter": 0, 96 | "label": "Country", 97 | "length": 0, 98 | "no_copy": 0, 99 | "options": "Country", 100 | "permlevel": 0, 101 | "precision": "", 102 | "print_hide": 0, 103 | "print_hide_if_no_value": 0, 104 | "read_only": 0, 105 | "remember_last_selected_value": 0, 106 | "report_hide": 0, 107 | "reqd": 0, 108 | "search_index": 0, 109 | "set_only_once": 0, 110 | "translatable": 0, 111 | "unique": 0 112 | } 113 | ], 114 | "has_web_view": 0, 115 | "hide_heading": 0, 116 | "hide_toolbar": 0, 117 | "idx": 0, 118 | "image_view": 0, 119 | "in_create": 0, 120 | "is_submittable": 0, 121 | "issingle": 0, 122 | "istable": 0, 123 | "max_attachments": 0, 124 | "modified": "2018-08-20 12:30:24.147949", 125 | "modified_by": "Administrator", 126 | "module": "Travel Agency", 127 | "name": "Airlines", 128 | "name_case": "UPPER CASE", 129 | "owner": "Administrator", 130 | "permissions": [ 131 | { 132 | "amend": 0, 133 | "cancel": 0, 134 | "create": 1, 135 | "delete": 1, 136 | "email": 1, 137 | "export": 0, 138 | "if_owner": 0, 139 | "import": 1, 140 | "permlevel": 0, 141 | "print": 1, 142 | "read": 1, 143 | "report": 1, 144 | "role": "System Manager", 145 | "set_user_permissions": 0, 146 | "share": 1, 147 | "submit": 0, 148 | "write": 1 149 | } 150 | ], 151 | "quick_entry": 1, 152 | "read_only": 0, 153 | "read_only_onload": 0, 154 | "show_name_in_global_search": 0, 155 | "sort_field": "modified", 156 | "sort_order": "DESC", 157 | "track_changes": 1, 158 | "track_seen": 0, 159 | "track_views": 0 160 | } -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_invoice/travel_sales_invoice.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, Element Labs and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Travel Sales Invoice', { 5 | refresh: function(frm) { 6 | 7 | }, 8 | onload: function(frm){ 9 | frm.set_query("payment_account", "customer_payments", function(doc, cdt, cdn) { 10 | return { 11 | "filters":{ 12 | "account_type":["in", ["Bank", "Cash"]], 13 | "is_group":0 14 | } 15 | } 16 | }); 17 | frm.set_query("payment_account", "supplier_payments", function(doc, cdt, cdn) { 18 | // console.log(suppliers); 19 | return { 20 | "filters":{ 21 | "account_type":["in", ["Bank", "Cash"]], 22 | "is_group":0 23 | } 24 | } 25 | }); 26 | }, 27 | customer : function(){ 28 | // var me = this; 29 | // if(this.frm.updating_party_details) return; 30 | 31 | // erpnext.utils.get_party_details(this.frm, 32 | // "erpnext.accounts.party.get_party_details", { 33 | // posting_date: this.frm.doc.posting_date, 34 | // party: this.frm.doc.customer, 35 | // party_type: "Customer", 36 | // account: this.frm.doc.debit_to, 37 | // price_list: this.frm.doc.selling_price_list, 38 | // }, function() { 39 | // me.apply_pricing_rule(); 40 | // }) 41 | }, 42 | is_paid_by_customer: function(frm){ 43 | if(frm.doc.is_paid_by_customer){ 44 | var d = frappe.model.add_child(frm.doc, "Travel Invoice Payment", "customer_payments"); 45 | d.amount = frm.doc.total_amount; 46 | refresh_field("customer_payments"); 47 | }else{ 48 | frm.clear_table("customer_payments"); 49 | } 50 | }, 51 | is_paid_supplier: function(frm){ 52 | if(frm.doc.is_paid_supplier){ 53 | var items = frm.doc.items; 54 | var data = []; 55 | for (var i = 0; i < items.length; i++) { 56 | if (items[i].supplier in data) { 57 | data[items[i].supplier] += items[i].cost_amount; 58 | }else{ 59 | data[items[i].supplier] = items[i].cost_amount; 60 | } 61 | } 62 | for(var key in data){ 63 | var d = frappe.model.add_child(frm.doc, "Travel Invoice Supplier Payment", "supplier_payments"); 64 | d.supplier = key; 65 | d.amount = data[key]; 66 | } 67 | refresh_field("supplier_payments"); 68 | }else{ 69 | frm.clear_table("supplier_payments"); 70 | } 71 | }, 72 | supplier: function(frm){ 73 | set_table_defaults(frm); 74 | } 75 | 76 | 77 | }); 78 | 79 | frappe.ui.form.on("Travel Sales Item", "qty", update_item_totals ); 80 | frappe.ui.form.on("Travel Sales Item", "cost_rate", update_item_totals ); 81 | frappe.ui.form.on("Travel Sales Item", "sales_rate", update_item_totals ); 82 | // frappe.ui.from.on("Travel Sales Item", "supplier", trigger_setquery); 83 | 84 | frappe.ui.form.on('Travel Sales Item',{ 85 | item_code: function(frm){ 86 | // console.log(frm.doc); 87 | }, 88 | items_add: function(frm,cdt,cdn){ 89 | set_table_defaults(frm); 90 | }, 91 | items_remove: function(frm,cdt,cdn){ 92 | update_grand_totals(frm); 93 | } 94 | }); 95 | 96 | 97 | 98 | function update_item_totals(frm,cdt,cdn){ 99 | 100 | var child = locals[cdt][cdn]; 101 | child.cost_amount = (child.cost_rate) * child.qty; 102 | child.sales_amount = (child.sales_rate) * child.qty; 103 | refresh_field("items"); 104 | update_grand_totals(frm); 105 | 106 | } 107 | 108 | function update_grand_totals(frm){ 109 | var total_cost = 0; 110 | var total_sales = 0; 111 | frm.doc.items.forEach(function(d) { 112 | total_cost += d.cost_amount; 113 | total_sales += d.sales_amount; 114 | }); 115 | frm.set_value('total_cost',total_cost); 116 | frm.set_value('total_amount',total_sales); 117 | trigger_setquery(frm); 118 | } 119 | 120 | function trigger_setquery(frm,cdt,cdn){ 121 | 122 | frm.set_query("supplier", "supplier_payments", function(doc, cdt, cdn) { 123 | // console.log(suppliers); 124 | var items = frm.doc.items; 125 | var suppliers = []; 126 | for (var i = 0; i < items.length; i++) { 127 | if (items[i].supplier) { 128 | suppliers.push(items[i].supplier); 129 | } 130 | } 131 | return { 132 | "filters":{ 133 | "name":["in", suppliers] 134 | } 135 | } 136 | }); 137 | } 138 | 139 | function set_table_defaults(frm){ 140 | var items = frm.doc.items; 141 | for (var i = 0; i < items.length; i++) { 142 | if(!items[i].supplier){ 143 | if (frm.doc.supplier) { 144 | items[i].supplier = frm.doc.supplier; 145 | refresh_field("items"); 146 | 147 | } 148 | } 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_invoice/travel_sales_invoice.old.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) 2018, Element Labs 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 | from frappe import _ 9 | from frappe.utils import money_in_words 10 | from frappe.utils.csvutils import getlink 11 | from erpnext.controllers.accounts_controller import AccountsController 12 | from erpnext.accounts.general_ledger import delete_gl_entries 13 | 14 | class TravelSalesInvoice(AccountsController): 15 | def validate(self): 16 | for item in self.items: 17 | if not item.supplier: 18 | if self.supplier: 19 | item.supplier = self.supplier 20 | else: 21 | frappe.throw('Row number {0} is Blank. Default Supplier Not Set.'.format(item.idx)) 22 | 23 | if self.is_paid_by_customer: 24 | if not self.customer_payments: 25 | frappe.throw('Customer Payments Table is Empty') 26 | 27 | if self.is_paid_supplier: 28 | if not self.supplier_payments: 29 | frappe.throw('Supplier Payments Table is Empty') 30 | 31 | def on_submit(self): 32 | self.make_gl_entries() 33 | 34 | def make_gl_entries(self): 35 | gl_entries = [] 36 | settings = frappe.get_single('Travel Settings') 37 | #customer gl entries 38 | gl_entries.append( 39 | self.get_gl_dict({ 40 | "account": settings.debit_to, 41 | "party_type": "Customer", 42 | "party": self.customer, 43 | "against": settings.income_account, 44 | "debit": self.total_amount, 45 | "debit_in_account_currency": self.total_amount, 46 | "voucher_no": self.name, 47 | "voucher_type": self.doctype 48 | }) 49 | ) 50 | 51 | gl_entries.append( 52 | self.get_gl_dict({ 53 | "account": settings.income_account, 54 | "against": self.customer, 55 | "credit": self.total_amount, 56 | "credit_in_account_currency": self.total_amount, 57 | "cost_center": settings.cost_center, 58 | "voucher_no": self.name, 59 | "voucher_type": self.doctype 60 | }) 61 | ) 62 | 63 | for item in self.items: 64 | gl_entries.append( 65 | self.get_gl_dict({ 66 | "account": settings.credit_to, 67 | "party_type": "Supplier", 68 | "party": item.supplier, 69 | "against": settings.cost_account, 70 | "credit": item.cost_amount, 71 | "credit_in_account_currency": item.cost_amount, 72 | "voucher_no": self.name, 73 | "voucher_type": self.doctype 74 | }) 75 | ) 76 | gl_entries.append( 77 | self.get_gl_dict({ 78 | "account": settings.cost_account, 79 | "against": item.supplier, 80 | "debit": item.cost_amount, 81 | "debit_in_account_currency": self.total_amount, 82 | "cost_center": settings.cost_center, 83 | "voucher_no": self.name, 84 | "voucher_type": self.doctype 85 | }) 86 | ) 87 | 88 | if self.is_paid_by_customer: 89 | for item in self.customer_payments: 90 | gl_entries.append( 91 | self.get_gl_dict({ 92 | "account": item.payment_account, 93 | "against": self.customer, 94 | "debit": item.amount, 95 | "debit_in_account_currency": item.amount, 96 | "voucher_type": self.doctype, 97 | "voucher_no" : self.name 98 | }) 99 | ) 100 | 101 | gl_entries.append( 102 | self.get_gl_dict({ 103 | "account": settings.debit_to, 104 | "party_type": "Customer", 105 | "party": self.customer, 106 | "against": item.payment_account, 107 | "credit": item.amount, 108 | "credit_in_account_currency": item.amount, 109 | "voucher_no": self.name, 110 | "voucher_type": self.doctype 111 | }) 112 | ) 113 | 114 | if self.is_paid_supplier: 115 | for item in self.supplier_payments: 116 | gl_entries.append( 117 | self.get_gl_dict({ 118 | "account": item.payment_account, 119 | "against": item.supplier, 120 | "credit": item.amount, 121 | "credit_in_account_currency": item.amount, 122 | "voucher_type": self.doctype, 123 | "voucher_no" : self.name 124 | }) 125 | ) 126 | gl_entries.append( 127 | self.get_gl_dict({ 128 | "account": settings.credit_to, 129 | "party_type": "Supplier", 130 | "party": item.supplier, 131 | "against": item.payment_account, 132 | "debit": item.amount, 133 | "debit_in_account_currency": item.amount, 134 | "voucher_no": self.name, 135 | "voucher_type": self.doctype 136 | }) 137 | ) 138 | 139 | from erpnext.accounts.general_ledger import make_gl_entries 140 | make_gl_entries(gl_entries, cancel=(self.docstatus == 2), 141 | update_outstanding="Yes", merge_entries=False) 142 | def on_cancel(self): 143 | delete_gl_entries(voucher_type=self.doctype, voucher_no=self.name) 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/airports/airports.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_copy": 0, 3 | "allow_guest_to_view": 0, 4 | "allow_import": 1, 5 | "allow_rename": 0, 6 | "autoname": "field:airport_code", 7 | "beta": 0, 8 | "creation": "2018-08-19 18:54:18.203608", 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_in_quick_entry": 0, 19 | "allow_on_submit": 0, 20 | "bold": 0, 21 | "collapsible": 0, 22 | "columns": 0, 23 | "fieldname": "airport_code", 24 | "fieldtype": "Data", 25 | "hidden": 0, 26 | "ignore_user_permissions": 0, 27 | "ignore_xss_filter": 0, 28 | "in_filter": 0, 29 | "in_global_search": 0, 30 | "in_list_view": 1, 31 | "in_standard_filter": 0, 32 | "label": "Airport Code", 33 | "length": 0, 34 | "no_copy": 0, 35 | "permlevel": 0, 36 | "precision": "", 37 | "print_hide": 0, 38 | "print_hide_if_no_value": 0, 39 | "read_only": 0, 40 | "remember_last_selected_value": 0, 41 | "report_hide": 0, 42 | "reqd": 1, 43 | "search_index": 0, 44 | "set_only_once": 0, 45 | "translatable": 0, 46 | "unique": 1 47 | }, 48 | { 49 | "allow_bulk_edit": 0, 50 | "allow_in_quick_entry": 0, 51 | "allow_on_submit": 0, 52 | "bold": 0, 53 | "collapsible": 0, 54 | "columns": 0, 55 | "fieldname": "airport_name", 56 | "fieldtype": "Data", 57 | "hidden": 0, 58 | "ignore_user_permissions": 0, 59 | "ignore_xss_filter": 0, 60 | "in_filter": 0, 61 | "in_global_search": 0, 62 | "in_list_view": 0, 63 | "in_standard_filter": 0, 64 | "label": "Airport Name", 65 | "length": 0, 66 | "no_copy": 0, 67 | "permlevel": 0, 68 | "precision": "", 69 | "print_hide": 0, 70 | "print_hide_if_no_value": 0, 71 | "read_only": 0, 72 | "remember_last_selected_value": 0, 73 | "report_hide": 0, 74 | "reqd": 0, 75 | "search_index": 0, 76 | "set_only_once": 0, 77 | "translatable": 0, 78 | "unique": 0 79 | }, 80 | { 81 | "allow_bulk_edit": 0, 82 | "allow_in_quick_entry": 0, 83 | "allow_on_submit": 0, 84 | "bold": 0, 85 | "collapsible": 0, 86 | "columns": 0, 87 | "fieldname": "city", 88 | "fieldtype": "Data", 89 | "hidden": 0, 90 | "ignore_user_permissions": 0, 91 | "ignore_xss_filter": 0, 92 | "in_filter": 0, 93 | "in_global_search": 0, 94 | "in_list_view": 0, 95 | "in_standard_filter": 0, 96 | "label": "City", 97 | "length": 0, 98 | "no_copy": 0, 99 | "permlevel": 0, 100 | "precision": "", 101 | "print_hide": 0, 102 | "print_hide_if_no_value": 0, 103 | "read_only": 0, 104 | "remember_last_selected_value": 0, 105 | "report_hide": 0, 106 | "reqd": 0, 107 | "search_index": 0, 108 | "set_only_once": 0, 109 | "translatable": 0, 110 | "unique": 0 111 | }, 112 | { 113 | "allow_bulk_edit": 0, 114 | "allow_in_quick_entry": 0, 115 | "allow_on_submit": 0, 116 | "bold": 0, 117 | "collapsible": 0, 118 | "columns": 0, 119 | "fieldname": "country", 120 | "fieldtype": "Link", 121 | "hidden": 0, 122 | "ignore_user_permissions": 0, 123 | "ignore_xss_filter": 0, 124 | "in_filter": 0, 125 | "in_global_search": 0, 126 | "in_list_view": 0, 127 | "in_standard_filter": 0, 128 | "label": "Country", 129 | "length": 0, 130 | "no_copy": 0, 131 | "options": "Country", 132 | "permlevel": 0, 133 | "precision": "", 134 | "print_hide": 0, 135 | "print_hide_if_no_value": 0, 136 | "read_only": 0, 137 | "remember_last_selected_value": 0, 138 | "report_hide": 0, 139 | "reqd": 0, 140 | "search_index": 0, 141 | "set_only_once": 0, 142 | "translatable": 0, 143 | "unique": 0 144 | } 145 | ], 146 | "has_web_view": 0, 147 | "hide_heading": 0, 148 | "hide_toolbar": 0, 149 | "idx": 0, 150 | "image_view": 0, 151 | "in_create": 0, 152 | "is_submittable": 0, 153 | "issingle": 0, 154 | "istable": 0, 155 | "max_attachments": 0, 156 | "modified": "2018-08-20 12:35:04.123119", 157 | "modified_by": "Administrator", 158 | "module": "Travel Agency", 159 | "name": "Airports", 160 | "name_case": "UPPER CASE", 161 | "owner": "Administrator", 162 | "permissions": [ 163 | { 164 | "amend": 0, 165 | "cancel": 0, 166 | "create": 1, 167 | "delete": 1, 168 | "email": 1, 169 | "export": 0, 170 | "if_owner": 0, 171 | "import": 1, 172 | "permlevel": 0, 173 | "print": 1, 174 | "read": 1, 175 | "report": 1, 176 | "role": "System Manager", 177 | "set_user_permissions": 0, 178 | "share": 1, 179 | "submit": 0, 180 | "write": 1 181 | } 182 | ], 183 | "quick_entry": 1, 184 | "read_only": 0, 185 | "read_only_onload": 0, 186 | "show_name_in_global_search": 0, 187 | "sort_field": "modified", 188 | "sort_order": "DESC", 189 | "track_changes": 1, 190 | "track_seen": 0, 191 | "track_views": 0 192 | } -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_settings/travel_settings.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": "2018-08-29 16:57:00.856108", 8 | "custom": 0, 9 | "docstatus": 0, 10 | "doctype": "DocType", 11 | "document_type": "Setup", 12 | "editable_grid": 1, 13 | "engine": "InnoDB", 14 | "fields": [ 15 | { 16 | "allow_bulk_edit": 0, 17 | "allow_in_quick_entry": 0, 18 | "allow_on_submit": 0, 19 | "bold": 0, 20 | "collapsible": 0, 21 | "columns": 0, 22 | "fieldname": "debit_to", 23 | "fieldtype": "Link", 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": 1, 30 | "in_standard_filter": 0, 31 | "label": "Debtor Account", 32 | "length": 0, 33 | "no_copy": 0, 34 | "options": "Account", 35 | "permlevel": 0, 36 | "precision": "", 37 | "print_hide": 0, 38 | "print_hide_if_no_value": 0, 39 | "read_only": 0, 40 | "remember_last_selected_value": 0, 41 | "report_hide": 0, 42 | "reqd": 1, 43 | "search_index": 0, 44 | "set_only_once": 0, 45 | "translatable": 0, 46 | "unique": 0 47 | }, 48 | { 49 | "allow_bulk_edit": 0, 50 | "allow_in_quick_entry": 0, 51 | "allow_on_submit": 0, 52 | "bold": 0, 53 | "collapsible": 0, 54 | "columns": 0, 55 | "fieldname": "income_account", 56 | "fieldtype": "Link", 57 | "hidden": 0, 58 | "ignore_user_permissions": 0, 59 | "ignore_xss_filter": 0, 60 | "in_filter": 0, 61 | "in_global_search": 0, 62 | "in_list_view": 1, 63 | "in_standard_filter": 0, 64 | "label": "Sales/Income Account", 65 | "length": 0, 66 | "no_copy": 0, 67 | "options": "Account", 68 | "permlevel": 0, 69 | "precision": "", 70 | "print_hide": 0, 71 | "print_hide_if_no_value": 0, 72 | "read_only": 0, 73 | "remember_last_selected_value": 0, 74 | "report_hide": 0, 75 | "reqd": 1, 76 | "search_index": 0, 77 | "set_only_once": 0, 78 | "translatable": 0, 79 | "unique": 0 80 | }, 81 | { 82 | "allow_bulk_edit": 0, 83 | "allow_in_quick_entry": 0, 84 | "allow_on_submit": 0, 85 | "bold": 0, 86 | "collapsible": 0, 87 | "columns": 0, 88 | "fieldname": "credit_to", 89 | "fieldtype": "Link", 90 | "hidden": 0, 91 | "ignore_user_permissions": 0, 92 | "ignore_xss_filter": 0, 93 | "in_filter": 0, 94 | "in_global_search": 0, 95 | "in_list_view": 1, 96 | "in_standard_filter": 0, 97 | "label": "Creditor Account", 98 | "length": 0, 99 | "no_copy": 0, 100 | "options": "Account", 101 | "permlevel": 0, 102 | "precision": "", 103 | "print_hide": 0, 104 | "print_hide_if_no_value": 0, 105 | "read_only": 0, 106 | "remember_last_selected_value": 0, 107 | "report_hide": 0, 108 | "reqd": 1, 109 | "search_index": 0, 110 | "set_only_once": 0, 111 | "translatable": 0, 112 | "unique": 0 113 | }, 114 | { 115 | "allow_bulk_edit": 0, 116 | "allow_in_quick_entry": 0, 117 | "allow_on_submit": 0, 118 | "bold": 0, 119 | "collapsible": 0, 120 | "columns": 0, 121 | "fieldname": "cost_account", 122 | "fieldtype": "Link", 123 | "hidden": 0, 124 | "ignore_user_permissions": 0, 125 | "ignore_xss_filter": 0, 126 | "in_filter": 0, 127 | "in_global_search": 0, 128 | "in_list_view": 1, 129 | "in_standard_filter": 0, 130 | "label": "Purchase/Cost Account", 131 | "length": 0, 132 | "no_copy": 0, 133 | "options": "Account", 134 | "permlevel": 0, 135 | "precision": "", 136 | "print_hide": 0, 137 | "print_hide_if_no_value": 0, 138 | "read_only": 0, 139 | "remember_last_selected_value": 0, 140 | "report_hide": 0, 141 | "reqd": 1, 142 | "search_index": 0, 143 | "set_only_once": 0, 144 | "translatable": 0, 145 | "unique": 0 146 | }, 147 | { 148 | "allow_bulk_edit": 0, 149 | "allow_in_quick_entry": 0, 150 | "allow_on_submit": 0, 151 | "bold": 0, 152 | "collapsible": 0, 153 | "columns": 0, 154 | "fieldname": "cost_center", 155 | "fieldtype": "Link", 156 | "hidden": 0, 157 | "ignore_user_permissions": 0, 158 | "ignore_xss_filter": 0, 159 | "in_filter": 0, 160 | "in_global_search": 0, 161 | "in_list_view": 0, 162 | "in_standard_filter": 0, 163 | "label": "Cost Center", 164 | "length": 0, 165 | "no_copy": 0, 166 | "options": "Cost Center", 167 | "permlevel": 0, 168 | "precision": "", 169 | "print_hide": 0, 170 | "print_hide_if_no_value": 0, 171 | "read_only": 0, 172 | "remember_last_selected_value": 0, 173 | "report_hide": 0, 174 | "reqd": 1, 175 | "search_index": 0, 176 | "set_only_once": 0, 177 | "translatable": 0, 178 | "unique": 0 179 | } 180 | ], 181 | "has_web_view": 0, 182 | "hide_heading": 0, 183 | "hide_toolbar": 0, 184 | "idx": 0, 185 | "image_view": 0, 186 | "in_create": 0, 187 | "is_submittable": 0, 188 | "issingle": 1, 189 | "istable": 0, 190 | "max_attachments": 0, 191 | "modified": "2018-08-29 17:07:14.720335", 192 | "modified_by": "Administrator", 193 | "module": "Travel Agency", 194 | "name": "Travel Settings", 195 | "name_case": "", 196 | "owner": "Administrator", 197 | "permissions": [ 198 | { 199 | "amend": 0, 200 | "cancel": 0, 201 | "create": 1, 202 | "delete": 0, 203 | "email": 1, 204 | "export": 0, 205 | "if_owner": 0, 206 | "import": 0, 207 | "permlevel": 0, 208 | "print": 1, 209 | "read": 1, 210 | "report": 0, 211 | "role": "System Manager", 212 | "set_user_permissions": 0, 213 | "share": 1, 214 | "submit": 0, 215 | "write": 1 216 | } 217 | ], 218 | "quick_entry": 1, 219 | "read_only": 0, 220 | "read_only_onload": 0, 221 | "show_name_in_global_search": 0, 222 | "sort_field": "modified", 223 | "sort_order": "DESC", 224 | "track_changes": 1, 225 | "track_seen": 0, 226 | "track_views": 0 227 | } -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_item/travel_sales_item.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": "2018-08-20 12:18:34.908694", 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_in_quick_entry": 0, 18 | "allow_on_submit": 0, 19 | "bold": 0, 20 | "collapsible": 0, 21 | "columns": 1, 22 | "fieldname": "passenger", 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": 1, 30 | "in_standard_filter": 0, 31 | "label": "Passenger", 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": 1, 42 | "search_index": 0, 43 | "set_only_once": 0, 44 | "translatable": 0, 45 | "unique": 0 46 | }, 47 | { 48 | "allow_bulk_edit": 0, 49 | "allow_in_quick_entry": 0, 50 | "allow_on_submit": 0, 51 | "bold": 0, 52 | "collapsible": 0, 53 | "columns": 0, 54 | "fieldname": "item_code", 55 | "fieldtype": "Link", 56 | "hidden": 0, 57 | "ignore_user_permissions": 0, 58 | "ignore_xss_filter": 0, 59 | "in_filter": 0, 60 | "in_global_search": 0, 61 | "in_list_view": 1, 62 | "in_standard_filter": 0, 63 | "label": "Item", 64 | "length": 0, 65 | "no_copy": 0, 66 | "options": "Item", 67 | "permlevel": 0, 68 | "precision": "", 69 | "print_hide": 0, 70 | "print_hide_if_no_value": 0, 71 | "read_only": 0, 72 | "remember_last_selected_value": 0, 73 | "report_hide": 0, 74 | "reqd": 1, 75 | "search_index": 0, 76 | "set_only_once": 0, 77 | "translatable": 0, 78 | "unique": 0 79 | }, 80 | { 81 | "allow_bulk_edit": 0, 82 | "allow_in_quick_entry": 0, 83 | "allow_on_submit": 0, 84 | "bold": 0, 85 | "collapsible": 0, 86 | "columns": 1, 87 | "fieldname": "ticket_number", 88 | "fieldtype": "Data", 89 | "hidden": 0, 90 | "ignore_user_permissions": 0, 91 | "ignore_xss_filter": 0, 92 | "in_filter": 0, 93 | "in_global_search": 0, 94 | "in_list_view": 1, 95 | "in_standard_filter": 0, 96 | "label": "Ticket Number", 97 | "length": 0, 98 | "no_copy": 0, 99 | "permlevel": 0, 100 | "precision": "", 101 | "print_hide": 0, 102 | "print_hide_if_no_value": 0, 103 | "read_only": 0, 104 | "remember_last_selected_value": 0, 105 | "report_hide": 0, 106 | "reqd": 0, 107 | "search_index": 0, 108 | "set_only_once": 0, 109 | "translatable": 0, 110 | "unique": 0 111 | }, 112 | { 113 | "allow_bulk_edit": 0, 114 | "allow_in_quick_entry": 0, 115 | "allow_on_submit": 0, 116 | "bold": 0, 117 | "collapsible": 0, 118 | "columns": 0, 119 | "fieldname": "airline_code", 120 | "fieldtype": "Link", 121 | "hidden": 0, 122 | "ignore_user_permissions": 0, 123 | "ignore_xss_filter": 0, 124 | "in_filter": 0, 125 | "in_global_search": 0, 126 | "in_list_view": 1, 127 | "in_standard_filter": 0, 128 | "label": "Airline", 129 | "length": 0, 130 | "no_copy": 0, 131 | "options": "Airlines", 132 | "permlevel": 0, 133 | "precision": "", 134 | "print_hide": 0, 135 | "print_hide_if_no_value": 0, 136 | "read_only": 0, 137 | "remember_last_selected_value": 0, 138 | "report_hide": 0, 139 | "reqd": 0, 140 | "search_index": 0, 141 | "set_only_once": 0, 142 | "translatable": 0, 143 | "unique": 0 144 | }, 145 | { 146 | "allow_bulk_edit": 0, 147 | "allow_in_quick_entry": 0, 148 | "allow_on_submit": 0, 149 | "bold": 0, 150 | "collapsible": 0, 151 | "columns": 0, 152 | "fieldname": "airport_from", 153 | "fieldtype": "Link", 154 | "hidden": 0, 155 | "ignore_user_permissions": 0, 156 | "ignore_xss_filter": 0, 157 | "in_filter": 0, 158 | "in_global_search": 0, 159 | "in_list_view": 1, 160 | "in_standard_filter": 0, 161 | "label": "From", 162 | "length": 0, 163 | "no_copy": 0, 164 | "options": "Airports", 165 | "permlevel": 0, 166 | "precision": "", 167 | "print_hide": 0, 168 | "print_hide_if_no_value": 0, 169 | "read_only": 0, 170 | "remember_last_selected_value": 0, 171 | "report_hide": 0, 172 | "reqd": 0, 173 | "search_index": 0, 174 | "set_only_once": 0, 175 | "translatable": 0, 176 | "unique": 0 177 | }, 178 | { 179 | "allow_bulk_edit": 0, 180 | "allow_in_quick_entry": 0, 181 | "allow_on_submit": 0, 182 | "bold": 0, 183 | "collapsible": 0, 184 | "columns": 0, 185 | "fieldname": "via_airport", 186 | "fieldtype": "Link", 187 | "hidden": 0, 188 | "ignore_user_permissions": 0, 189 | "ignore_xss_filter": 0, 190 | "in_filter": 0, 191 | "in_global_search": 0, 192 | "in_list_view": 0, 193 | "in_standard_filter": 0, 194 | "label": "Via", 195 | "length": 0, 196 | "no_copy": 0, 197 | "options": "Airports", 198 | "permlevel": 0, 199 | "precision": "", 200 | "print_hide": 0, 201 | "print_hide_if_no_value": 0, 202 | "read_only": 0, 203 | "remember_last_selected_value": 0, 204 | "report_hide": 0, 205 | "reqd": 0, 206 | "search_index": 0, 207 | "set_only_once": 0, 208 | "translatable": 0, 209 | "unique": 0 210 | }, 211 | { 212 | "allow_bulk_edit": 0, 213 | "allow_in_quick_entry": 0, 214 | "allow_on_submit": 0, 215 | "bold": 0, 216 | "collapsible": 0, 217 | "columns": 0, 218 | "fieldname": "to_airport", 219 | "fieldtype": "Link", 220 | "hidden": 0, 221 | "ignore_user_permissions": 0, 222 | "ignore_xss_filter": 0, 223 | "in_filter": 0, 224 | "in_global_search": 0, 225 | "in_list_view": 1, 226 | "in_standard_filter": 0, 227 | "label": "To", 228 | "length": 0, 229 | "no_copy": 0, 230 | "options": "Airports", 231 | "permlevel": 0, 232 | "precision": "", 233 | "print_hide": 0, 234 | "print_hide_if_no_value": 0, 235 | "read_only": 0, 236 | "remember_last_selected_value": 0, 237 | "report_hide": 0, 238 | "reqd": 0, 239 | "search_index": 0, 240 | "set_only_once": 0, 241 | "translatable": 0, 242 | "unique": 0 243 | }, 244 | { 245 | "allow_bulk_edit": 0, 246 | "allow_in_quick_entry": 0, 247 | "allow_on_submit": 0, 248 | "bold": 0, 249 | "collapsible": 0, 250 | "columns": 0, 251 | "fieldname": "travel_date", 252 | "fieldtype": "Datetime", 253 | "hidden": 0, 254 | "ignore_user_permissions": 0, 255 | "ignore_xss_filter": 0, 256 | "in_filter": 0, 257 | "in_global_search": 0, 258 | "in_list_view": 1, 259 | "in_standard_filter": 0, 260 | "label": "Date", 261 | "length": 0, 262 | "no_copy": 0, 263 | "permlevel": 0, 264 | "precision": "", 265 | "print_hide": 0, 266 | "print_hide_if_no_value": 0, 267 | "read_only": 0, 268 | "remember_last_selected_value": 0, 269 | "report_hide": 0, 270 | "reqd": 0, 271 | "search_index": 0, 272 | "set_only_once": 0, 273 | "translatable": 0, 274 | "unique": 0 275 | }, 276 | { 277 | "allow_bulk_edit": 0, 278 | "allow_in_quick_entry": 0, 279 | "allow_on_submit": 0, 280 | "bold": 0, 281 | "collapsible": 0, 282 | "columns": 0, 283 | "default": "1", 284 | "fieldname": "qty", 285 | "fieldtype": "Float", 286 | "hidden": 0, 287 | "ignore_user_permissions": 0, 288 | "ignore_xss_filter": 0, 289 | "in_filter": 0, 290 | "in_global_search": 0, 291 | "in_list_view": 1, 292 | "in_standard_filter": 0, 293 | "label": "Qty", 294 | "length": 0, 295 | "no_copy": 0, 296 | "permlevel": 0, 297 | "precision": "", 298 | "print_hide": 0, 299 | "print_hide_if_no_value": 0, 300 | "read_only": 0, 301 | "remember_last_selected_value": 0, 302 | "report_hide": 0, 303 | "reqd": 1, 304 | "search_index": 0, 305 | "set_only_once": 0, 306 | "translatable": 0, 307 | "unique": 0 308 | }, 309 | { 310 | "allow_bulk_edit": 0, 311 | "allow_in_quick_entry": 0, 312 | "allow_on_submit": 0, 313 | "bold": 0, 314 | "collapsible": 0, 315 | "columns": 0, 316 | "fieldname": "supplier", 317 | "fieldtype": "Link", 318 | "hidden": 0, 319 | "ignore_user_permissions": 0, 320 | "ignore_xss_filter": 0, 321 | "in_filter": 0, 322 | "in_global_search": 0, 323 | "in_list_view": 0, 324 | "in_standard_filter": 0, 325 | "label": "Supplier", 326 | "length": 0, 327 | "no_copy": 0, 328 | "options": "Supplier", 329 | "permlevel": 0, 330 | "precision": "", 331 | "print_hide": 0, 332 | "print_hide_if_no_value": 0, 333 | "read_only": 0, 334 | "remember_last_selected_value": 0, 335 | "report_hide": 0, 336 | "reqd": 0, 337 | "search_index": 0, 338 | "set_only_once": 0, 339 | "translatable": 0, 340 | "unique": 0 341 | }, 342 | { 343 | "allow_bulk_edit": 0, 344 | "allow_in_quick_entry": 0, 345 | "allow_on_submit": 0, 346 | "bold": 0, 347 | "collapsible": 0, 348 | "columns": 0, 349 | "default": "0", 350 | "fieldname": "cost_rate", 351 | "fieldtype": "Currency", 352 | "hidden": 0, 353 | "ignore_user_permissions": 0, 354 | "ignore_xss_filter": 0, 355 | "in_filter": 0, 356 | "in_global_search": 0, 357 | "in_list_view": 1, 358 | "in_standard_filter": 0, 359 | "label": "Cost Rate", 360 | "length": 0, 361 | "no_copy": 0, 362 | "permlevel": 0, 363 | "precision": "", 364 | "print_hide": 0, 365 | "print_hide_if_no_value": 0, 366 | "read_only": 0, 367 | "remember_last_selected_value": 0, 368 | "report_hide": 0, 369 | "reqd": 1, 370 | "search_index": 0, 371 | "set_only_once": 0, 372 | "translatable": 0, 373 | "unique": 0 374 | }, 375 | { 376 | "allow_bulk_edit": 0, 377 | "allow_in_quick_entry": 0, 378 | "allow_on_submit": 0, 379 | "bold": 0, 380 | "collapsible": 0, 381 | "columns": 0, 382 | "default": "0", 383 | "fieldname": "sales_rate", 384 | "fieldtype": "Currency", 385 | "hidden": 0, 386 | "ignore_user_permissions": 0, 387 | "ignore_xss_filter": 0, 388 | "in_filter": 0, 389 | "in_global_search": 0, 390 | "in_list_view": 1, 391 | "in_standard_filter": 0, 392 | "label": "Sales Rate", 393 | "length": 0, 394 | "no_copy": 0, 395 | "permlevel": 0, 396 | "precision": "", 397 | "print_hide": 0, 398 | "print_hide_if_no_value": 0, 399 | "read_only": 0, 400 | "remember_last_selected_value": 0, 401 | "report_hide": 0, 402 | "reqd": 1, 403 | "search_index": 0, 404 | "set_only_once": 0, 405 | "translatable": 0, 406 | "unique": 0 407 | }, 408 | { 409 | "allow_bulk_edit": 0, 410 | "allow_in_quick_entry": 0, 411 | "allow_on_submit": 0, 412 | "bold": 0, 413 | "collapsible": 0, 414 | "columns": 0, 415 | "default": "0", 416 | "fieldname": "cost_amount", 417 | "fieldtype": "Currency", 418 | "hidden": 0, 419 | "ignore_user_permissions": 0, 420 | "ignore_xss_filter": 0, 421 | "in_filter": 0, 422 | "in_global_search": 0, 423 | "in_list_view": 0, 424 | "in_standard_filter": 0, 425 | "label": "Cost Amount", 426 | "length": 0, 427 | "no_copy": 0, 428 | "permlevel": 0, 429 | "precision": "", 430 | "print_hide": 0, 431 | "print_hide_if_no_value": 0, 432 | "read_only": 1, 433 | "remember_last_selected_value": 0, 434 | "report_hide": 0, 435 | "reqd": 0, 436 | "search_index": 0, 437 | "set_only_once": 0, 438 | "translatable": 0, 439 | "unique": 0 440 | }, 441 | { 442 | "allow_bulk_edit": 0, 443 | "allow_in_quick_entry": 0, 444 | "allow_on_submit": 0, 445 | "bold": 0, 446 | "collapsible": 0, 447 | "columns": 0, 448 | "default": "0", 449 | "fieldname": "sales_amount", 450 | "fieldtype": "Currency", 451 | "hidden": 0, 452 | "ignore_user_permissions": 0, 453 | "ignore_xss_filter": 0, 454 | "in_filter": 0, 455 | "in_global_search": 0, 456 | "in_list_view": 0, 457 | "in_standard_filter": 0, 458 | "label": "Sales Amount", 459 | "length": 0, 460 | "no_copy": 0, 461 | "permlevel": 0, 462 | "precision": "", 463 | "print_hide": 0, 464 | "print_hide_if_no_value": 0, 465 | "read_only": 1, 466 | "remember_last_selected_value": 0, 467 | "report_hide": 0, 468 | "reqd": 0, 469 | "search_index": 0, 470 | "set_only_once": 0, 471 | "translatable": 0, 472 | "unique": 0 473 | } 474 | ], 475 | "has_web_view": 0, 476 | "hide_heading": 0, 477 | "hide_toolbar": 0, 478 | "idx": 0, 479 | "image_view": 0, 480 | "in_create": 0, 481 | "is_submittable": 0, 482 | "issingle": 0, 483 | "istable": 1, 484 | "max_attachments": 0, 485 | "modified": "2018-08-26 18:15:45.162884", 486 | "modified_by": "Administrator", 487 | "module": "Travel Agency", 488 | "name": "Travel Sales Item", 489 | "name_case": "", 490 | "owner": "Administrator", 491 | "permissions": [], 492 | "quick_entry": 1, 493 | "read_only": 0, 494 | "read_only_onload": 0, 495 | "show_name_in_global_search": 0, 496 | "sort_field": "modified", 497 | "sort_order": "DESC", 498 | "track_changes": 1, 499 | "track_seen": 0, 500 | "track_views": 0 501 | } -------------------------------------------------------------------------------- /travel_agency/travel_agency/doctype/travel_sales_invoice/travel_sales_invoice.json: -------------------------------------------------------------------------------- 1 | { 2 | "allow_copy": 0, 3 | "allow_guest_to_view": 0, 4 | "allow_import": 0, 5 | "allow_rename": 0, 6 | "autoname": "TRV-.#####", 7 | "beta": 0, 8 | "color": "blue", 9 | "creation": "2018-08-18 12:26:36.409390", 10 | "custom": 0, 11 | "docstatus": 0, 12 | "doctype": "DocType", 13 | "document_type": "Document", 14 | "editable_grid": 1, 15 | "engine": "InnoDB", 16 | "fields": [ 17 | { 18 | "allow_bulk_edit": 0, 19 | "allow_in_quick_entry": 0, 20 | "allow_on_submit": 0, 21 | "bold": 0, 22 | "collapsible": 0, 23 | "columns": 0, 24 | "fieldname": "supplier", 25 | "fieldtype": "Link", 26 | "hidden": 0, 27 | "ignore_user_permissions": 0, 28 | "ignore_xss_filter": 0, 29 | "in_filter": 0, 30 | "in_global_search": 0, 31 | "in_list_view": 0, 32 | "in_standard_filter": 0, 33 | "label": "Default Supplier", 34 | "length": 0, 35 | "no_copy": 0, 36 | "options": "Supplier", 37 | "permlevel": 0, 38 | "precision": "", 39 | "print_hide": 0, 40 | "print_hide_if_no_value": 0, 41 | "read_only": 0, 42 | "remember_last_selected_value": 0, 43 | "report_hide": 0, 44 | "reqd": 0, 45 | "search_index": 0, 46 | "set_only_once": 0, 47 | "translatable": 0, 48 | "unique": 0 49 | }, 50 | { 51 | "allow_bulk_edit": 0, 52 | "allow_in_quick_entry": 0, 53 | "allow_on_submit": 0, 54 | "bold": 0, 55 | "collapsible": 0, 56 | "columns": 0, 57 | "fieldname": "column_break_2", 58 | "fieldtype": "Column Break", 59 | "hidden": 0, 60 | "ignore_user_permissions": 0, 61 | "ignore_xss_filter": 0, 62 | "in_filter": 0, 63 | "in_global_search": 0, 64 | "in_list_view": 0, 65 | "in_standard_filter": 0, 66 | "length": 0, 67 | "no_copy": 0, 68 | "permlevel": 0, 69 | "precision": "", 70 | "print_hide": 0, 71 | "print_hide_if_no_value": 0, 72 | "read_only": 0, 73 | "remember_last_selected_value": 0, 74 | "report_hide": 0, 75 | "reqd": 0, 76 | "search_index": 0, 77 | "set_only_once": 0, 78 | "translatable": 0, 79 | "unique": 0 80 | }, 81 | { 82 | "allow_bulk_edit": 0, 83 | "allow_in_quick_entry": 0, 84 | "allow_on_submit": 0, 85 | "bold": 0, 86 | "collapsible": 0, 87 | "columns": 0, 88 | "fieldname": "customer", 89 | "fieldtype": "Link", 90 | "hidden": 0, 91 | "ignore_user_permissions": 0, 92 | "ignore_xss_filter": 0, 93 | "in_filter": 0, 94 | "in_global_search": 0, 95 | "in_list_view": 1, 96 | "in_standard_filter": 0, 97 | "label": "Customer", 98 | "length": 0, 99 | "no_copy": 0, 100 | "options": "Customer", 101 | "permlevel": 0, 102 | "precision": "", 103 | "print_hide": 0, 104 | "print_hide_if_no_value": 0, 105 | "read_only": 0, 106 | "remember_last_selected_value": 0, 107 | "report_hide": 0, 108 | "reqd": 1, 109 | "search_index": 0, 110 | "set_only_once": 0, 111 | "translatable": 0, 112 | "unique": 0 113 | }, 114 | { 115 | "allow_bulk_edit": 0, 116 | "allow_in_quick_entry": 0, 117 | "allow_on_submit": 0, 118 | "bold": 0, 119 | "collapsible": 0, 120 | "columns": 0, 121 | "default": "Today", 122 | "fieldname": "due_date", 123 | "fieldtype": "Date", 124 | "hidden": 0, 125 | "ignore_user_permissions": 0, 126 | "ignore_xss_filter": 0, 127 | "in_filter": 0, 128 | "in_global_search": 0, 129 | "in_list_view": 1, 130 | "in_standard_filter": 0, 131 | "label": "Due Date", 132 | "length": 0, 133 | "no_copy": 0, 134 | "permlevel": 0, 135 | "precision": "", 136 | "print_hide": 0, 137 | "print_hide_if_no_value": 0, 138 | "read_only": 0, 139 | "remember_last_selected_value": 0, 140 | "report_hide": 0, 141 | "reqd": 1, 142 | "search_index": 0, 143 | "set_only_once": 0, 144 | "translatable": 0, 145 | "unique": 0 146 | }, 147 | { 148 | "allow_bulk_edit": 0, 149 | "allow_in_quick_entry": 0, 150 | "allow_on_submit": 0, 151 | "bold": 0, 152 | "collapsible": 0, 153 | "columns": 0, 154 | "default": "Today", 155 | "fieldname": "posting_date", 156 | "fieldtype": "Date", 157 | "hidden": 0, 158 | "ignore_user_permissions": 0, 159 | "ignore_xss_filter": 0, 160 | "in_filter": 0, 161 | "in_global_search": 0, 162 | "in_list_view": 0, 163 | "in_standard_filter": 0, 164 | "label": "Posting Date", 165 | "length": 0, 166 | "no_copy": 0, 167 | "permlevel": 0, 168 | "precision": "", 169 | "print_hide": 0, 170 | "print_hide_if_no_value": 0, 171 | "read_only": 0, 172 | "remember_last_selected_value": 0, 173 | "report_hide": 0, 174 | "reqd": 1, 175 | "search_index": 0, 176 | "set_only_once": 0, 177 | "translatable": 0, 178 | "unique": 0 179 | }, 180 | { 181 | "allow_bulk_edit": 0, 182 | "allow_in_quick_entry": 0, 183 | "allow_on_submit": 0, 184 | "bold": 0, 185 | "collapsible": 0, 186 | "columns": 0, 187 | "fieldname": "section_break_5", 188 | "fieldtype": "Section Break", 189 | "hidden": 0, 190 | "ignore_user_permissions": 0, 191 | "ignore_xss_filter": 0, 192 | "in_filter": 0, 193 | "in_global_search": 0, 194 | "in_list_view": 0, 195 | "in_standard_filter": 0, 196 | "length": 0, 197 | "no_copy": 0, 198 | "permlevel": 0, 199 | "precision": "", 200 | "print_hide": 0, 201 | "print_hide_if_no_value": 0, 202 | "read_only": 0, 203 | "remember_last_selected_value": 0, 204 | "report_hide": 0, 205 | "reqd": 0, 206 | "search_index": 0, 207 | "set_only_once": 0, 208 | "translatable": 0, 209 | "unique": 0 210 | }, 211 | { 212 | "allow_bulk_edit": 0, 213 | "allow_in_quick_entry": 0, 214 | "allow_on_submit": 0, 215 | "bold": 0, 216 | "collapsible": 0, 217 | "columns": 0, 218 | "fieldname": "items", 219 | "fieldtype": "Table", 220 | "hidden": 0, 221 | "ignore_user_permissions": 0, 222 | "ignore_xss_filter": 0, 223 | "in_filter": 0, 224 | "in_global_search": 0, 225 | "in_list_view": 0, 226 | "in_standard_filter": 0, 227 | "label": "Items", 228 | "length": 0, 229 | "no_copy": 0, 230 | "options": "Travel Sales Item", 231 | "permlevel": 0, 232 | "precision": "", 233 | "print_hide": 0, 234 | "print_hide_if_no_value": 0, 235 | "read_only": 0, 236 | "remember_last_selected_value": 0, 237 | "report_hide": 0, 238 | "reqd": 1, 239 | "search_index": 0, 240 | "set_only_once": 0, 241 | "translatable": 0, 242 | "unique": 0 243 | }, 244 | { 245 | "allow_bulk_edit": 0, 246 | "allow_in_quick_entry": 0, 247 | "allow_on_submit": 0, 248 | "bold": 0, 249 | "collapsible": 0, 250 | "columns": 0, 251 | "fieldname": "totals", 252 | "fieldtype": "Section Break", 253 | "hidden": 0, 254 | "ignore_user_permissions": 0, 255 | "ignore_xss_filter": 0, 256 | "in_filter": 0, 257 | "in_global_search": 0, 258 | "in_list_view": 0, 259 | "in_standard_filter": 0, 260 | "label": "Totals", 261 | "length": 0, 262 | "no_copy": 0, 263 | "permlevel": 0, 264 | "precision": "", 265 | "print_hide": 0, 266 | "print_hide_if_no_value": 0, 267 | "read_only": 0, 268 | "remember_last_selected_value": 0, 269 | "report_hide": 0, 270 | "reqd": 0, 271 | "search_index": 0, 272 | "set_only_once": 0, 273 | "translatable": 0, 274 | "unique": 0 275 | }, 276 | { 277 | "allow_bulk_edit": 0, 278 | "allow_in_quick_entry": 0, 279 | "allow_on_submit": 0, 280 | "bold": 0, 281 | "collapsible": 0, 282 | "columns": 0, 283 | "default": "0", 284 | "fieldname": "total_cost", 285 | "fieldtype": "Currency", 286 | "hidden": 0, 287 | "ignore_user_permissions": 0, 288 | "ignore_xss_filter": 0, 289 | "in_filter": 0, 290 | "in_global_search": 0, 291 | "in_list_view": 0, 292 | "in_standard_filter": 0, 293 | "label": "Total Cost", 294 | "length": 0, 295 | "no_copy": 0, 296 | "permlevel": 0, 297 | "precision": "", 298 | "print_hide": 0, 299 | "print_hide_if_no_value": 0, 300 | "read_only": 1, 301 | "remember_last_selected_value": 0, 302 | "report_hide": 0, 303 | "reqd": 0, 304 | "search_index": 0, 305 | "set_only_once": 0, 306 | "translatable": 0, 307 | "unique": 0 308 | }, 309 | { 310 | "allow_bulk_edit": 0, 311 | "allow_in_quick_entry": 0, 312 | "allow_on_submit": 0, 313 | "bold": 0, 314 | "collapsible": 0, 315 | "columns": 0, 316 | "fieldname": "column_break_9", 317 | "fieldtype": "Column Break", 318 | "hidden": 0, 319 | "ignore_user_permissions": 0, 320 | "ignore_xss_filter": 0, 321 | "in_filter": 0, 322 | "in_global_search": 0, 323 | "in_list_view": 0, 324 | "in_standard_filter": 0, 325 | "length": 0, 326 | "no_copy": 0, 327 | "permlevel": 0, 328 | "precision": "", 329 | "print_hide": 0, 330 | "print_hide_if_no_value": 0, 331 | "read_only": 0, 332 | "remember_last_selected_value": 0, 333 | "report_hide": 0, 334 | "reqd": 0, 335 | "search_index": 0, 336 | "set_only_once": 0, 337 | "translatable": 0, 338 | "unique": 0 339 | }, 340 | { 341 | "allow_bulk_edit": 0, 342 | "allow_in_quick_entry": 0, 343 | "allow_on_submit": 0, 344 | "bold": 0, 345 | "collapsible": 0, 346 | "columns": 0, 347 | "default": "0", 348 | "fieldname": "total_amount", 349 | "fieldtype": "Currency", 350 | "hidden": 0, 351 | "ignore_user_permissions": 0, 352 | "ignore_xss_filter": 0, 353 | "in_filter": 0, 354 | "in_global_search": 0, 355 | "in_list_view": 0, 356 | "in_standard_filter": 0, 357 | "label": "Total Sales", 358 | "length": 0, 359 | "no_copy": 0, 360 | "permlevel": 0, 361 | "precision": "", 362 | "print_hide": 0, 363 | "print_hide_if_no_value": 0, 364 | "read_only": 1, 365 | "remember_last_selected_value": 0, 366 | "report_hide": 0, 367 | "reqd": 0, 368 | "search_index": 0, 369 | "set_only_once": 0, 370 | "translatable": 0, 371 | "unique": 0 372 | }, 373 | { 374 | "allow_bulk_edit": 0, 375 | "allow_in_quick_entry": 0, 376 | "allow_on_submit": 0, 377 | "bold": 0, 378 | "collapsible": 0, 379 | "columns": 0, 380 | "fieldname": "payments_to_supplier", 381 | "fieldtype": "Section Break", 382 | "hidden": 0, 383 | "ignore_user_permissions": 0, 384 | "ignore_xss_filter": 0, 385 | "in_filter": 0, 386 | "in_global_search": 0, 387 | "in_list_view": 0, 388 | "in_standard_filter": 0, 389 | "label": "Payments to Supplier", 390 | "length": 0, 391 | "no_copy": 0, 392 | "permlevel": 0, 393 | "precision": "", 394 | "print_hide": 0, 395 | "print_hide_if_no_value": 0, 396 | "read_only": 0, 397 | "remember_last_selected_value": 0, 398 | "report_hide": 0, 399 | "reqd": 0, 400 | "search_index": 0, 401 | "set_only_once": 0, 402 | "translatable": 0, 403 | "unique": 0 404 | }, 405 | { 406 | "allow_bulk_edit": 0, 407 | "allow_in_quick_entry": 0, 408 | "allow_on_submit": 0, 409 | "bold": 0, 410 | "collapsible": 0, 411 | "columns": 0, 412 | "fieldname": "is_paid_supplier", 413 | "fieldtype": "Check", 414 | "hidden": 0, 415 | "ignore_user_permissions": 0, 416 | "ignore_xss_filter": 0, 417 | "in_filter": 0, 418 | "in_global_search": 0, 419 | "in_list_view": 0, 420 | "in_standard_filter": 0, 421 | "label": "Paid To Supplier?", 422 | "length": 0, 423 | "no_copy": 0, 424 | "permlevel": 0, 425 | "precision": "", 426 | "print_hide": 0, 427 | "print_hide_if_no_value": 0, 428 | "read_only": 0, 429 | "remember_last_selected_value": 0, 430 | "report_hide": 0, 431 | "reqd": 0, 432 | "search_index": 0, 433 | "set_only_once": 0, 434 | "translatable": 0, 435 | "unique": 0 436 | }, 437 | { 438 | "allow_bulk_edit": 0, 439 | "allow_in_quick_entry": 0, 440 | "allow_on_submit": 0, 441 | "bold": 0, 442 | "collapsible": 0, 443 | "columns": 0, 444 | "depends_on": "eval:doc.is_paid_supplier==1", 445 | "fieldname": "supplier_payments", 446 | "fieldtype": "Table", 447 | "hidden": 0, 448 | "ignore_user_permissions": 0, 449 | "ignore_xss_filter": 0, 450 | "in_filter": 0, 451 | "in_global_search": 0, 452 | "in_list_view": 0, 453 | "in_standard_filter": 0, 454 | "label": "Mode of Payment", 455 | "length": 0, 456 | "no_copy": 0, 457 | "options": "Travel Invoice Supplier Payment", 458 | "permlevel": 0, 459 | "precision": "", 460 | "print_hide": 0, 461 | "print_hide_if_no_value": 0, 462 | "read_only": 0, 463 | "remember_last_selected_value": 0, 464 | "report_hide": 0, 465 | "reqd": 0, 466 | "search_index": 0, 467 | "set_only_once": 0, 468 | "translatable": 0, 469 | "unique": 0 470 | }, 471 | { 472 | "allow_bulk_edit": 0, 473 | "allow_in_quick_entry": 0, 474 | "allow_on_submit": 0, 475 | "bold": 0, 476 | "collapsible": 0, 477 | "columns": 0, 478 | "fieldname": "payments_from_customer", 479 | "fieldtype": "Section Break", 480 | "hidden": 0, 481 | "ignore_user_permissions": 0, 482 | "ignore_xss_filter": 0, 483 | "in_filter": 0, 484 | "in_global_search": 0, 485 | "in_list_view": 0, 486 | "in_standard_filter": 0, 487 | "label": "Payments from customer", 488 | "length": 0, 489 | "no_copy": 0, 490 | "permlevel": 0, 491 | "precision": "", 492 | "print_hide": 0, 493 | "print_hide_if_no_value": 0, 494 | "read_only": 0, 495 | "remember_last_selected_value": 0, 496 | "report_hide": 0, 497 | "reqd": 0, 498 | "search_index": 0, 499 | "set_only_once": 0, 500 | "translatable": 0, 501 | "unique": 0 502 | }, 503 | { 504 | "allow_bulk_edit": 0, 505 | "allow_in_quick_entry": 0, 506 | "allow_on_submit": 0, 507 | "bold": 0, 508 | "collapsible": 0, 509 | "columns": 0, 510 | "depends_on": "", 511 | "fieldname": "is_paid_by_customer", 512 | "fieldtype": "Check", 513 | "hidden": 0, 514 | "ignore_user_permissions": 0, 515 | "ignore_xss_filter": 0, 516 | "in_filter": 0, 517 | "in_global_search": 0, 518 | "in_list_view": 0, 519 | "in_standard_filter": 0, 520 | "label": "Customer Paid?", 521 | "length": 0, 522 | "no_copy": 0, 523 | "permlevel": 0, 524 | "precision": "", 525 | "print_hide": 0, 526 | "print_hide_if_no_value": 0, 527 | "read_only": 0, 528 | "remember_last_selected_value": 0, 529 | "report_hide": 0, 530 | "reqd": 0, 531 | "search_index": 0, 532 | "set_only_once": 0, 533 | "translatable": 0, 534 | "unique": 0 535 | }, 536 | { 537 | "allow_bulk_edit": 0, 538 | "allow_in_quick_entry": 0, 539 | "allow_on_submit": 0, 540 | "bold": 0, 541 | "collapsible": 0, 542 | "columns": 0, 543 | "depends_on": "eval:doc.is_paid_by_customer==1", 544 | "fieldname": "customer_payments", 545 | "fieldtype": "Table", 546 | "hidden": 0, 547 | "ignore_user_permissions": 0, 548 | "ignore_xss_filter": 0, 549 | "in_filter": 0, 550 | "in_global_search": 0, 551 | "in_list_view": 0, 552 | "in_standard_filter": 0, 553 | "label": "Mode Of Payment", 554 | "length": 0, 555 | "no_copy": 0, 556 | "options": "Travel Invoice Payment", 557 | "permlevel": 0, 558 | "precision": "", 559 | "print_hide": 0, 560 | "print_hide_if_no_value": 0, 561 | "read_only": 0, 562 | "remember_last_selected_value": 0, 563 | "report_hide": 0, 564 | "reqd": 0, 565 | "search_index": 0, 566 | "set_only_once": 0, 567 | "translatable": 0, 568 | "unique": 0 569 | }, 570 | { 571 | "allow_bulk_edit": 0, 572 | "allow_in_quick_entry": 0, 573 | "allow_on_submit": 0, 574 | "bold": 0, 575 | "collapsible": 0, 576 | "columns": 0, 577 | "fieldname": "accounting_details", 578 | "fieldtype": "Section Break", 579 | "hidden": 0, 580 | "ignore_user_permissions": 0, 581 | "ignore_xss_filter": 0, 582 | "in_filter": 0, 583 | "in_global_search": 0, 584 | "in_list_view": 0, 585 | "in_standard_filter": 0, 586 | "label": "Accounting Details", 587 | "length": 0, 588 | "no_copy": 0, 589 | "permlevel": 0, 590 | "precision": "", 591 | "print_hide": 0, 592 | "print_hide_if_no_value": 0, 593 | "read_only": 0, 594 | "remember_last_selected_value": 0, 595 | "report_hide": 0, 596 | "reqd": 0, 597 | "search_index": 0, 598 | "set_only_once": 0, 599 | "translatable": 0, 600 | "unique": 0 601 | }, 602 | { 603 | "allow_bulk_edit": 0, 604 | "allow_in_quick_entry": 0, 605 | "allow_on_submit": 0, 606 | "bold": 0, 607 | "collapsible": 0, 608 | "columns": 0, 609 | "fieldname": "company", 610 | "fieldtype": "Link", 611 | "hidden": 0, 612 | "ignore_user_permissions": 0, 613 | "ignore_xss_filter": 0, 614 | "in_filter": 0, 615 | "in_global_search": 0, 616 | "in_list_view": 0, 617 | "in_standard_filter": 0, 618 | "label": "Company", 619 | "length": 0, 620 | "no_copy": 0, 621 | "options": "Company", 622 | "permlevel": 0, 623 | "precision": "", 624 | "print_hide": 0, 625 | "print_hide_if_no_value": 0, 626 | "read_only": 0, 627 | "remember_last_selected_value": 0, 628 | "report_hide": 0, 629 | "reqd": 1, 630 | "search_index": 0, 631 | "set_only_once": 0, 632 | "translatable": 0, 633 | "unique": 0 634 | }, 635 | { 636 | "allow_bulk_edit": 0, 637 | "allow_in_quick_entry": 0, 638 | "allow_on_submit": 1, 639 | "bold": 0, 640 | "collapsible": 0, 641 | "columns": 0, 642 | "fieldname": "journal_entry", 643 | "fieldtype": "Link", 644 | "hidden": 0, 645 | "ignore_user_permissions": 0, 646 | "ignore_xss_filter": 0, 647 | "in_filter": 0, 648 | "in_global_search": 0, 649 | "in_list_view": 0, 650 | "in_standard_filter": 0, 651 | "label": "Journal Voucher", 652 | "length": 0, 653 | "no_copy": 0, 654 | "options": "Journal Entry", 655 | "permlevel": 0, 656 | "precision": "", 657 | "print_hide": 0, 658 | "print_hide_if_no_value": 0, 659 | "read_only": 1, 660 | "remember_last_selected_value": 0, 661 | "report_hide": 0, 662 | "reqd": 0, 663 | "search_index": 0, 664 | "set_only_once": 0, 665 | "translatable": 0, 666 | "unique": 0 667 | }, 668 | { 669 | "allow_bulk_edit": 0, 670 | "allow_in_quick_entry": 0, 671 | "allow_on_submit": 0, 672 | "bold": 0, 673 | "collapsible": 0, 674 | "columns": 0, 675 | "fieldname": "amended_from", 676 | "fieldtype": "Link", 677 | "hidden": 0, 678 | "ignore_user_permissions": 0, 679 | "ignore_xss_filter": 0, 680 | "in_filter": 0, 681 | "in_global_search": 0, 682 | "in_list_view": 0, 683 | "in_standard_filter": 0, 684 | "label": "Amended From", 685 | "length": 0, 686 | "no_copy": 1, 687 | "options": "Travel Sales Invoice", 688 | "permlevel": 0, 689 | "print_hide": 1, 690 | "print_hide_if_no_value": 0, 691 | "read_only": 1, 692 | "remember_last_selected_value": 0, 693 | "report_hide": 0, 694 | "reqd": 0, 695 | "search_index": 0, 696 | "set_only_once": 0, 697 | "translatable": 0, 698 | "unique": 0 699 | } 700 | ], 701 | "has_web_view": 0, 702 | "hide_heading": 0, 703 | "hide_toolbar": 0, 704 | "icon": "fa fa-plane", 705 | "idx": 0, 706 | "image_view": 0, 707 | "in_create": 0, 708 | "is_submittable": 1, 709 | "issingle": 0, 710 | "istable": 0, 711 | "max_attachments": 0, 712 | "modified": "2018-09-03 14:50:56.779528", 713 | "modified_by": "Administrator", 714 | "module": "Travel Agency", 715 | "name": "Travel Sales Invoice", 716 | "name_case": "UPPER CASE", 717 | "owner": "Administrator", 718 | "permissions": [ 719 | { 720 | "amend": 0, 721 | "cancel": 0, 722 | "create": 1, 723 | "delete": 1, 724 | "email": 1, 725 | "export": 1, 726 | "if_owner": 0, 727 | "import": 0, 728 | "permlevel": 0, 729 | "print": 1, 730 | "read": 1, 731 | "report": 1, 732 | "role": "System Manager", 733 | "set_user_permissions": 0, 734 | "share": 1, 735 | "submit": 0, 736 | "write": 1 737 | }, 738 | { 739 | "amend": 0, 740 | "cancel": 0, 741 | "create": 1, 742 | "delete": 1, 743 | "email": 1, 744 | "export": 1, 745 | "if_owner": 0, 746 | "import": 0, 747 | "permlevel": 0, 748 | "print": 1, 749 | "read": 1, 750 | "report": 1, 751 | "role": "Travel Agent", 752 | "set_user_permissions": 0, 753 | "share": 1, 754 | "submit": 1, 755 | "write": 1 756 | } 757 | ], 758 | "quick_entry": 0, 759 | "read_only": 0, 760 | "read_only_onload": 0, 761 | "show_name_in_global_search": 0, 762 | "sort_field": "modified", 763 | "sort_order": "DESC", 764 | "track_changes": 1, 765 | "track_seen": 0, 766 | "track_views": 0 767 | } --------------------------------------------------------------------------------