├── license.txt ├── senbagam_api ├── patches.txt ├── config │ ├── __init__.py │ ├── desktop.py │ └── docs.py ├── modules.txt ├── senbagam_api │ ├── __init__.py │ ├── doctype │ │ ├── __init__.py │ │ ├── store │ │ │ ├── __init__.py │ │ │ ├── test_store.py │ │ │ ├── store.js │ │ │ ├── store.py │ │ │ └── store.json │ │ ├── welcome │ │ │ ├── __init__.py │ │ │ ├── test_welcome.py │ │ │ ├── welcome.js │ │ │ ├── welcome.py │ │ │ └── welcome.json │ │ ├── app_settings │ │ │ ├── __init__.py │ │ │ ├── test_app_settings.py │ │ │ ├── app_settings.js │ │ │ ├── app_settings.py │ │ │ └── app_settings.json │ │ ├── product_type │ │ │ ├── __init__.py │ │ │ ├── test_product_type.py │ │ │ ├── product_type.js │ │ │ ├── product_type.py │ │ │ └── product_type.json │ │ ├── referral │ │ │ ├── __init__.py │ │ │ ├── test_referral.py │ │ │ ├── referral.js │ │ │ ├── referral.py │ │ │ └── referral.json │ │ ├── scanned_qr │ │ │ ├── __init__.py │ │ │ ├── test_scanned_qr.py │ │ │ ├── scanned_qr.js │ │ │ ├── scanned_qr.py │ │ │ └── scanned_qr.json │ │ ├── customer_feedback │ │ │ ├── __init__.py │ │ │ ├── test_customer_feedback.py │ │ │ ├── customer_feedback.js │ │ │ ├── customer_feedback.py │ │ │ └── customer_feedback.json │ │ ├── referral_tree │ │ │ ├── __init__.py │ │ │ ├── test_referral_tree.py │ │ │ ├── referral_tree.js │ │ │ ├── referral_tree.py │ │ │ └── referral_tree.json │ │ ├── connector_bank_account │ │ │ ├── __init__.py │ │ │ ├── test_connector_bank_account.py │ │ │ ├── connector_bank_account.js │ │ │ ├── connector_bank_account.py │ │ │ └── connector_bank_account.json │ │ ├── connector_quotation │ │ │ ├── __init__.py │ │ │ ├── test_connector_quotation.py │ │ │ ├── connector_quotation.py │ │ │ ├── connector_quotation.js │ │ │ └── connector_quotation.json │ │ └── connector_quotation_item │ │ │ ├── __init__.py │ │ │ ├── connector_quotation_item.py │ │ │ └── connector_quotation_item.json │ └── custom │ │ ├── packed_item.json │ │ ├── item_barcode.json │ │ ├── quotation_item.json │ │ ├── quotation.json │ │ ├── address.json │ │ ├── item.json │ │ └── customer.json ├── templates │ ├── __init__.py │ └── pages │ │ └── __init__.py ├── __init__.py ├── cron.py ├── hooks.py └── api.py ├── README.md ├── .gitignore ├── requirements.txt ├── setup.py └── MANIFEST.in /license.txt: -------------------------------------------------------------------------------- 1 | License: MIT -------------------------------------------------------------------------------- /senbagam_api/patches.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/modules.txt: -------------------------------------------------------------------------------- 1 | Senbagam Api -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/templates/pages/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/store/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/welcome/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/app_settings/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/product_type/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/scanned_qr/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/customer_feedback/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral_tree/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_bank_account/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_quotation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_quotation_item/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Senbagam Api 2 | 3 | Api for mobile app 4 | 5 | #### License 6 | 7 | MIT -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | *.egg-info 4 | *.swp 5 | tags 6 | senbagam_api/docs/current -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # frappe -- https://github.com/frappe/frappe is installed via 'bench init' -------------------------------------------------------------------------------- /senbagam_api/__init__.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | __version__ = '0.0.1' 3 | 4 | def after_install(): 5 | frappe.db.set_value("System Settings", "System Settings", "allow_login_using_mobile_number", 1) 6 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/store/test_store.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestStore(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral/test_referral.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestReferral(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/welcome/test_welcome.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestWelcome(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/scanned_qr/test_scanned_qr.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestScannedQR(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/app_settings/test_app_settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestAppSettings(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/product_type/test_product_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestProductType(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral_tree/test_referral_tree.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestReferralTree(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/store/store.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Store', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/welcome/welcome.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Welcome', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/customer_feedback/test_customer_feedback.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestCustomerFeedback(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral/referral.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Referral', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/scanned_qr/scanned_qr.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Scanned QR', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/app_settings/app_settings.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('App Settings', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_quotation/test_connector_quotation.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestConnectorQuotation(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/product_type/product_type.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Product Type', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/store/store.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class Store(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_bank_account/test_connector_bank_account.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and Contributors 2 | # See license.txt 3 | 4 | # import frappe 5 | import unittest 6 | 7 | class TestConnectorBankAccount(unittest.TestCase): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral/referral.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class Referral(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral_tree/referral_tree.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Referral Tree', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/welcome/welcome.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class Welcome(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/scanned_qr/scanned_qr.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ScannedQR(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/customer_feedback/customer_feedback.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Customer Feedback', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/config/desktop.py: -------------------------------------------------------------------------------- 1 | from frappe import _ 2 | 3 | def get_data(): 4 | return [ 5 | { 6 | "module_name": "Senbagam Api", 7 | "color": "grey", 8 | "icon": "octicon octicon-file-directory", 9 | "type": "module", 10 | "label": _("Senbagam Api") 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/app_settings/app_settings.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class AppSettings(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/product_type/product_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ProductType(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral_tree/referral_tree.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.utils.nestedset import NestedSet 6 | 7 | class ReferralTree(NestedSet): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_bank_account/connector_bank_account.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Connector Bank Account', { 5 | // refresh: function(frm) { 6 | 7 | // } 8 | }); 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/customer_feedback/customer_feedback.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class CustomerFeedback(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_quotation/connector_quotation.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ConnectorQuotation(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_bank_account/connector_bank_account.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ConnectorBankAccount(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_quotation_item/connector_quotation_item.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, Aerele Technologies and contributors 2 | # For license information, please see license.txt 3 | 4 | # import frappe 5 | from frappe.model.document import Document 6 | 7 | class ConnectorQuotationItem(Document): 8 | pass 9 | -------------------------------------------------------------------------------- /senbagam_api/config/docs.py: -------------------------------------------------------------------------------- 1 | """ 2 | Configuration for docs 3 | """ 4 | 5 | # source_link = "https://github.com/[org_name]/senbagam_api" 6 | # docs_base_url = "https://[org_name].github.io/senbagam_api" 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 = "Senbagam Api" 12 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_quotation/connector_quotation.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Aerele Technologies and contributors 2 | // For license information, please see license.txt 3 | 4 | frappe.ui.form.on('Connector Quotation', { 5 | refresh: function(frm) { 6 | frm.add_custom_button(__("Create Quotation"), function(){ 7 | frappe.call({ 8 | method: "senbagam_api.cron.create_quotation", 9 | args:{ 10 | "name": frm.doc.name 11 | } 12 | }) 13 | }) 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | with open("requirements.txt") as f: 4 | install_requires = f.read().strip().split("\n") 5 | 6 | # get version from __version__ variable in senbagam_api/__init__.py 7 | from senbagam_api import __version__ as version 8 | 9 | setup( 10 | name="senbagam_api", 11 | version=version, 12 | description="Api for mobile app", 13 | author="Aerele Technologies", 14 | author_email="Aerele Technologies", 15 | packages=find_packages(), 16 | zip_safe=False, 17 | include_package_data=True, 18 | install_requires=install_requires 19 | ) 20 | -------------------------------------------------------------------------------- /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 senbagam_api *.css 8 | recursive-include senbagam_api *.csv 9 | recursive-include senbagam_api *.html 10 | recursive-include senbagam_api *.ico 11 | recursive-include senbagam_api *.js 12 | recursive-include senbagam_api *.json 13 | recursive-include senbagam_api *.md 14 | recursive-include senbagam_api *.png 15 | recursive-include senbagam_api *.py 16 | recursive-include senbagam_api *.svg 17 | recursive-include senbagam_api *.txt 18 | recursive-exclude senbagam_api *.pyc -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/custom/packed_item.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_fields": [], 3 | "custom_perms": [], 4 | "doctype": "Packed Item", 5 | "property_setters": [ 6 | { 7 | "_assign": null, 8 | "_comments": null, 9 | "_liked_by": null, 10 | "_user_tags": null, 11 | "creation": "2022-02-04 00:03:44.644787", 12 | "default_value": null, 13 | "doc_type": "Packed Item", 14 | "docstatus": 0, 15 | "doctype_or_field": "DocField", 16 | "field_name": "rate", 17 | "idx": 0, 18 | "modified": "2022-02-04 00:03:44.644787", 19 | "modified_by": "Administrator", 20 | "name": "Packed Item-rate-read_only", 21 | "owner": "Administrator", 22 | "parent": null, 23 | "parentfield": null, 24 | "parenttype": null, 25 | "property": "read_only", 26 | "property_type": "Check", 27 | "row_name": null, 28 | "value": "1" 29 | } 30 | ], 31 | "sync_on_migrate": 1 32 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/custom/item_barcode.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_fields": [], 3 | "custom_perms": [], 4 | "doctype": "Item Barcode", 5 | "property_setters": [ 6 | { 7 | "_assign": null, 8 | "_comments": null, 9 | "_liked_by": null, 10 | "_user_tags": null, 11 | "creation": "2021-12-28 16:48:03.370343", 12 | "default_value": null, 13 | "doc_type": "Item Barcode", 14 | "docstatus": 0, 15 | "doctype_or_field": "DocField", 16 | "field_name": "barcode", 17 | "idx": 0, 18 | "modified": "2021-12-28 16:48:03.370343", 19 | "modified_by": "Administrator", 20 | "name": "Item Barcode-barcode-hidden", 21 | "owner": "Administrator", 22 | "parent": null, 23 | "parentfield": null, 24 | "parenttype": null, 25 | "property": "hidden", 26 | "property_type": "Check", 27 | "row_name": null, 28 | "value": "0" 29 | } 30 | ], 31 | "sync_on_migrate": 1 32 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_quotation_item/connector_quotation_item.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2022-02-03 23:33:58.482351", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "item_code", 9 | "qty" 10 | ], 11 | "fields": [ 12 | { 13 | "fieldname": "item_code", 14 | "fieldtype": "Data", 15 | "in_list_view": 1, 16 | "label": "Item Code" 17 | }, 18 | { 19 | "fieldname": "qty", 20 | "fieldtype": "Float", 21 | "in_list_view": 1, 22 | "label": "Qty" 23 | } 24 | ], 25 | "index_web_pages_for_search": 1, 26 | "istable": 1, 27 | "links": [], 28 | "modified": "2022-02-04 00:02:05.385891", 29 | "modified_by": "Administrator", 30 | "module": "Senbagam Api", 31 | "name": "Connector Quotation Item", 32 | "owner": "Administrator", 33 | "permissions": [], 34 | "sort_field": "modified", 35 | "sort_order": "DESC", 36 | "track_changes": 1 37 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/app_settings/app_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "creation": "2022-02-14 12:31:06.940919", 4 | "doctype": "DocType", 5 | "editable_grid": 1, 6 | "engine": "InnoDB", 7 | "field_order": [ 8 | "company_name", 9 | "share_message", 10 | "about_us" 11 | ], 12 | "fields": [ 13 | { 14 | "fieldname": "share_message", 15 | "fieldtype": "Small Text", 16 | "label": "Share message" 17 | }, 18 | { 19 | "fieldname": "about_us", 20 | "fieldtype": "Long Text", 21 | "label": "About us" 22 | }, 23 | { 24 | "fieldname": "company_name", 25 | "fieldtype": "Data", 26 | "label": "Company Name" 27 | } 28 | ], 29 | "index_web_pages_for_search": 1, 30 | "issingle": 1, 31 | "links": [], 32 | "modified": "2022-03-04 12:40:55.125071", 33 | "modified_by": "Administrator", 34 | "module": "Senbagam Api", 35 | "name": "App Settings", 36 | "owner": "Administrator", 37 | "permissions": [ 38 | { 39 | "create": 1, 40 | "delete": 1, 41 | "email": 1, 42 | "print": 1, 43 | "read": 1, 44 | "role": "System Manager", 45 | "share": 1, 46 | "write": 1 47 | } 48 | ], 49 | "sort_field": "modified", 50 | "sort_order": "DESC", 51 | "track_changes": 1 52 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/product_type/product_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:product_type", 5 | "creation": "2022-02-14 23:50:24.711337", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "product_type", 11 | "description" 12 | ], 13 | "fields": [ 14 | { 15 | "fieldname": "product_type", 16 | "fieldtype": "Data", 17 | "in_list_view": 1, 18 | "label": "Product Type", 19 | "reqd": 1, 20 | "unique": 1 21 | }, 22 | { 23 | "fieldname": "description", 24 | "fieldtype": "Small Text", 25 | "label": "Description" 26 | } 27 | ], 28 | "index_web_pages_for_search": 1, 29 | "links": [], 30 | "modified": "2022-02-14 23:50:45.203053", 31 | "modified_by": "Administrator", 32 | "module": "Senbagam Api", 33 | "name": "Product Type", 34 | "owner": "Administrator", 35 | "permissions": [ 36 | { 37 | "create": 1, 38 | "delete": 1, 39 | "email": 1, 40 | "export": 1, 41 | "print": 1, 42 | "read": 1, 43 | "report": 1, 44 | "role": "System Manager", 45 | "share": 1, 46 | "write": 1 47 | } 48 | ], 49 | "sort_field": "modified", 50 | "sort_order": "DESC", 51 | "track_changes": 1 52 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral/referral.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "format:REF-{YY}-{#####}", 5 | "creation": "2022-02-03 15:21:43.960457", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "refered_by", 11 | "person_name", 12 | "person_mobile" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "refered_by", 17 | "fieldtype": "Link", 18 | "label": "Refered By", 19 | "options": "User" 20 | }, 21 | { 22 | "fieldname": "person_name", 23 | "fieldtype": "Data", 24 | "label": "Referred Person Name" 25 | }, 26 | { 27 | "fieldname": "person_mobile", 28 | "fieldtype": "Data", 29 | "label": "Referred Person Mobile No" 30 | } 31 | ], 32 | "index_web_pages_for_search": 1, 33 | "links": [], 34 | "modified": "2022-02-03 15:38:03.080125", 35 | "modified_by": "Administrator", 36 | "module": "Senbagam Api", 37 | "name": "Referral", 38 | "owner": "Administrator", 39 | "permissions": [ 40 | { 41 | "create": 1, 42 | "delete": 1, 43 | "email": 1, 44 | "export": 1, 45 | "print": 1, 46 | "read": 1, 47 | "report": 1, 48 | "role": "System Manager", 49 | "share": 1, 50 | "write": 1 51 | } 52 | ], 53 | "sort_field": "modified", 54 | "sort_order": "DESC" 55 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/scanned_qr/scanned_qr.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "naming_series:", 5 | "creation": "2022-02-14 14:20:54.765377", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "customer", 11 | "qr_code", 12 | "naming_series" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "customer", 17 | "fieldtype": "Link", 18 | "label": "Customer", 19 | "options": "Customer" 20 | }, 21 | { 22 | "fieldname": "qr_code", 23 | "fieldtype": "Data", 24 | "label": "QR Code" 25 | }, 26 | { 27 | "fieldname": "naming_series", 28 | "fieldtype": "Select", 29 | "label": "Naming Series", 30 | "options": "CUS-QR-.YY.-" 31 | } 32 | ], 33 | "index_web_pages_for_search": 1, 34 | "links": [], 35 | "modified": "2022-02-14 14:20:54.765377", 36 | "modified_by": "Administrator", 37 | "module": "Senbagam Api", 38 | "name": "Scanned QR", 39 | "owner": "Administrator", 40 | "permissions": [ 41 | { 42 | "create": 1, 43 | "delete": 1, 44 | "email": 1, 45 | "export": 1, 46 | "print": 1, 47 | "read": 1, 48 | "report": 1, 49 | "role": "System Manager", 50 | "share": 1, 51 | "write": 1 52 | } 53 | ], 54 | "sort_field": "modified", 55 | "sort_order": "DESC", 56 | "track_changes": 1 57 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/customer_feedback/customer_feedback.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "naming_series:", 5 | "creation": "2022-02-14 14:19:53.136649", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "customer", 11 | "feedback", 12 | "naming_series" 13 | ], 14 | "fields": [ 15 | { 16 | "fieldname": "customer", 17 | "fieldtype": "Link", 18 | "label": "Customer", 19 | "options": "Customer" 20 | }, 21 | { 22 | "fieldname": "feedback", 23 | "fieldtype": "Long Text", 24 | "label": "Feedback" 25 | }, 26 | { 27 | "fieldname": "naming_series", 28 | "fieldtype": "Select", 29 | "label": "Naming Series", 30 | "options": "CUS-FB-.YY.-" 31 | } 32 | ], 33 | "index_web_pages_for_search": 1, 34 | "links": [], 35 | "modified": "2022-02-14 14:19:53.136649", 36 | "modified_by": "Administrator", 37 | "module": "Senbagam Api", 38 | "name": "Customer Feedback", 39 | "owner": "Administrator", 40 | "permissions": [ 41 | { 42 | "create": 1, 43 | "delete": 1, 44 | "email": 1, 45 | "export": 1, 46 | "print": 1, 47 | "read": 1, 48 | "report": 1, 49 | "role": "System Manager", 50 | "share": 1, 51 | "write": 1 52 | } 53 | ], 54 | "sort_field": "modified", 55 | "sort_order": "DESC", 56 | "track_changes": 1 57 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/store/store.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "format:STR-{YY}-{MM}-{#####}", 4 | "creation": "2022-02-03 23:19:45.300886", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "image", 10 | "address", 11 | "column_break_3", 12 | "is_active", 13 | "section_break_5", 14 | "description" 15 | ], 16 | "fields": [ 17 | { 18 | "fieldname": "image", 19 | "fieldtype": "Attach Image", 20 | "label": "Image" 21 | }, 22 | { 23 | "fieldname": "address", 24 | "fieldtype": "Small Text", 25 | "label": "Address" 26 | }, 27 | { 28 | "fieldname": "column_break_3", 29 | "fieldtype": "Column Break" 30 | }, 31 | { 32 | "default": "1", 33 | "fieldname": "is_active", 34 | "fieldtype": "Check", 35 | "label": "Is Active" 36 | }, 37 | { 38 | "fieldname": "section_break_5", 39 | "fieldtype": "Section Break", 40 | "label": "Description" 41 | }, 42 | { 43 | "fieldname": "description", 44 | "fieldtype": "Long Text", 45 | "label": "Description" 46 | } 47 | ], 48 | "index_web_pages_for_search": 1, 49 | "links": [], 50 | "modified": "2022-03-04 11:29:13.769906", 51 | "modified_by": "Administrator", 52 | "module": "Senbagam Api", 53 | "name": "Store", 54 | "owner": "Administrator", 55 | "permissions": [ 56 | { 57 | "create": 1, 58 | "delete": 1, 59 | "email": 1, 60 | "export": 1, 61 | "print": 1, 62 | "read": 1, 63 | "report": 1, 64 | "role": "System Manager", 65 | "share": 1, 66 | "write": 1 67 | } 68 | ], 69 | "sort_field": "modified", 70 | "sort_order": "DESC" 71 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/referral_tree/referral_tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "allow_rename": 1, 4 | "autoname": "field:customer", 5 | "creation": "2022-02-04 18:53:54.893249", 6 | "doctype": "DocType", 7 | "editable_grid": 1, 8 | "engine": "InnoDB", 9 | "field_order": [ 10 | "customer", 11 | "lft", 12 | "rgt", 13 | "is_group", 14 | "old_parent", 15 | "parent_referral_tree" 16 | ], 17 | "fields": [ 18 | { 19 | "fieldname": "customer", 20 | "fieldtype": "Link", 21 | "label": "Customer", 22 | "options": "Customer", 23 | "unique": 1 24 | }, 25 | { 26 | "fieldname": "lft", 27 | "fieldtype": "Int", 28 | "hidden": 1, 29 | "label": "Left", 30 | "no_copy": 1, 31 | "read_only": 1 32 | }, 33 | { 34 | "fieldname": "rgt", 35 | "fieldtype": "Int", 36 | "hidden": 1, 37 | "label": "Right", 38 | "no_copy": 1, 39 | "read_only": 1 40 | }, 41 | { 42 | "default": "0", 43 | "fieldname": "is_group", 44 | "fieldtype": "Check", 45 | "label": "Is Group" 46 | }, 47 | { 48 | "fieldname": "old_parent", 49 | "fieldtype": "Link", 50 | "label": "Old Parent", 51 | "options": "Referral Tree" 52 | }, 53 | { 54 | "fieldname": "parent_referral_tree", 55 | "fieldtype": "Link", 56 | "label": "Parent Referral Tree", 57 | "options": "Referral Tree" 58 | } 59 | ], 60 | "index_web_pages_for_search": 1, 61 | "is_tree": 1, 62 | "links": [], 63 | "modified": "2022-02-04 18:54:40.577741", 64 | "modified_by": "Administrator", 65 | "module": "Senbagam Api", 66 | "name": "Referral Tree", 67 | "nsm_parent_field": "parent_referral_tree", 68 | "owner": "Administrator", 69 | "permissions": [ 70 | { 71 | "create": 1, 72 | "delete": 1, 73 | "email": 1, 74 | "export": 1, 75 | "print": 1, 76 | "read": 1, 77 | "report": 1, 78 | "role": "System Manager", 79 | "share": 1, 80 | "write": 1 81 | } 82 | ], 83 | "sort_field": "modified", 84 | "sort_order": "DESC" 85 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/welcome/welcome.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "format:WLC-{YY}-{MM}-{#####}", 4 | "creation": "2022-02-03 18:08:46.311676", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "image", 10 | "content", 11 | "column_break_3", 12 | "is_active", 13 | "from_date", 14 | "to_date", 15 | "section_break", 16 | "description" 17 | ], 18 | "fields": [ 19 | { 20 | "fieldname": "image", 21 | "fieldtype": "Attach Image", 22 | "label": "Image" 23 | }, 24 | { 25 | "fieldname": "content", 26 | "fieldtype": "Small Text", 27 | "label": "Content" 28 | }, 29 | { 30 | "fieldname": "column_break_3", 31 | "fieldtype": "Column Break" 32 | }, 33 | { 34 | "default": "1", 35 | "fieldname": "is_active", 36 | "fieldtype": "Check", 37 | "label": "Is Active" 38 | }, 39 | { 40 | "fieldname": "from_date", 41 | "fieldtype": "Date", 42 | "in_list_view": 1, 43 | "label": "From Date", 44 | "reqd": 1 45 | }, 46 | { 47 | "fieldname": "to_date", 48 | "fieldtype": "Date", 49 | "in_list_view": 1, 50 | "label": "To Date", 51 | "reqd": 1 52 | }, 53 | { 54 | "fieldname": "description", 55 | "fieldtype": "Long Text", 56 | "label": "Description" 57 | }, 58 | { 59 | "fieldname": "section_break", 60 | "fieldtype": "Section Break", 61 | "label": "Description" 62 | } 63 | ], 64 | "index_web_pages_for_search": 1, 65 | "links": [], 66 | "modified": "2022-03-04 11:28:39.445340", 67 | "modified_by": "Administrator", 68 | "module": "Senbagam Api", 69 | "name": "Welcome", 70 | "owner": "Administrator", 71 | "permissions": [ 72 | { 73 | "create": 1, 74 | "delete": 1, 75 | "email": 1, 76 | "export": 1, 77 | "print": 1, 78 | "read": 1, 79 | "report": 1, 80 | "role": "System Manager", 81 | "share": 1, 82 | "write": 1 83 | } 84 | ], 85 | "sort_field": "modified", 86 | "sort_order": "DESC" 87 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_bank_account/connector_bank_account.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "format:BANK-ACC-{#####}", 4 | "creation": "2022-02-05 23:49:47.794055", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "bank_name", 10 | "account_holder_name", 11 | "account_no", 12 | "ifsc_code", 13 | "customer", 14 | "column_break_6", 15 | "status", 16 | "retry_limit", 17 | "is_synced" 18 | ], 19 | "fields": [ 20 | { 21 | "fieldname": "bank_name", 22 | "fieldtype": "Data", 23 | "label": "Bank Name" 24 | }, 25 | { 26 | "fieldname": "account_holder_name", 27 | "fieldtype": "Data", 28 | "label": "Account Holder Name" 29 | }, 30 | { 31 | "fieldname": "account_no", 32 | "fieldtype": "Data", 33 | "label": "Account No" 34 | }, 35 | { 36 | "fieldname": "ifsc_code", 37 | "fieldtype": "Data", 38 | "label": "IFSC Code" 39 | }, 40 | { 41 | "fieldname": "customer", 42 | "fieldtype": "Data", 43 | "label": "Customer" 44 | }, 45 | { 46 | "fieldname": "column_break_6", 47 | "fieldtype": "Column Break" 48 | }, 49 | { 50 | "fieldname": "status", 51 | "fieldtype": "Data", 52 | "label": "Status" 53 | }, 54 | { 55 | "default": "3", 56 | "fieldname": "retry_limit", 57 | "fieldtype": "Int", 58 | "label": "Retry Limit" 59 | }, 60 | { 61 | "default": "0", 62 | "fieldname": "is_synced", 63 | "fieldtype": "Check", 64 | "label": "Is Synced" 65 | } 66 | ], 67 | "index_web_pages_for_search": 1, 68 | "links": [], 69 | "modified": "2022-02-06 00:45:30.281487", 70 | "modified_by": "Administrator", 71 | "module": "Senbagam Api", 72 | "name": "Connector Bank Account", 73 | "owner": "Administrator", 74 | "permissions": [ 75 | { 76 | "create": 1, 77 | "delete": 1, 78 | "email": 1, 79 | "export": 1, 80 | "print": 1, 81 | "read": 1, 82 | "report": 1, 83 | "role": "System Manager", 84 | "share": 1, 85 | "write": 1 86 | } 87 | ], 88 | "sort_field": "modified", 89 | "sort_order": "DESC" 90 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/doctype/connector_quotation/connector_quotation.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [], 3 | "autoname": "format:CON-QT-{#####}", 4 | "creation": "2022-02-03 23:36:23.655724", 5 | "doctype": "DocType", 6 | "editable_grid": 1, 7 | "engine": "InnoDB", 8 | "field_order": [ 9 | "customer", 10 | "status", 11 | "column_break_3", 12 | "date", 13 | "time", 14 | "retry_limit", 15 | "section_break_6", 16 | "items", 17 | "is_synced" 18 | ], 19 | "fields": [ 20 | { 21 | "fieldname": "customer", 22 | "fieldtype": "Data", 23 | "label": "Customer" 24 | }, 25 | { 26 | "default": "Pending", 27 | "fieldname": "status", 28 | "fieldtype": "Data", 29 | "label": "Status" 30 | }, 31 | { 32 | "fieldname": "column_break_3", 33 | "fieldtype": "Column Break" 34 | }, 35 | { 36 | "fieldname": "date", 37 | "fieldtype": "Date", 38 | "label": "Date" 39 | }, 40 | { 41 | "default": "3", 42 | "fieldname": "retry_limit", 43 | "fieldtype": "Int", 44 | "label": "Retry Limit" 45 | }, 46 | { 47 | "fieldname": "section_break_6", 48 | "fieldtype": "Section Break" 49 | }, 50 | { 51 | "fieldname": "time", 52 | "fieldtype": "Time", 53 | "label": "Time" 54 | }, 55 | { 56 | "default": "0", 57 | "fieldname": "is_synced", 58 | "fieldtype": "Check", 59 | "label": "Is Synced" 60 | }, 61 | { 62 | "fieldname": "items", 63 | "fieldtype": "Table", 64 | "label": "Items", 65 | "options": "Connector Quotation Item" 66 | } 67 | ], 68 | "index_web_pages_for_search": 1, 69 | "links": [], 70 | "modified": "2022-02-03 23:48:13.823138", 71 | "modified_by": "Administrator", 72 | "module": "Senbagam Api", 73 | "name": "Connector Quotation", 74 | "owner": "Administrator", 75 | "permissions": [ 76 | { 77 | "create": 1, 78 | "delete": 1, 79 | "email": 1, 80 | "export": 1, 81 | "print": 1, 82 | "read": 1, 83 | "report": 1, 84 | "role": "System Manager", 85 | "share": 1, 86 | "write": 1 87 | } 88 | ], 89 | "sort_field": "modified", 90 | "sort_order": "DESC", 91 | "track_changes": 1 92 | } -------------------------------------------------------------------------------- /senbagam_api/cron.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | 3 | def cron_create_quotation(): 4 | qt = frappe.db.sql(""" select distinct name from `tabConnector Quotation` where is_synced=0 and retry_limit > 0 order by creation limit 20""", as_dict=True) 5 | sync_quotation(qt) 6 | 7 | def sync_quotation(quot): 8 | for i in quot: 9 | try: 10 | create_quotation(i.name) 11 | except: 12 | pass 13 | 14 | @frappe.whitelist() 15 | def create_quotation(name): 16 | doc = frappe.get_doc("Connector Quotation", name) 17 | if doc.is_synced: 18 | frappe.throw("Quotation already created") 19 | doc.retry_limit -= 1 20 | doc.save(ignore_permissions=True) 21 | frappe.db.commit() 22 | new_doc = frappe.new_doc("Quotation") 23 | new_doc.company = "Senbagam Paints" 24 | new_doc.quotation_to = "Customer" 25 | new_doc.party_name = doc.customer 26 | new_doc.reference_no = doc.name 27 | for i in doc.items: 28 | new_doc.append("items", { 29 | "item_code":validate_item(i.item_code.strip()), 30 | "qty":i.qty 31 | }) 32 | new_doc.save(ignore_permissions = True) 33 | new_doc.submit() 34 | doc.status = "Synced" 35 | doc.is_synced = 1 36 | doc.save(ignore_permissions=True) 37 | 38 | def validate_item(item): 39 | if not frappe.db.get_value("Item", item): 40 | frappe.throw("Item: {0} not found".format(item)) 41 | return item 42 | 43 | 44 | 45 | 46 | def cron_create_bank_account(): 47 | ba = frappe.db.sql(""" select distinct name from `tabConnector Bank Account` where is_synced=0 and retry_limit > 0 order by creation limit 20""", as_dict=True) 48 | sync_bank_account(ba) 49 | 50 | def sync_bank_account(bank_account): 51 | for i in bank_account: 52 | try: 53 | create_bank_account(i.name) 54 | except: 55 | pass 56 | 57 | @frappe.whitelist() 58 | def create_bank_account(name): 59 | doc = frappe.get_doc("Connector Bank Account", name) 60 | if doc.is_synced: 61 | frappe.throw("Bank Account already created") 62 | doc.retry_limit -= 1 63 | doc.save(ignore_permissions=True) 64 | frappe.db.commit() 65 | new_doc = frappe.new_doc("Bank Account") 66 | new_doc.account_name = doc.account_holder_name 67 | new_doc.bank = get_bank_name(doc.bank_name) 68 | new_doc.party_type = "Customer" 69 | new_doc.party = doc.customer 70 | new_doc.bank_account_no = doc.account_no 71 | new_doc.branch_code = doc.ifsc_code 72 | new_doc.save(ignore_permissions=True) 73 | doc.status = "Synced" 74 | doc.is_synced = 1 75 | doc.save(ignore_permissions=True) 76 | 77 | 78 | 79 | def get_bank_name(name): 80 | bank_name = frappe.db.get_value("Bank", {"bank_name":name}) 81 | if not bank_name: 82 | doc = frappe.new_doc("Bank") 83 | doc.bank_name = name 84 | doc.save(ignore_permissions=True) 85 | bank_name = doc.name 86 | return bank_name 87 | -------------------------------------------------------------------------------- /senbagam_api/hooks.py: -------------------------------------------------------------------------------- 1 | from . import __version__ as app_version 2 | 3 | app_name = "senbagam_api" 4 | app_title = "Senbagam Api" 5 | app_publisher = "Aerele Technologies" 6 | app_description = "Api for mobile app" 7 | app_icon = "octicon octicon-file-directory" 8 | app_color = "grey" 9 | app_email = "Aerele Technologies" 10 | app_license = "MIT" 11 | 12 | # Includes in 13 | # ------------------ 14 | 15 | # include js, css files in header of desk.html 16 | # app_include_css = "/assets/senbagam_api/css/senbagam_api.css" 17 | # app_include_js = "/assets/senbagam_api/js/senbagam_api.js" 18 | 19 | # include js, css files in header of web template 20 | # web_include_css = "/assets/senbagam_api/css/senbagam_api.css" 21 | # web_include_js = "/assets/senbagam_api/js/senbagam_api.js" 22 | 23 | # include custom scss in every website theme (without file extension ".scss") 24 | # website_theme_scss = "senbagam_api/public/scss/website" 25 | 26 | # include js, css files in header of web form 27 | # webform_include_js = {"doctype": "public/js/doctype.js"} 28 | # webform_include_css = {"doctype": "public/css/doctype.css"} 29 | 30 | # include js in page 31 | # page_js = {"page" : "public/js/file.js"} 32 | 33 | # include js in doctype views 34 | # doctype_js = {"doctype" : "public/js/doctype.js"} 35 | # doctype_list_js = {"doctype" : "public/js/doctype_list.js"} 36 | # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} 37 | # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} 38 | 39 | # Home Pages 40 | # ---------- 41 | 42 | # application home page (will override Website Settings) 43 | # home_page = "login" 44 | 45 | # website user home page (by Role) 46 | # role_home_page = { 47 | # "Role": "home_page" 48 | # } 49 | 50 | # Generators 51 | # ---------- 52 | 53 | # automatically create page for each record of this doctype 54 | # website_generators = ["Web Page"] 55 | 56 | # Installation 57 | # ------------ 58 | 59 | # before_install = "senbagam_api.install.before_install" 60 | after_install = "senbagam_api.after_install" 61 | 62 | # Desk Notifications 63 | # ------------------ 64 | # See frappe.core.notifications.get_notification_config 65 | 66 | # notification_config = "senbagam_api.notifications.get_notification_config" 67 | 68 | # Permissions 69 | # ----------- 70 | # Permissions evaluated in scripted ways 71 | 72 | # permission_query_conditions = { 73 | # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", 74 | # } 75 | # 76 | # has_permission = { 77 | # "Event": "frappe.desk.doctype.event.event.has_permission", 78 | # } 79 | 80 | # DocType Class 81 | # --------------- 82 | # Override standard doctype classes 83 | 84 | # override_doctype_class = { 85 | # "ToDo": "custom_app.overrides.CustomToDo" 86 | # } 87 | 88 | # Document Events 89 | # --------------- 90 | # Hook on document methods and events 91 | 92 | # doc_events = { 93 | # "*": { 94 | # "on_update": "method", 95 | # "on_cancel": "method", 96 | # "on_trash": "method" 97 | # } 98 | # } 99 | 100 | # Scheduled Tasks 101 | # --------------- 102 | 103 | scheduler_events = { 104 | # "all": [ 105 | # "senbagam_api.tasks.all" 106 | # ], 107 | # "daily": [ 108 | # "senbagam_api.tasks.daily" 109 | # ], 110 | # "hourly": [ 111 | # "senbagam_api.tasks.hourly" 112 | # ], 113 | # "weekly": [ 114 | # "senbagam_api.tasks.weekly" 115 | # ] 116 | # "monthly": [ 117 | # "senbagam_api.tasks.monthly" 118 | # ] 119 | "cron":{ 120 | "*/1 * * * *":[ 121 | "senbagam_api.cron.cron_create_quotation", 122 | "senbagam_api.cron.cron_create_bank_account" 123 | ] 124 | } 125 | } 126 | 127 | # Testing 128 | # ------- 129 | 130 | # before_tests = "senbagam_api.install.before_tests" 131 | 132 | # Overriding Methods 133 | # ------------------------------ 134 | # 135 | # override_whitelisted_methods = { 136 | # "frappe.desk.doctype.event.event.get_events": "senbagam_api.event.get_events" 137 | # } 138 | # 139 | # each overriding function accepts a `data` argument; 140 | # generated from the base implementation of the doctype dashboard, 141 | # along with any modifications made in other Frappe apps 142 | # override_doctype_dashboards = { 143 | # "Task": "senbagam_api.task.get_dashboard_data" 144 | # } 145 | 146 | # exempt linked doctypes from being automatically cancelled 147 | # 148 | # auto_cancel_exempted_doctypes = ["Auto Repeat"] 149 | 150 | 151 | # User Data Protection 152 | # -------------------- 153 | 154 | user_data_fields = [ 155 | { 156 | "doctype": "{doctype_1}", 157 | "filter_by": "{filter_by}", 158 | "redact_fields": ["{field_1}", "{field_2}"], 159 | "partial": 1, 160 | }, 161 | { 162 | "doctype": "{doctype_2}", 163 | "filter_by": "{filter_by}", 164 | "partial": 1, 165 | }, 166 | { 167 | "doctype": "{doctype_3}", 168 | "strict": False, 169 | }, 170 | { 171 | "doctype": "{doctype_4}" 172 | } 173 | ] 174 | 175 | # Authentication and authorization 176 | # -------------------------------- 177 | 178 | # auth_hooks = [ 179 | # "senbagam_api.auth.validate" 180 | # ] 181 | 182 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/custom/quotation_item.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_fields": [ 3 | { 4 | "_assign": null, 5 | "_comments": null, 6 | "_liked_by": null, 7 | "_user_tags": null, 8 | "allow_in_quick_entry": 0, 9 | "allow_on_submit": 1, 10 | "bold": 0, 11 | "collapsible": 0, 12 | "collapsible_depends_on": null, 13 | "columns": 0, 14 | "creation": "2021-12-28 17:57:48.517977", 15 | "default": null, 16 | "depends_on": null, 17 | "description": null, 18 | "docstatus": 0, 19 | "dt": "Quotation Item", 20 | "fetch_from": "item_code.gst_hsn_code", 21 | "fetch_if_empty": 1, 22 | "fieldname": "gst_hsn_code", 23 | "fieldtype": "Data", 24 | "hidden": 0, 25 | "hide_border": 0, 26 | "hide_days": 0, 27 | "hide_seconds": 0, 28 | "idx": 0, 29 | "ignore_user_permissions": 0, 30 | "ignore_xss_filter": 0, 31 | "in_global_search": 0, 32 | "in_list_view": 0, 33 | "in_preview": 0, 34 | "in_standard_filter": 0, 35 | "insert_after": "description", 36 | "label": "HSN/SAC", 37 | "length": 0, 38 | "mandatory_depends_on": null, 39 | "modified": "2021-12-28 17:57:48.517977", 40 | "modified_by": "Administrator", 41 | "name": "Quotation Item-gst_hsn_code", 42 | "no_copy": 0, 43 | "non_negative": 0, 44 | "options": null, 45 | "owner": "Administrator", 46 | "parent": null, 47 | "parentfield": null, 48 | "parenttype": null, 49 | "permlevel": 0, 50 | "precision": "", 51 | "print_hide": 1, 52 | "print_hide_if_no_value": 0, 53 | "print_width": null, 54 | "read_only": 0, 55 | "read_only_depends_on": null, 56 | "report_hide": 0, 57 | "reqd": 0, 58 | "search_index": 0, 59 | "translatable": 1, 60 | "unique": 0, 61 | "width": null 62 | }, 63 | { 64 | "_assign": null, 65 | "_comments": null, 66 | "_liked_by": null, 67 | "_user_tags": null, 68 | "allow_in_quick_entry": 0, 69 | "allow_on_submit": 0, 70 | "bold": 0, 71 | "collapsible": 0, 72 | "collapsible_depends_on": null, 73 | "columns": 0, 74 | "creation": "2021-12-28 17:57:48.669032", 75 | "default": null, 76 | "depends_on": null, 77 | "description": null, 78 | "docstatus": 0, 79 | "dt": "Quotation Item", 80 | "fetch_from": "item_code.is_nil_exempt", 81 | "fetch_if_empty": 0, 82 | "fieldname": "is_nil_exempt", 83 | "fieldtype": "Check", 84 | "hidden": 0, 85 | "hide_border": 0, 86 | "hide_days": 0, 87 | "hide_seconds": 0, 88 | "idx": 0, 89 | "ignore_user_permissions": 0, 90 | "ignore_xss_filter": 0, 91 | "in_global_search": 0, 92 | "in_list_view": 0, 93 | "in_preview": 0, 94 | "in_standard_filter": 0, 95 | "insert_after": "gst_hsn_code", 96 | "label": "Is Nil Rated or Exempted", 97 | "length": 0, 98 | "mandatory_depends_on": null, 99 | "modified": "2021-12-28 17:57:48.669032", 100 | "modified_by": "Administrator", 101 | "name": "Quotation Item-is_nil_exempt", 102 | "no_copy": 0, 103 | "non_negative": 0, 104 | "options": null, 105 | "owner": "Administrator", 106 | "parent": null, 107 | "parentfield": null, 108 | "parenttype": null, 109 | "permlevel": 0, 110 | "precision": "", 111 | "print_hide": 1, 112 | "print_hide_if_no_value": 0, 113 | "print_width": null, 114 | "read_only": 0, 115 | "read_only_depends_on": null, 116 | "report_hide": 0, 117 | "reqd": 0, 118 | "search_index": 0, 119 | "translatable": 1, 120 | "unique": 0, 121 | "width": null 122 | }, 123 | { 124 | "_assign": null, 125 | "_comments": null, 126 | "_liked_by": null, 127 | "_user_tags": null, 128 | "allow_in_quick_entry": 0, 129 | "allow_on_submit": 0, 130 | "bold": 0, 131 | "collapsible": 0, 132 | "collapsible_depends_on": null, 133 | "columns": 0, 134 | "creation": "2021-12-28 17:57:48.837395", 135 | "default": null, 136 | "depends_on": null, 137 | "description": null, 138 | "docstatus": 0, 139 | "dt": "Quotation Item", 140 | "fetch_from": "item_code.is_non_gst", 141 | "fetch_if_empty": 0, 142 | "fieldname": "is_non_gst", 143 | "fieldtype": "Check", 144 | "hidden": 0, 145 | "hide_border": 0, 146 | "hide_days": 0, 147 | "hide_seconds": 0, 148 | "idx": 0, 149 | "ignore_user_permissions": 0, 150 | "ignore_xss_filter": 0, 151 | "in_global_search": 0, 152 | "in_list_view": 0, 153 | "in_preview": 0, 154 | "in_standard_filter": 0, 155 | "insert_after": "is_nil_exempt", 156 | "label": "Is Non GST", 157 | "length": 0, 158 | "mandatory_depends_on": null, 159 | "modified": "2021-12-28 17:57:48.837395", 160 | "modified_by": "Administrator", 161 | "name": "Quotation Item-is_non_gst", 162 | "no_copy": 0, 163 | "non_negative": 0, 164 | "options": null, 165 | "owner": "Administrator", 166 | "parent": null, 167 | "parentfield": null, 168 | "parenttype": null, 169 | "permlevel": 0, 170 | "precision": "", 171 | "print_hide": 1, 172 | "print_hide_if_no_value": 0, 173 | "print_width": null, 174 | "read_only": 0, 175 | "read_only_depends_on": null, 176 | "report_hide": 0, 177 | "reqd": 0, 178 | "search_index": 0, 179 | "translatable": 1, 180 | "unique": 0, 181 | "width": null 182 | } 183 | ], 184 | "custom_perms": [], 185 | "doctype": "Quotation Item", 186 | "property_setters": [], 187 | "sync_on_migrate": 1 188 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/custom/quotation.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_fields": [ 3 | { 4 | "_assign": null, 5 | "_comments": null, 6 | "_liked_by": null, 7 | "_user_tags": null, 8 | "allow_in_quick_entry": 0, 9 | "allow_on_submit": 0, 10 | "bold": 0, 11 | "collapsible": 0, 12 | "collapsible_depends_on": null, 13 | "columns": 0, 14 | "creation": "2022-02-04 11:11:11.484270", 15 | "default": null, 16 | "depends_on": null, 17 | "description": null, 18 | "docstatus": 0, 19 | "dt": "Quotation", 20 | "fetch_from": null, 21 | "fetch_if_empty": 0, 22 | "fieldname": "reference_no", 23 | "fieldtype": "Data", 24 | "hidden": 0, 25 | "hide_border": 0, 26 | "hide_days": 0, 27 | "hide_seconds": 0, 28 | "idx": 6, 29 | "ignore_user_permissions": 0, 30 | "ignore_xss_filter": 0, 31 | "in_global_search": 0, 32 | "in_list_view": 0, 33 | "in_preview": 0, 34 | "in_standard_filter": 0, 35 | "insert_after": "customer_name", 36 | "label": "Reference No", 37 | "length": 0, 38 | "mandatory_depends_on": null, 39 | "modified": "2022-02-04 11:11:11.484270", 40 | "modified_by": "Administrator", 41 | "name": "Quotation-reference_no", 42 | "no_copy": 0, 43 | "non_negative": 0, 44 | "options": null, 45 | "owner": "Administrator", 46 | "parent": null, 47 | "parentfield": null, 48 | "parenttype": null, 49 | "permlevel": 0, 50 | "precision": "", 51 | "print_hide": 0, 52 | "print_hide_if_no_value": 0, 53 | "print_width": null, 54 | "read_only": 0, 55 | "read_only_depends_on": null, 56 | "report_hide": 0, 57 | "reqd": 0, 58 | "search_index": 0, 59 | "translatable": 0, 60 | "unique": 0, 61 | "width": null 62 | } 63 | ], 64 | "custom_perms": [], 65 | "doctype": "Quotation", 66 | "property_setters": [ 67 | { 68 | "_assign": null, 69 | "_comments": null, 70 | "_liked_by": null, 71 | "_user_tags": null, 72 | "creation": "2021-12-28 16:47:53.750893", 73 | "default_value": null, 74 | "doc_type": "Quotation", 75 | "docstatus": 0, 76 | "doctype_or_field": "DocField", 77 | "field_name": "in_words", 78 | "idx": 0, 79 | "modified": "2021-12-28 16:47:53.750893", 80 | "modified_by": "Administrator", 81 | "name": "Quotation-in_words-print_hide", 82 | "owner": "Administrator", 83 | "parent": null, 84 | "parentfield": null, 85 | "parenttype": null, 86 | "property": "print_hide", 87 | "property_type": "Check", 88 | "row_name": null, 89 | "value": "0" 90 | }, 91 | { 92 | "_assign": null, 93 | "_comments": null, 94 | "_liked_by": null, 95 | "_user_tags": null, 96 | "creation": "2021-12-28 16:47:53.724408", 97 | "default_value": null, 98 | "doc_type": "Quotation", 99 | "docstatus": 0, 100 | "doctype_or_field": "DocField", 101 | "field_name": "in_words", 102 | "idx": 0, 103 | "modified": "2021-12-28 16:47:53.724408", 104 | "modified_by": "Administrator", 105 | "name": "Quotation-in_words-hidden", 106 | "owner": "Administrator", 107 | "parent": null, 108 | "parentfield": null, 109 | "parenttype": null, 110 | "property": "hidden", 111 | "property_type": "Check", 112 | "row_name": null, 113 | "value": "0" 114 | }, 115 | { 116 | "_assign": null, 117 | "_comments": null, 118 | "_liked_by": null, 119 | "_user_tags": null, 120 | "creation": "2021-12-28 16:47:52.441121", 121 | "default_value": null, 122 | "doc_type": "Quotation", 123 | "docstatus": 0, 124 | "doctype_or_field": "DocField", 125 | "field_name": "disable_rounded_total", 126 | "idx": 0, 127 | "modified": "2021-12-28 16:47:52.441121", 128 | "modified_by": "Administrator", 129 | "name": "Quotation-disable_rounded_total-default", 130 | "owner": "Administrator", 131 | "parent": null, 132 | "parentfield": null, 133 | "parenttype": null, 134 | "property": "default", 135 | "property_type": "Text", 136 | "row_name": null, 137 | "value": "0" 138 | }, 139 | { 140 | "_assign": null, 141 | "_comments": null, 142 | "_liked_by": null, 143 | "_user_tags": null, 144 | "creation": "2021-12-28 16:47:52.419926", 145 | "default_value": null, 146 | "doc_type": "Quotation", 147 | "docstatus": 0, 148 | "doctype_or_field": "DocField", 149 | "field_name": "rounded_total", 150 | "idx": 0, 151 | "modified": "2021-12-28 16:47:52.419926", 152 | "modified_by": "Administrator", 153 | "name": "Quotation-rounded_total-print_hide", 154 | "owner": "Administrator", 155 | "parent": null, 156 | "parentfield": null, 157 | "parenttype": null, 158 | "property": "print_hide", 159 | "property_type": "Check", 160 | "row_name": null, 161 | "value": "0" 162 | }, 163 | { 164 | "_assign": null, 165 | "_comments": null, 166 | "_liked_by": null, 167 | "_user_tags": null, 168 | "creation": "2021-12-28 16:47:52.398432", 169 | "default_value": null, 170 | "doc_type": "Quotation", 171 | "docstatus": 0, 172 | "doctype_or_field": "DocField", 173 | "field_name": "rounded_total", 174 | "idx": 0, 175 | "modified": "2021-12-28 16:47:52.398432", 176 | "modified_by": "Administrator", 177 | "name": "Quotation-rounded_total-hidden", 178 | "owner": "Administrator", 179 | "parent": null, 180 | "parentfield": null, 181 | "parenttype": null, 182 | "property": "hidden", 183 | "property_type": "Check", 184 | "row_name": null, 185 | "value": "0" 186 | }, 187 | { 188 | "_assign": null, 189 | "_comments": null, 190 | "_liked_by": null, 191 | "_user_tags": null, 192 | "creation": "2021-12-28 16:47:52.375104", 193 | "default_value": null, 194 | "doc_type": "Quotation", 195 | "docstatus": 0, 196 | "doctype_or_field": "DocField", 197 | "field_name": "base_rounded_total", 198 | "idx": 0, 199 | "modified": "2021-12-28 16:47:52.375104", 200 | "modified_by": "Administrator", 201 | "name": "Quotation-base_rounded_total-print_hide", 202 | "owner": "Administrator", 203 | "parent": null, 204 | "parentfield": null, 205 | "parenttype": null, 206 | "property": "print_hide", 207 | "property_type": "Check", 208 | "row_name": null, 209 | "value": "1" 210 | }, 211 | { 212 | "_assign": null, 213 | "_comments": null, 214 | "_liked_by": null, 215 | "_user_tags": null, 216 | "creation": "2021-12-28 16:47:52.294025", 217 | "default_value": null, 218 | "doc_type": "Quotation", 219 | "docstatus": 0, 220 | "doctype_or_field": "DocField", 221 | "field_name": "base_rounded_total", 222 | "idx": 0, 223 | "modified": "2021-12-28 16:47:52.294025", 224 | "modified_by": "Administrator", 225 | "name": "Quotation-base_rounded_total-hidden", 226 | "owner": "Administrator", 227 | "parent": null, 228 | "parentfield": null, 229 | "parenttype": null, 230 | "property": "hidden", 231 | "property_type": "Check", 232 | "row_name": null, 233 | "value": "0" 234 | } 235 | ], 236 | "sync_on_migrate": 1 237 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/custom/address.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_fields": [ 3 | { 4 | "_assign": null, 5 | "_comments": null, 6 | "_liked_by": null, 7 | "_user_tags": null, 8 | "allow_in_quick_entry": 0, 9 | "allow_on_submit": 0, 10 | "bold": 0, 11 | "collapsible": 0, 12 | "collapsible_depends_on": null, 13 | "columns": 0, 14 | "creation": "2018-12-28 22:29:21.828090", 15 | "default": null, 16 | "depends_on": null, 17 | "description": null, 18 | "docstatus": 0, 19 | "dt": "Address", 20 | "fetch_from": null, 21 | "fetch_if_empty": 0, 22 | "fieldname": "tax_category", 23 | "fieldtype": "Link", 24 | "hidden": 0, 25 | "hide_border": 0, 26 | "hide_days": 0, 27 | "hide_seconds": 0, 28 | "idx": 18, 29 | "ignore_user_permissions": 0, 30 | "ignore_xss_filter": 0, 31 | "in_global_search": 0, 32 | "in_list_view": 0, 33 | "in_preview": 0, 34 | "in_standard_filter": 0, 35 | "insert_after": "gst_state_number", 36 | "label": "Tax Category", 37 | "length": 0, 38 | "mandatory_depends_on": null, 39 | "modified": "2018-12-28 22:29:21.828090", 40 | "modified_by": "Administrator", 41 | "name": "Address-tax_category", 42 | "no_copy": 0, 43 | "non_negative": 0, 44 | "options": "Tax Category", 45 | "owner": "Administrator", 46 | "parent": null, 47 | "parentfield": null, 48 | "parenttype": null, 49 | "permlevel": 0, 50 | "precision": "", 51 | "print_hide": 0, 52 | "print_hide_if_no_value": 0, 53 | "print_width": null, 54 | "read_only": 0, 55 | "read_only_depends_on": null, 56 | "report_hide": 0, 57 | "reqd": 0, 58 | "search_index": 0, 59 | "translatable": 0, 60 | "unique": 0, 61 | "width": null 62 | }, 63 | { 64 | "_assign": null, 65 | "_comments": null, 66 | "_liked_by": null, 67 | "_user_tags": null, 68 | "allow_in_quick_entry": 0, 69 | "allow_on_submit": 0, 70 | "bold": 0, 71 | "collapsible": 0, 72 | "collapsible_depends_on": null, 73 | "columns": 0, 74 | "creation": "2020-10-14 17:41:40.878179", 75 | "default": "0", 76 | "depends_on": null, 77 | "description": null, 78 | "docstatus": 0, 79 | "dt": "Address", 80 | "fetch_from": null, 81 | "fetch_if_empty": 0, 82 | "fieldname": "is_your_company_address", 83 | "fieldtype": "Check", 84 | "hidden": 0, 85 | "hide_border": 0, 86 | "hide_days": 0, 87 | "hide_seconds": 0, 88 | "idx": 24, 89 | "ignore_user_permissions": 0, 90 | "ignore_xss_filter": 0, 91 | "in_global_search": 0, 92 | "in_list_view": 0, 93 | "in_preview": 0, 94 | "in_standard_filter": 0, 95 | "insert_after": "linked_with", 96 | "label": "Is Your Company Address", 97 | "length": 0, 98 | "mandatory_depends_on": null, 99 | "modified": "2020-10-14 17:41:40.878179", 100 | "modified_by": "Administrator", 101 | "name": "Address-is_your_company_address", 102 | "no_copy": 0, 103 | "non_negative": 0, 104 | "options": null, 105 | "owner": "Administrator", 106 | "parent": null, 107 | "parentfield": null, 108 | "parenttype": null, 109 | "permlevel": 0, 110 | "precision": "", 111 | "print_hide": 0, 112 | "print_hide_if_no_value": 0, 113 | "print_width": null, 114 | "read_only": 0, 115 | "read_only_depends_on": null, 116 | "report_hide": 0, 117 | "reqd": 0, 118 | "search_index": 0, 119 | "translatable": 0, 120 | "unique": 0, 121 | "width": null 122 | }, 123 | { 124 | "_assign": null, 125 | "_comments": null, 126 | "_liked_by": null, 127 | "_user_tags": null, 128 | "allow_in_quick_entry": 0, 129 | "allow_on_submit": 0, 130 | "bold": 0, 131 | "collapsible": 0, 132 | "collapsible_depends_on": null, 133 | "columns": 0, 134 | "creation": "2021-12-28 17:57:17.728205", 135 | "default": null, 136 | "depends_on": null, 137 | "description": null, 138 | "docstatus": 0, 139 | "dt": "Address", 140 | "fetch_from": null, 141 | "fetch_if_empty": 0, 142 | "fieldname": "gstin", 143 | "fieldtype": "Data", 144 | "hidden": 0, 145 | "hide_border": 0, 146 | "hide_days": 0, 147 | "hide_seconds": 0, 148 | "idx": 16, 149 | "ignore_user_permissions": 0, 150 | "ignore_xss_filter": 0, 151 | "in_global_search": 0, 152 | "in_list_view": 0, 153 | "in_preview": 0, 154 | "in_standard_filter": 0, 155 | "insert_after": "fax", 156 | "label": "Party GSTIN", 157 | "length": 0, 158 | "mandatory_depends_on": null, 159 | "modified": "2021-12-28 17:57:17.728205", 160 | "modified_by": "Administrator", 161 | "name": "Address-gstin", 162 | "no_copy": 0, 163 | "non_negative": 0, 164 | "options": null, 165 | "owner": "Administrator", 166 | "parent": null, 167 | "parentfield": null, 168 | "parenttype": null, 169 | "permlevel": 0, 170 | "precision": "", 171 | "print_hide": 0, 172 | "print_hide_if_no_value": 0, 173 | "print_width": null, 174 | "read_only": 0, 175 | "read_only_depends_on": null, 176 | "report_hide": 0, 177 | "reqd": 0, 178 | "search_index": 0, 179 | "translatable": 1, 180 | "unique": 0, 181 | "width": null 182 | }, 183 | { 184 | "_assign": null, 185 | "_comments": null, 186 | "_liked_by": null, 187 | "_user_tags": null, 188 | "allow_in_quick_entry": 0, 189 | "allow_on_submit": 0, 190 | "bold": 0, 191 | "collapsible": 0, 192 | "collapsible_depends_on": null, 193 | "columns": 0, 194 | "creation": "2021-12-28 17:57:17.854764", 195 | "default": null, 196 | "depends_on": null, 197 | "description": null, 198 | "docstatus": 0, 199 | "dt": "Address", 200 | "fetch_from": null, 201 | "fetch_if_empty": 0, 202 | "fieldname": "gst_state", 203 | "fieldtype": "Select", 204 | "hidden": 0, 205 | "hide_border": 0, 206 | "hide_days": 0, 207 | "hide_seconds": 0, 208 | "idx": 17, 209 | "ignore_user_permissions": 0, 210 | "ignore_xss_filter": 0, 211 | "in_global_search": 0, 212 | "in_list_view": 0, 213 | "in_preview": 0, 214 | "in_standard_filter": 0, 215 | "insert_after": "gstin", 216 | "label": "GST State", 217 | "length": 0, 218 | "mandatory_depends_on": null, 219 | "modified": "2021-12-28 17:57:17.854764", 220 | "modified_by": "Administrator", 221 | "name": "Address-gst_state", 222 | "no_copy": 0, 223 | "non_negative": 0, 224 | "options": "\nAndaman and Nicobar Islands\nAndhra Pradesh\nArunachal Pradesh\nAssam\nBihar\nChandigarh\nChhattisgarh\nDadra and Nagar Haveli and Daman and Diu\nDelhi\nGoa\nGujarat\nHaryana\nHimachal Pradesh\nJammu and Kashmir\nJharkhand\nKarnataka\nKerala\nLadakh\nLakshadweep Islands\nMadhya Pradesh\nMaharashtra\nManipur\nMeghalaya\nMizoram\nNagaland\nOdisha\nOther Territory\nPondicherry\nPunjab\nRajasthan\nSikkim\nTamil Nadu\nTelangana\nTripura\nUttar Pradesh\nUttarakhand\nWest Bengal", 225 | "owner": "Administrator", 226 | "parent": null, 227 | "parentfield": null, 228 | "parenttype": null, 229 | "permlevel": 0, 230 | "precision": "", 231 | "print_hide": 0, 232 | "print_hide_if_no_value": 0, 233 | "print_width": null, 234 | "read_only": 0, 235 | "read_only_depends_on": null, 236 | "report_hide": 0, 237 | "reqd": 0, 238 | "search_index": 0, 239 | "translatable": 1, 240 | "unique": 0, 241 | "width": null 242 | }, 243 | { 244 | "_assign": null, 245 | "_comments": null, 246 | "_liked_by": null, 247 | "_user_tags": null, 248 | "allow_in_quick_entry": 0, 249 | "allow_on_submit": 0, 250 | "bold": 0, 251 | "collapsible": 0, 252 | "collapsible_depends_on": null, 253 | "columns": 0, 254 | "creation": "2021-12-28 17:57:17.959784", 255 | "default": null, 256 | "depends_on": null, 257 | "description": null, 258 | "docstatus": 0, 259 | "dt": "Address", 260 | "fetch_from": null, 261 | "fetch_if_empty": 0, 262 | "fieldname": "gst_state_number", 263 | "fieldtype": "Data", 264 | "hidden": 0, 265 | "hide_border": 0, 266 | "hide_days": 0, 267 | "hide_seconds": 0, 268 | "idx": 18, 269 | "ignore_user_permissions": 0, 270 | "ignore_xss_filter": 0, 271 | "in_global_search": 0, 272 | "in_list_view": 0, 273 | "in_preview": 0, 274 | "in_standard_filter": 0, 275 | "insert_after": "gst_state", 276 | "label": "GST State Number", 277 | "length": 0, 278 | "mandatory_depends_on": null, 279 | "modified": "2021-12-28 17:57:17.959784", 280 | "modified_by": "Administrator", 281 | "name": "Address-gst_state_number", 282 | "no_copy": 0, 283 | "non_negative": 0, 284 | "options": null, 285 | "owner": "Administrator", 286 | "parent": null, 287 | "parentfield": null, 288 | "parenttype": null, 289 | "permlevel": 0, 290 | "precision": "", 291 | "print_hide": 0, 292 | "print_hide_if_no_value": 0, 293 | "print_width": null, 294 | "read_only": 1, 295 | "read_only_depends_on": null, 296 | "report_hide": 0, 297 | "reqd": 0, 298 | "search_index": 0, 299 | "translatable": 1, 300 | "unique": 0, 301 | "width": null 302 | }, 303 | { 304 | "_assign": null, 305 | "_comments": null, 306 | "_liked_by": null, 307 | "_user_tags": null, 308 | "allow_in_quick_entry": 0, 309 | "allow_on_submit": 0, 310 | "bold": 0, 311 | "collapsible": 0, 312 | "collapsible_depends_on": null, 313 | "columns": 0, 314 | "creation": "2022-02-03 14:04:20.623470", 315 | "default": null, 316 | "depends_on": null, 317 | "description": null, 318 | "docstatus": 0, 319 | "dt": "Address", 320 | "fetch_from": null, 321 | "fetch_if_empty": 0, 322 | "fieldname": "district", 323 | "fieldtype": "Data", 324 | "hidden": 0, 325 | "hide_border": 0, 326 | "hide_days": 0, 327 | "hide_seconds": 0, 328 | "idx": 6, 329 | "ignore_user_permissions": 0, 330 | "ignore_xss_filter": 0, 331 | "in_global_search": 0, 332 | "in_list_view": 0, 333 | "in_preview": 0, 334 | "in_standard_filter": 0, 335 | "insert_after": "city", 336 | "label": "District", 337 | "length": 0, 338 | "mandatory_depends_on": null, 339 | "modified": "2022-02-03 14:04:20.623470", 340 | "modified_by": "Administrator", 341 | "name": "Address-district", 342 | "no_copy": 0, 343 | "non_negative": 0, 344 | "options": null, 345 | "owner": "Administrator", 346 | "parent": null, 347 | "parentfield": null, 348 | "parenttype": null, 349 | "permlevel": 0, 350 | "precision": "", 351 | "print_hide": 0, 352 | "print_hide_if_no_value": 0, 353 | "print_width": null, 354 | "read_only": 0, 355 | "read_only_depends_on": null, 356 | "report_hide": 0, 357 | "reqd": 0, 358 | "search_index": 0, 359 | "translatable": 0, 360 | "unique": 0, 361 | "width": null 362 | } 363 | ], 364 | "custom_perms": [], 365 | "doctype": "Address", 366 | "property_setters": [], 367 | "sync_on_migrate": 1 368 | } -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/custom/item.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_fields": [ 3 | { 4 | "_assign": null, 5 | "_comments": null, 6 | "_liked_by": null, 7 | "_user_tags": null, 8 | "allow_in_quick_entry": 0, 9 | "allow_on_submit": 0, 10 | "bold": 0, 11 | "collapsible": 0, 12 | "collapsible_depends_on": null, 13 | "columns": 0, 14 | "creation": "2021-12-28 16:47:22.689630", 15 | "default": null, 16 | "depends_on": null, 17 | "description": null, 18 | "docstatus": 0, 19 | "dt": "Item", 20 | "fetch_from": null, 21 | "fetch_if_empty": 0, 22 | "fieldname": "hub_sync_id", 23 | "fieldtype": "Data", 24 | "hidden": 1, 25 | "hide_border": 0, 26 | "hide_days": 0, 27 | "hide_seconds": 0, 28 | "idx": 1, 29 | "ignore_user_permissions": 0, 30 | "ignore_xss_filter": 0, 31 | "in_global_search": 0, 32 | "in_list_view": 0, 33 | "in_preview": 0, 34 | "in_standard_filter": 0, 35 | "insert_after": null, 36 | "label": "Hub Sync ID", 37 | "length": 0, 38 | "mandatory_depends_on": null, 39 | "modified": "2021-12-28 16:47:22.689630", 40 | "modified_by": "Administrator", 41 | "name": "Item-hub_sync_id", 42 | "no_copy": 1, 43 | "non_negative": 0, 44 | "options": null, 45 | "owner": "Administrator", 46 | "parent": null, 47 | "parentfield": null, 48 | "parenttype": null, 49 | "permlevel": 0, 50 | "precision": null, 51 | "print_hide": 0, 52 | "print_hide_if_no_value": 0, 53 | "print_width": null, 54 | "read_only": 1, 55 | "read_only_depends_on": null, 56 | "report_hide": 0, 57 | "reqd": 0, 58 | "search_index": 0, 59 | "translatable": 0, 60 | "unique": 1, 61 | "width": null 62 | }, 63 | { 64 | "_assign": null, 65 | "_comments": null, 66 | "_liked_by": null, 67 | "_user_tags": null, 68 | "allow_in_quick_entry": 0, 69 | "allow_on_submit": 0, 70 | "bold": 0, 71 | "collapsible": 0, 72 | "collapsible_depends_on": null, 73 | "columns": 0, 74 | "creation": "2021-12-28 17:57:47.447599", 75 | "default": null, 76 | "depends_on": null, 77 | "description": null, 78 | "docstatus": 0, 79 | "dt": "Item", 80 | "fetch_from": null, 81 | "fetch_if_empty": 0, 82 | "fieldname": "gst_hsn_code", 83 | "fieldtype": "Link", 84 | "hidden": 0, 85 | "hide_border": 0, 86 | "hide_days": 0, 87 | "hide_seconds": 0, 88 | "idx": 9, 89 | "ignore_user_permissions": 0, 90 | "ignore_xss_filter": 0, 91 | "in_global_search": 0, 92 | "in_list_view": 0, 93 | "in_preview": 0, 94 | "in_standard_filter": 0, 95 | "insert_after": "product_type", 96 | "label": "HSN/SAC", 97 | "length": 0, 98 | "mandatory_depends_on": null, 99 | "modified": "2021-12-28 17:57:47.447599", 100 | "modified_by": "Administrator", 101 | "name": "Item-gst_hsn_code", 102 | "no_copy": 0, 103 | "non_negative": 0, 104 | "options": "GST HSN Code", 105 | "owner": "Administrator", 106 | "parent": null, 107 | "parentfield": null, 108 | "parenttype": null, 109 | "permlevel": 0, 110 | "precision": "", 111 | "print_hide": 0, 112 | "print_hide_if_no_value": 0, 113 | "print_width": null, 114 | "read_only": 0, 115 | "read_only_depends_on": null, 116 | "report_hide": 0, 117 | "reqd": 0, 118 | "search_index": 0, 119 | "translatable": 1, 120 | "unique": 0, 121 | "width": null 122 | }, 123 | { 124 | "_assign": null, 125 | "_comments": null, 126 | "_liked_by": null, 127 | "_user_tags": null, 128 | "allow_in_quick_entry": 0, 129 | "allow_on_submit": 0, 130 | "bold": 0, 131 | "collapsible": 0, 132 | "collapsible_depends_on": null, 133 | "columns": 0, 134 | "creation": "2021-12-28 17:57:47.682275", 135 | "default": null, 136 | "depends_on": null, 137 | "description": null, 138 | "docstatus": 0, 139 | "dt": "Item", 140 | "fetch_from": null, 141 | "fetch_if_empty": 0, 142 | "fieldname": "is_nil_exempt", 143 | "fieldtype": "Check", 144 | "hidden": 0, 145 | "hide_border": 0, 146 | "hide_days": 0, 147 | "hide_seconds": 0, 148 | "idx": 10, 149 | "ignore_user_permissions": 0, 150 | "ignore_xss_filter": 0, 151 | "in_global_search": 0, 152 | "in_list_view": 0, 153 | "in_preview": 0, 154 | "in_standard_filter": 0, 155 | "insert_after": "gst_hsn_code", 156 | "label": "Is Nil Rated or Exempted", 157 | "length": 0, 158 | "mandatory_depends_on": null, 159 | "modified": "2021-12-28 17:57:47.682275", 160 | "modified_by": "Administrator", 161 | "name": "Item-is_nil_exempt", 162 | "no_copy": 0, 163 | "non_negative": 0, 164 | "options": null, 165 | "owner": "Administrator", 166 | "parent": null, 167 | "parentfield": null, 168 | "parenttype": null, 169 | "permlevel": 0, 170 | "precision": "", 171 | "print_hide": 0, 172 | "print_hide_if_no_value": 0, 173 | "print_width": null, 174 | "read_only": 0, 175 | "read_only_depends_on": null, 176 | "report_hide": 0, 177 | "reqd": 0, 178 | "search_index": 0, 179 | "translatable": 1, 180 | "unique": 0, 181 | "width": null 182 | }, 183 | { 184 | "_assign": null, 185 | "_comments": null, 186 | "_liked_by": null, 187 | "_user_tags": null, 188 | "allow_in_quick_entry": 0, 189 | "allow_on_submit": 0, 190 | "bold": 0, 191 | "collapsible": 0, 192 | "collapsible_depends_on": null, 193 | "columns": 0, 194 | "creation": "2021-12-28 17:57:47.880293", 195 | "default": null, 196 | "depends_on": null, 197 | "description": null, 198 | "docstatus": 0, 199 | "dt": "Item", 200 | "fetch_from": null, 201 | "fetch_if_empty": 0, 202 | "fieldname": "is_non_gst", 203 | "fieldtype": "Check", 204 | "hidden": 0, 205 | "hide_border": 0, 206 | "hide_days": 0, 207 | "hide_seconds": 0, 208 | "idx": 11, 209 | "ignore_user_permissions": 0, 210 | "ignore_xss_filter": 0, 211 | "in_global_search": 0, 212 | "in_list_view": 0, 213 | "in_preview": 0, 214 | "in_standard_filter": 0, 215 | "insert_after": "is_nil_exempt", 216 | "label": "Is Non GST ", 217 | "length": 0, 218 | "mandatory_depends_on": null, 219 | "modified": "2021-12-28 17:57:47.880293", 220 | "modified_by": "Administrator", 221 | "name": "Item-is_non_gst", 222 | "no_copy": 0, 223 | "non_negative": 0, 224 | "options": null, 225 | "owner": "Administrator", 226 | "parent": null, 227 | "parentfield": null, 228 | "parenttype": null, 229 | "permlevel": 0, 230 | "precision": "", 231 | "print_hide": 0, 232 | "print_hide_if_no_value": 0, 233 | "print_width": null, 234 | "read_only": 0, 235 | "read_only_depends_on": null, 236 | "report_hide": 0, 237 | "reqd": 0, 238 | "search_index": 0, 239 | "translatable": 1, 240 | "unique": 0, 241 | "width": null 242 | }, 243 | { 244 | "_assign": null, 245 | "_comments": null, 246 | "_liked_by": null, 247 | "_user_tags": null, 248 | "allow_in_quick_entry": 0, 249 | "allow_on_submit": 0, 250 | "bold": 0, 251 | "collapsible": 0, 252 | "collapsible_depends_on": null, 253 | "columns": 0, 254 | "creation": "2022-02-14 23:53:55.675077", 255 | "default": null, 256 | "depends_on": null, 257 | "description": null, 258 | "docstatus": 0, 259 | "dt": "Item", 260 | "fetch_from": null, 261 | "fetch_if_empty": 0, 262 | "fieldname": "product_type", 263 | "fieldtype": "Link", 264 | "hidden": 0, 265 | "hide_border": 0, 266 | "hide_days": 0, 267 | "hide_seconds": 0, 268 | "idx": 8, 269 | "ignore_user_permissions": 0, 270 | "ignore_xss_filter": 0, 271 | "in_global_search": 0, 272 | "in_list_view": 0, 273 | "in_preview": 0, 274 | "in_standard_filter": 0, 275 | "insert_after": "item_group", 276 | "label": "Product Type", 277 | "length": 0, 278 | "mandatory_depends_on": null, 279 | "modified": "2022-02-14 23:53:55.675077", 280 | "modified_by": "Administrator", 281 | "name": "Item-product_type", 282 | "no_copy": 0, 283 | "non_negative": 0, 284 | "options": "Product Type", 285 | "owner": "Administrator", 286 | "parent": null, 287 | "parentfield": null, 288 | "parenttype": null, 289 | "permlevel": 0, 290 | "precision": "", 291 | "print_hide": 0, 292 | "print_hide_if_no_value": 0, 293 | "print_width": null, 294 | "read_only": 0, 295 | "read_only_depends_on": null, 296 | "report_hide": 0, 297 | "reqd": 0, 298 | "search_index": 0, 299 | "translatable": 0, 300 | "unique": 0, 301 | "width": null 302 | }, 303 | { 304 | "_assign": null, 305 | "_comments": null, 306 | "_liked_by": null, 307 | "_user_tags": null, 308 | "allow_in_quick_entry": 0, 309 | "allow_on_submit": 0, 310 | "bold": 0, 311 | "collapsible": 0, 312 | "collapsible_depends_on": null, 313 | "columns": 0, 314 | "creation": "2022-02-15 00:13:02.576265", 315 | "default": null, 316 | "depends_on": null, 317 | "description": null, 318 | "docstatus": 0, 319 | "dt": "Item", 320 | "fetch_from": null, 321 | "fetch_if_empty": 0, 322 | "fieldname": "show_price", 323 | "fieldtype": "Check", 324 | "hidden": 0, 325 | "hide_border": 0, 326 | "hide_days": 0, 327 | "hide_seconds": 0, 328 | "idx": 15, 329 | "ignore_user_permissions": 0, 330 | "ignore_xss_filter": 0, 331 | "in_global_search": 0, 332 | "in_list_view": 0, 333 | "in_preview": 0, 334 | "in_standard_filter": 0, 335 | "insert_after": "disabled", 336 | "label": "Show Price", 337 | "length": 0, 338 | "mandatory_depends_on": null, 339 | "modified": "2022-02-15 00:13:02.576265", 340 | "modified_by": "Administrator", 341 | "name": "Item-show_price", 342 | "no_copy": 0, 343 | "non_negative": 0, 344 | "options": null, 345 | "owner": "Administrator", 346 | "parent": null, 347 | "parentfield": null, 348 | "parenttype": null, 349 | "permlevel": 0, 350 | "precision": "", 351 | "print_hide": 0, 352 | "print_hide_if_no_value": 0, 353 | "print_width": null, 354 | "read_only": 0, 355 | "read_only_depends_on": null, 356 | "report_hide": 0, 357 | "reqd": 0, 358 | "search_index": 0, 359 | "translatable": 0, 360 | "unique": 0, 361 | "width": null 362 | } 363 | ], 364 | "custom_perms": [], 365 | "doctype": "Item", 366 | "property_setters": [ 367 | { 368 | "_assign": null, 369 | "_comments": null, 370 | "_liked_by": null, 371 | "_user_tags": null, 372 | "creation": "2021-12-28 16:48:04.213222", 373 | "default_value": null, 374 | "doc_type": "Item", 375 | "docstatus": 0, 376 | "doctype_or_field": "DocField", 377 | "field_name": "barcodes", 378 | "idx": 0, 379 | "modified": "2021-12-28 16:48:04.213222", 380 | "modified_by": "Administrator", 381 | "name": "Item-barcodes-hidden", 382 | "owner": "Administrator", 383 | "parent": null, 384 | "parentfield": null, 385 | "parenttype": null, 386 | "property": "hidden", 387 | "property_type": "Check", 388 | "row_name": null, 389 | "value": "0" 390 | }, 391 | { 392 | "_assign": null, 393 | "_comments": null, 394 | "_liked_by": null, 395 | "_user_tags": null, 396 | "creation": "2021-12-28 16:48:03.306263", 397 | "default_value": null, 398 | "doc_type": "Item", 399 | "docstatus": 0, 400 | "doctype_or_field": "DocField", 401 | "field_name": "item_code", 402 | "idx": 0, 403 | "modified": "2021-12-28 16:48:03.306263", 404 | "modified_by": "Administrator", 405 | "name": "Item-item_code-reqd", 406 | "owner": "Administrator", 407 | "parent": null, 408 | "parentfield": null, 409 | "parenttype": null, 410 | "property": "reqd", 411 | "property_type": "Check", 412 | "row_name": null, 413 | "value": "1" 414 | }, 415 | { 416 | "_assign": null, 417 | "_comments": null, 418 | "_liked_by": null, 419 | "_user_tags": null, 420 | "creation": "2021-12-28 16:48:03.284128", 421 | "default_value": null, 422 | "doc_type": "Item", 423 | "docstatus": 0, 424 | "doctype_or_field": "DocField", 425 | "field_name": "item_code", 426 | "idx": 0, 427 | "modified": "2021-12-28 16:48:03.284128", 428 | "modified_by": "Administrator", 429 | "name": "Item-item_code-hidden", 430 | "owner": "Administrator", 431 | "parent": null, 432 | "parentfield": null, 433 | "parenttype": null, 434 | "property": "hidden", 435 | "property_type": "Check", 436 | "row_name": null, 437 | "value": "0" 438 | }, 439 | { 440 | "_assign": null, 441 | "_comments": null, 442 | "_liked_by": null, 443 | "_user_tags": null, 444 | "creation": "2021-12-28 16:48:03.258327", 445 | "default_value": null, 446 | "doc_type": "Item", 447 | "docstatus": 0, 448 | "doctype_or_field": "DocField", 449 | "field_name": "naming_series", 450 | "idx": 0, 451 | "modified": "2021-12-28 16:48:03.258327", 452 | "modified_by": "Administrator", 453 | "name": "Item-naming_series-hidden", 454 | "owner": "Administrator", 455 | "parent": null, 456 | "parentfield": null, 457 | "parenttype": null, 458 | "property": "hidden", 459 | "property_type": "Check", 460 | "row_name": null, 461 | "value": "1" 462 | }, 463 | { 464 | "_assign": null, 465 | "_comments": null, 466 | "_liked_by": null, 467 | "_user_tags": null, 468 | "creation": "2021-12-28 16:48:03.167889", 469 | "default_value": null, 470 | "doc_type": "Item", 471 | "docstatus": 0, 472 | "doctype_or_field": "DocField", 473 | "field_name": "naming_series", 474 | "idx": 0, 475 | "modified": "2021-12-28 16:48:03.167889", 476 | "modified_by": "Administrator", 477 | "name": "Item-naming_series-reqd", 478 | "owner": "Administrator", 479 | "parent": null, 480 | "parentfield": null, 481 | "parenttype": null, 482 | "property": "reqd", 483 | "property_type": "Check", 484 | "row_name": null, 485 | "value": "0" 486 | }, 487 | { 488 | "_assign": null, 489 | "_comments": null, 490 | "_liked_by": null, 491 | "_user_tags": null, 492 | "creation": "2021-12-28 16:48:01.045418", 493 | "default_value": null, 494 | "doc_type": "Item", 495 | "docstatus": 0, 496 | "doctype_or_field": "DocField", 497 | "field_name": "default_discount_account", 498 | "idx": 0, 499 | "modified": "2021-12-28 16:48:01.045418", 500 | "modified_by": "Administrator", 501 | "name": "Item-default_discount_account-hidden", 502 | "owner": "Administrator", 503 | "parent": null, 504 | "parentfield": null, 505 | "parenttype": null, 506 | "property": "hidden", 507 | "property_type": "Check", 508 | "row_name": null, 509 | "value": "1" 510 | } 511 | ], 512 | "sync_on_migrate": 1 513 | } -------------------------------------------------------------------------------- /senbagam_api/api.py: -------------------------------------------------------------------------------- 1 | import frappe 2 | from datetime import date, datetime 3 | from json import loads 4 | from frappe.core.doctype.user.user import generate_keys 5 | 6 | 7 | @frappe.whitelist( allow_guest=True ) 8 | def add_image(): 9 | return frappe.request.data 10 | 11 | @frappe.whitelist( allow_guest=True ) 12 | def login(args): 13 | try: 14 | login_manager = frappe.auth.LoginManager() 15 | login_manager.authenticate(user=args["username"], pwd=args["password"]) 16 | login_manager.post_login() 17 | except frappe.exceptions.AuthenticationError: 18 | frappe.clear_messages() 19 | frappe.local.response["message"] = { 20 | "key":0, 21 | "message":"Incorrect Username or Password" 22 | } 23 | return 24 | api_generate = generate_keys(frappe.session.user) 25 | frappe.db.commit() 26 | user = frappe.get_doc('User', frappe.session.user) 27 | cust = frappe.db.get_value("Customer", {"user": user.name}, "name") 28 | customer = frappe.get_doc("Customer", cust) 29 | address = frappe.get_doc("Address", customer.customer_primary_address) 30 | frappe.response["message"] = { 31 | "key":1, 32 | "message":"Success", 33 | #"sid":frappe.session.sid, 34 | "api_key":user.api_key, 35 | "api_secret":api_generate["api_secret"], 36 | "name":user.full_name, 37 | "dob":user.birth_date, 38 | "mobile_no":user.mobile_no, 39 | "email":user.email, 40 | "address": address.address_line1 or "", 41 | "city":address.city or "", 42 | "district": address.district or "", 43 | "refered_by":customer.refered_by or "", 44 | "gstin":customer.gstin or "", 45 | "pincode":address.pincode or "", 46 | "roles": [i[0] for i in frappe.db.sql("""SELECT DISTINCT a.role FROM `tabHas Role` as a inner join `tabUser` as b on a.parent = b.name WHERE a.parent = '{0}'""".format(user.name),as_list=1)], 47 | "welcome": welcome()["content"], 48 | "store": store()["content"] 49 | } 50 | 51 | @frappe.whitelist() 52 | def logout(): 53 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 54 | user = frappe.db.get_value("User", {"api_key": api_key}) 55 | 56 | login_manager = frappe.auth.LoginManager() 57 | login_manager.logout(user = user) 58 | generate_keys(user) 59 | return {"message": "Successfully Logged Out"} 60 | 61 | @frappe.whitelist(allow_guest=True) 62 | def send_otp(args): 63 | mobile_no = args["mobile_no"] 64 | message = "Not Success" 65 | if frappe.db.get_value("User", {"mobile_no": mobile_no}): 66 | message = "Success" 67 | return { 68 | "message": message 69 | } 70 | 71 | @frappe.whitelist(allow_guest=True) 72 | def reset_password(args): 73 | otp = args["otp"] 74 | new_password = args["new_password"] 75 | return { 76 | "message": "Success" 77 | } 78 | 79 | 80 | @frappe.whitelist() 81 | def add_referral(args): 82 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 83 | name = args["name"] 84 | mobile_no = args["mobile_no"] 85 | doc = frappe.new_doc("Referral") 86 | doc.refered_by = frappe.db.get_value("User", {"api_key": api_key}) 87 | doc.person_name = name 88 | doc.person_mobile = mobile_no 89 | doc.save(ignore_permissions=True) 90 | msg = "Hey! Get your discount on every order by installing the app" 91 | system_msg = frappe.db.get_value("App Settings", "App Settings", "share_message") 92 | if system_msg: 93 | msg = system_msg 94 | return{ 95 | "message": "Success", 96 | "share": msg 97 | } 98 | 99 | 100 | @frappe.whitelist(allow_guest=True) 101 | def get_referrals(args): 102 | mobile_no = args["mobile_no"] 103 | referred_by = frappe.db.sql(""" select CONCAT(c.customer_name, '-', u.mobile_no) from `tabCustomer` as c join `tabReferral` as r on c.user=r.refered_by join `tabUser` as u on c.user=u.name where r.person_mobile='{0}' """.format(mobile_no), as_list=1) 104 | referred_by = [i[0] for i in referred_by] or ["Senbagam Paints"] 105 | return { 106 | "message": "Success", 107 | "refered_by": referred_by, 108 | "length": len(referred_by), 109 | } 110 | 111 | @frappe.whitelist(allow_guest=True) 112 | def signup(args): 113 | data = {"message":""} 114 | if not args["name"]: 115 | data["message"] = "Name cannot be null" 116 | return data 117 | 118 | if not args["mobile_no"]: 119 | data["message"] = "Mobile No cannot be null" 120 | return data 121 | 122 | if not args["email"]: 123 | data["message"] = "Email cannot be null" 124 | return data 125 | 126 | if not args["password"]: 127 | data["message"] = "Password cannot be null" 128 | return data 129 | 130 | if frappe.db.get_value("User", args["email"]): 131 | data["message"] = "Email Id Already Exists" 132 | return data 133 | 134 | if frappe.db.get_value("User", {"mobile_no": args["mobile_no"]}): 135 | data["message"] = "Mobile No Already Exists" 136 | return data 137 | 138 | user = frappe.new_doc("User") 139 | user.email = args["email"] 140 | user.first_name = args["name"] 141 | user.send_welcome_email = 0 142 | user.user_type = 'System User' 143 | user.mobile_no = args["mobile_no"] 144 | if args["dob"]: 145 | user.birth_date = args["dob"] 146 | user.save(ignore_permissions=True) 147 | user.new_password = args["password"] 148 | user.save(ignore_permissions = True) 149 | user.add_roles('System Manager') 150 | 151 | customer = frappe.new_doc("Customer") 152 | customer.customer_name = args["name"] 153 | customer.customer_type = "Individual" 154 | customer.customer_group = "Individual" 155 | customer.territory = "India" 156 | if args["gstin"]: 157 | customer.gstin = args["gstin"] 158 | if args["refered_by"]: 159 | customer.refered_by = args["refered_by"] 160 | customer.user = user.name 161 | customer.save(ignore_permissions = True) 162 | 163 | address = frappe.new_doc("Address") 164 | address.address_title = args["name"] 165 | address.address_line1 = args["address"] 166 | address.city = args["city"] 167 | address.district = args["district"] 168 | address.pincode = args["pincode"] 169 | address.append('links', { 170 | "link_doctype": "Customer", 171 | "link_name": customer.name 172 | }) 173 | address.save(ignore_permissions = True) 174 | 175 | customer.customer_primary_address = address.name 176 | customer.save(ignore_permissions = True) 177 | 178 | ref = frappe.new_doc("Referral Tree") 179 | ref.customer = customer.name 180 | ref.is_group = 1 181 | ref_no = args["refered_by"] if args["refered_by"] == "Senbagam Paints" else None 182 | if not ref_no: 183 | mob_no = args["refered_by"].split("-")[1] 184 | usr = frappe.db.get_value("User", {"mobile_no":mob_no}) 185 | ref_no = frappe.db.get_value("Customer", {"user": usr}) 186 | ref.parent_referral_tree = ref_no 187 | ref.save(ignore_permissions=True) 188 | data["message"] = "Account Created, Please Login" 189 | return data 190 | 191 | 192 | @frappe.whitelist() 193 | def welcome(): 194 | data = {} 195 | today= date.today() 196 | raw = frappe.db.sql("select concat('http://', '{1}', image) as image, content, description from `tabWelcome` where is_active=1 and from_date <= '{0}' and to_date >= '{0}'".format(today, frappe.local.request.host), as_dict=True) 197 | data["message"] = "Success" 198 | data["content"] = raw 199 | return data 200 | 201 | 202 | @frappe.whitelist() 203 | def store(): 204 | data = {} 205 | raw = frappe.db.sql("select concat('http://', '{0}', image) as image, address, description from `tabStore` where is_active=1 ".format(frappe.local.request.host), as_dict=True) 206 | data["message"] = "Success" 207 | data["content"] = raw 208 | return data 209 | 210 | 211 | @frappe.whitelist() 212 | def add_quotation(args): 213 | # args = loads(args) 214 | now = datetime.now() 215 | current_time = now.strftime("%H:%M:%S") 216 | 217 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 218 | user = frappe.db.get_value("User", {"api_key": api_key}) 219 | customer = frappe.db.get_value("Customer", {"user": user}) 220 | doc = frappe.new_doc("Connector Quotation") 221 | doc.customer = customer 222 | doc.date = date.today() 223 | doc.time = current_time 224 | doc.status = "Pending" 225 | doc.is_synced = 0 226 | doc.retry_limit = 3 227 | for i in args: 228 | doc.append("items", { 229 | "item_code": i.strip(), 230 | "qty": args[i] 231 | }) 232 | doc.save(ignore_permissions=True) 233 | return {"message": "Quotation Request Added", "args":args} 234 | 235 | 236 | @frappe.whitelist() 237 | def get_wallet(): 238 | data = {} 239 | data["balance"] = 0.0 240 | 241 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 242 | user = frappe.db.get_value("User", {"api_key": api_key}) 243 | customer = frappe.db.get_value("Customer", {"user": user}) 244 | 245 | si = frappe.db.sql(""" select name, posting_date as date, CAST(rounded_total as varchar(10)) as amount, CAST(rounded_total * 5 /100 as varchar(10)) as saving from `tabSales Invoice` where docstatus=1 and customer='{0}' order by creation desc""".format(customer), as_dict=True) 246 | qt = [] 247 | for i in frappe.db.sql(""" select name from `tabQuotation` where docstatus=1 and party_name='{0}' order by creation desc""".format(customer), as_dict=True): 248 | doc = frappe.get_doc("Quotation", i.name) 249 | qt.append({ 250 | "date": doc.transaction_date, 251 | "name": i.name, 252 | "amount": str(doc.rounded_total), 253 | "item": ", ".join([j.item_code for j in doc.items]) 254 | }) 255 | 256 | ledger = [ 257 | { 258 | "date": "YYYY-MM-DD", 259 | "voucher_no":"Voucher 1", 260 | "amount": "150", 261 | "amount_earned": "15", 262 | "credited_amount": "7", 263 | "balance": "8" 264 | }, 265 | { 266 | "date": "YYYY-MM-DD", 267 | "voucher_no":"Voucher 2", 268 | "amount": "300", 269 | "amount_earned": "30", 270 | "credited_amount": "20", 271 | "balance": "10" 272 | }, 273 | { 274 | "date": "YYYY-MM-DD", 275 | "voucher_no": "Voucher 3", 276 | "amount": "1000", 277 | "amount_earned": "50", 278 | "credited_amount": "0", 279 | "balance": "50" 280 | }, 281 | { 282 | "date": "YYYY-MM-DD", 283 | "voucher_no": "Voucher 4", 284 | "amount": "5000", 285 | "amount_earned": "250", 286 | "credited_amount": "50", 287 | "balance": "200" 288 | } 289 | ] 290 | 291 | data["sales_invoice"] = si 292 | data["quotation"] = qt 293 | data["ledger"] = ledger 294 | data["message"] = "Success" 295 | return data 296 | 297 | @frappe.whitelist() 298 | def get_referral_tree(): 299 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 300 | user = frappe.db.get_value("User", {"api_key": api_key}) 301 | customer = frappe.db.get_value("Customer", {"user": user}) 302 | # customer = "Senbagam Paints" 303 | tree = get_tree(customer, 1) 304 | return tree 305 | 306 | def get_tree(customer, level): 307 | if not level <= 2: 308 | return [] 309 | data = [i.name for i in frappe.db.get_list("Referral Tree", {"parent_referral_tree": customer})] 310 | ret = {} 311 | ch = {} 312 | if level == 1: 313 | ret["parent"] = [customer] 314 | ret[customer] = data 315 | for i in data: 316 | if i and level != 2: 317 | ch[i] = get_tree(i, level+1) 318 | ret = {**ret, **ch[i]} 319 | 320 | return ret 321 | 322 | @frappe.whitelist() 323 | def add_bank(args): 324 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 325 | user = frappe.db.get_value("User", {"api_key": api_key}) 326 | customer = frappe.db.get_value("Customer", {"user": user}) 327 | 328 | doc = frappe.new_doc("Connector Bank Account") 329 | doc.bank_name = args["bank_name"] 330 | doc.account_holder_name = args["account_holder_name"] 331 | doc.account_no = args["account_no"] 332 | doc.ifsc_code = args["ifsc_code"] 333 | doc.customer = customer 334 | doc.status = "Pending" 335 | doc.retry_limit = 3 336 | doc.is_synced = 0 337 | doc.save(ignore_permissions=True) 338 | return {"message": "Success"} 339 | 340 | @frappe.whitelist() 341 | def get_bank_details(): 342 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 343 | user = frappe.db.get_value("User", {"api_key": api_key}) 344 | customer = frappe.db.get_value("Customer", {"user": user}) 345 | data = frappe.db.sql(""" select bank, account_name as account_holder_name, bank_account_no as account_no, branch_code as ifsc_code from `tabBank Account` where party='{0}' """.format(customer), as_dict=True) 346 | return {"message": "Success", "data":data} 347 | 348 | 349 | def get_customer(api_key): 350 | user = frappe.db.get_value("User", {"api_key": api_key}) 351 | customer = frappe.db.get_value("Customer", {"user": user}) 352 | return customer 353 | 354 | @frappe.whitelist() 355 | def add_feedback(args): 356 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 357 | customer = get_customer(api_key) 358 | 359 | doc= frappe.new_doc("Customer Feedback") 360 | doc.customer = customer 361 | doc.feedback = args["feedback"] 362 | doc.save(ignore_permissions = True) 363 | return {"message": "Feedback Added Successfully"} 364 | 365 | @frappe.whitelist() 366 | def add_qr(args): 367 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 368 | customer = get_customer(api_key) 369 | 370 | doc= frappe.new_doc("Scanned QR") 371 | doc.customer = customer 372 | doc.qr_code = args["qr_code"] 373 | doc.save(ignore_permissions = True) 374 | return {"message": "Reward Claimed"} 375 | 376 | @frappe.whitelist() 377 | def get_item(): 378 | data = frappe.db.sql(""" select name as section_name, description from `tabProduct Type` """, as_dict=True) 379 | items = [] 380 | for i in range(len(data)): 381 | item = frappe.db.sql(""" select it.name as item_code, it.item_name as item_name, it.image as image, it.show_price as show_price, IFNULL(ip.price_list_rate, 0) as price, false as selected from `tabItem` as it left join `tabItem Price` as ip on it.name=ip.item_code where it.disabled=0 and it.product_type=%s """, (data[i].section_name), as_dict=1) 382 | items.append(item) 383 | return {"section": data, "items":items} 384 | 385 | @frappe.whitelist() 386 | def update_profile(args): 387 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 388 | user = frappe.db.get_value("User", {"api_key": api_key}) 389 | 390 | user = frappe.get_doc("User", user) 391 | if user.first_name != args["name"]: 392 | user.first_name = args["name"] 393 | if user.birth_date != args["dob"]: 394 | user.birth_date = args["dob"] 395 | if user.mobile_no != args["mobile_no"]: 396 | user.mobile_no = args["mobile_no"] 397 | user.save(ignore_permissions=True) 398 | 399 | customer = frappe.db.get_value("Customer", {"user": user.name}) 400 | customer = frappe.get_doc("Customer", customer) 401 | if customer.customer_name != args["name"]: 402 | customer.customer_name = args["name"] 403 | if customer.gstin != args["gstin"]: 404 | customer.gstin = args["gstin"] 405 | customer.save(ignore_permissions=True) 406 | 407 | address = frappe.get_doc("Address", customer.customer_primary_address) 408 | if address.address_line1 != args["address"]: 409 | address.address_line1 = args["address"] 410 | if address.city != args["city"]: 411 | address.city = args["city"] 412 | if address.district != args["district"]: 413 | address.district = args["district"] 414 | if address.pincode != args["pincode"]: 415 | address.pincode = args["pincode"] 416 | address.save(ignore_permissions=True) 417 | return {"message": "Profile Updated!"} 418 | 419 | 420 | @frappe.whitelist() 421 | def get_profile(): 422 | api_key = frappe.request.headers.get('Authorization').split(' ')[1].split(':')[0] 423 | user = frappe.db.get_value("User", {"api_key": api_key}) 424 | user = frappe.get_doc("User", user) 425 | cust = frappe.db.get_value("Customer", {"user": user.name}, "name") 426 | customer = frappe.get_doc("Customer", cust) 427 | address = frappe.get_doc("Address", customer.customer_primary_address) 428 | frappe.response["message"] = { 429 | "message":"Success", 430 | "name":user.full_name, 431 | "dob":user.birth_date, 432 | "mobile_no":user.mobile_no, 433 | "email":user.email, 434 | "address": address.address_line1 or "", 435 | "city":address.city or "", 436 | "district": address.district or "", 437 | "refered_by":customer.refered_by or "", 438 | "gstin":customer.gstin or "", 439 | "pincode":address.pincode or "", 440 | "roles": [i[0] for i in frappe.db.sql("""SELECT DISTINCT a.role FROM `tabHas Role` as a inner join `tabUser` as b on a.parent = b.name WHERE a.parent = '{0}'""".format(user.name),as_list=1)] 441 | } 442 | 443 | 444 | @frappe.whitelist() 445 | def get_about(): 446 | return {"company":frappe.db.get_value("App Settings", "App Settings", "company_name"), "about": frappe.db.get_value("App Settings", "App Settings", "about_us")} 447 | -------------------------------------------------------------------------------- /senbagam_api/senbagam_api/custom/customer.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_fields": [ 3 | { 4 | "_assign": null, 5 | "_comments": null, 6 | "_liked_by": null, 7 | "_user_tags": null, 8 | "allow_in_quick_entry": 0, 9 | "allow_on_submit": 0, 10 | "bold": 0, 11 | "collapsible": 0, 12 | "collapsible_depends_on": null, 13 | "columns": 0, 14 | "creation": "2021-12-28 17:58:03.272307", 15 | "default": "Unregistered", 16 | "depends_on": null, 17 | "description": null, 18 | "docstatus": 0, 19 | "dt": "Customer", 20 | "fetch_from": null, 21 | "fetch_if_empty": 0, 22 | "fieldname": "gst_category", 23 | "fieldtype": "Select", 24 | "hidden": 0, 25 | "hide_border": 0, 26 | "hide_days": 0, 27 | "hide_seconds": 0, 28 | "idx": 7, 29 | "ignore_user_permissions": 0, 30 | "ignore_xss_filter": 0, 31 | "in_global_search": 0, 32 | "in_list_view": 0, 33 | "in_preview": 0, 34 | "in_standard_filter": 0, 35 | "insert_after": "customer_type", 36 | "label": "GST Category", 37 | "length": 0, 38 | "mandatory_depends_on": null, 39 | "modified": "2021-12-28 17:58:03.272307", 40 | "modified_by": "Administrator", 41 | "name": "Customer-gst_category", 42 | "no_copy": 0, 43 | "non_negative": 0, 44 | "options": "Registered Regular\nRegistered Composition\nUnregistered\nSEZ\nOverseas\nConsumer\nDeemed Export\nUIN Holders", 45 | "owner": "Administrator", 46 | "parent": null, 47 | "parentfield": null, 48 | "parenttype": null, 49 | "permlevel": 0, 50 | "precision": "", 51 | "print_hide": 0, 52 | "print_hide_if_no_value": 0, 53 | "print_width": null, 54 | "read_only": 0, 55 | "read_only_depends_on": null, 56 | "report_hide": 0, 57 | "reqd": 0, 58 | "search_index": 0, 59 | "translatable": 1, 60 | "unique": 0, 61 | "width": null 62 | }, 63 | { 64 | "_assign": null, 65 | "_comments": null, 66 | "_liked_by": null, 67 | "_user_tags": null, 68 | "allow_in_quick_entry": 0, 69 | "allow_on_submit": 0, 70 | "bold": 0, 71 | "collapsible": 0, 72 | "collapsible_depends_on": null, 73 | "columns": 0, 74 | "creation": "2021-12-28 17:58:03.492664", 75 | "default": null, 76 | "depends_on": "eval:in_list([\"SEZ\", \"Overseas\", \"Deemed Export\"], doc.gst_category)", 77 | "description": null, 78 | "docstatus": 0, 79 | "dt": "Customer", 80 | "fetch_from": null, 81 | "fetch_if_empty": 0, 82 | "fieldname": "export_type", 83 | "fieldtype": "Select", 84 | "hidden": 0, 85 | "hide_border": 0, 86 | "hide_days": 0, 87 | "hide_seconds": 0, 88 | "idx": 8, 89 | "ignore_user_permissions": 0, 90 | "ignore_xss_filter": 0, 91 | "in_global_search": 0, 92 | "in_list_view": 0, 93 | "in_preview": 0, 94 | "in_standard_filter": 0, 95 | "insert_after": "gstin", 96 | "label": "Export Type", 97 | "length": 0, 98 | "mandatory_depends_on": "eval:in_list([\"SEZ\", \"Overseas\", \"Deemed Export\"], doc.gst_category)", 99 | "modified": "2021-12-28 17:58:03.492664", 100 | "modified_by": "Administrator", 101 | "name": "Customer-export_type", 102 | "no_copy": 0, 103 | "non_negative": 0, 104 | "options": "\nWith Payment of Tax\nWithout Payment of Tax", 105 | "owner": "Administrator", 106 | "parent": null, 107 | "parentfield": null, 108 | "parenttype": null, 109 | "permlevel": 0, 110 | "precision": "", 111 | "print_hide": 0, 112 | "print_hide_if_no_value": 0, 113 | "print_width": null, 114 | "read_only": 0, 115 | "read_only_depends_on": null, 116 | "report_hide": 0, 117 | "reqd": 0, 118 | "search_index": 0, 119 | "translatable": 1, 120 | "unique": 0, 121 | "width": null 122 | }, 123 | { 124 | "_assign": null, 125 | "_comments": null, 126 | "_liked_by": null, 127 | "_user_tags": null, 128 | "allow_in_quick_entry": 0, 129 | "allow_on_submit": 0, 130 | "bold": 0, 131 | "collapsible": 0, 132 | "collapsible_depends_on": null, 133 | "columns": 0, 134 | "creation": "2022-02-03 13:45:27.885746", 135 | "default": null, 136 | "depends_on": null, 137 | "description": null, 138 | "docstatus": 0, 139 | "dt": "Customer", 140 | "fetch_from": null, 141 | "fetch_if_empty": 0, 142 | "fieldname": "refered_by", 143 | "fieldtype": "Data", 144 | "hidden": 0, 145 | "hide_border": 0, 146 | "hide_days": 0, 147 | "hide_seconds": 0, 148 | "idx": 13, 149 | "ignore_user_permissions": 0, 150 | "ignore_xss_filter": 0, 151 | "in_global_search": 0, 152 | "in_list_view": 0, 153 | "in_preview": 0, 154 | "in_standard_filter": 0, 155 | "insert_after": "default_bank_account", 156 | "label": "Refered By", 157 | "length": 0, 158 | "mandatory_depends_on": null, 159 | "modified": "2022-02-03 13:45:27.885746", 160 | "modified_by": "Administrator", 161 | "name": "Customer-refered_by", 162 | "no_copy": 0, 163 | "non_negative": 0, 164 | "options": null, 165 | "owner": "Administrator", 166 | "parent": null, 167 | "parentfield": null, 168 | "parenttype": null, 169 | "permlevel": 0, 170 | "precision": "", 171 | "print_hide": 0, 172 | "print_hide_if_no_value": 0, 173 | "print_width": null, 174 | "read_only": 0, 175 | "read_only_depends_on": null, 176 | "report_hide": 0, 177 | "reqd": 0, 178 | "search_index": 0, 179 | "translatable": 0, 180 | "unique": 0, 181 | "width": null 182 | }, 183 | { 184 | "_assign": null, 185 | "_comments": null, 186 | "_liked_by": null, 187 | "_user_tags": null, 188 | "allow_in_quick_entry": 0, 189 | "allow_on_submit": 0, 190 | "bold": 0, 191 | "collapsible": 0, 192 | "collapsible_depends_on": null, 193 | "columns": 0, 194 | "creation": "2022-02-03 13:48:26.877658", 195 | "default": "", 196 | "depends_on": null, 197 | "description": null, 198 | "docstatus": 0, 199 | "dt": "Customer", 200 | "fetch_from": null, 201 | "fetch_if_empty": 0, 202 | "fieldname": "user", 203 | "fieldtype": "Link", 204 | "hidden": 0, 205 | "hide_border": 0, 206 | "hide_days": 0, 207 | "hide_seconds": 0, 208 | "idx": 17, 209 | "ignore_user_permissions": 0, 210 | "ignore_xss_filter": 0, 211 | "in_global_search": 0, 212 | "in_list_view": 0, 213 | "in_preview": 0, 214 | "in_standard_filter": 0, 215 | "insert_after": "image", 216 | "label": "User", 217 | "length": 0, 218 | "mandatory_depends_on": null, 219 | "modified": "2022-02-03 13:48:26.877658", 220 | "modified_by": "Administrator", 221 | "name": "Customer-user", 222 | "no_copy": 0, 223 | "non_negative": 0, 224 | "options": "User", 225 | "owner": "Administrator", 226 | "parent": null, 227 | "parentfield": null, 228 | "parenttype": null, 229 | "permlevel": 0, 230 | "precision": "", 231 | "print_hide": 0, 232 | "print_hide_if_no_value": 0, 233 | "print_width": null, 234 | "read_only": 0, 235 | "read_only_depends_on": null, 236 | "report_hide": 0, 237 | "reqd": 0, 238 | "search_index": 0, 239 | "translatable": 0, 240 | "unique": 0, 241 | "width": null 242 | }, 243 | { 244 | "_assign": null, 245 | "_comments": null, 246 | "_liked_by": null, 247 | "_user_tags": null, 248 | "allow_in_quick_entry": 0, 249 | "allow_on_submit": 0, 250 | "bold": 0, 251 | "collapsible": 0, 252 | "collapsible_depends_on": null, 253 | "columns": 0, 254 | "creation": "2022-02-03 14:03:27.458574", 255 | "default": null, 256 | "depends_on": null, 257 | "description": null, 258 | "docstatus": 0, 259 | "dt": "Customer", 260 | "fetch_from": null, 261 | "fetch_if_empty": 0, 262 | "fieldname": "gstin", 263 | "fieldtype": "Data", 264 | "hidden": 0, 265 | "hide_border": 0, 266 | "hide_days": 0, 267 | "hide_seconds": 0, 268 | "idx": 7, 269 | "ignore_user_permissions": 0, 270 | "ignore_xss_filter": 0, 271 | "in_global_search": 0, 272 | "in_list_view": 0, 273 | "in_preview": 0, 274 | "in_standard_filter": 0, 275 | "insert_after": "gst_category", 276 | "label": "GSTIN", 277 | "length": 0, 278 | "mandatory_depends_on": null, 279 | "modified": "2022-02-03 14:03:27.458574", 280 | "modified_by": "Administrator", 281 | "name": "Customer-gstin", 282 | "no_copy": 0, 283 | "non_negative": 0, 284 | "options": null, 285 | "owner": "Administrator", 286 | "parent": null, 287 | "parentfield": null, 288 | "parenttype": null, 289 | "permlevel": 0, 290 | "precision": "", 291 | "print_hide": 0, 292 | "print_hide_if_no_value": 0, 293 | "print_width": null, 294 | "read_only": 0, 295 | "read_only_depends_on": null, 296 | "report_hide": 0, 297 | "reqd": 0, 298 | "search_index": 0, 299 | "translatable": 0, 300 | "unique": 0, 301 | "width": null 302 | } 303 | ], 304 | "custom_perms": [ 305 | { 306 | "_assign": null, 307 | "_comments": null, 308 | "_liked_by": null, 309 | "_user_tags": null, 310 | "amend": 0, 311 | "cancel": 0, 312 | "create": 0, 313 | "creation": "2013-06-11 14:26:44", 314 | "delete": 0, 315 | "docstatus": 0, 316 | "email": 0, 317 | "export": 0, 318 | "idx": 2, 319 | "if_owner": 0, 320 | "import": 0, 321 | "modified": "2021-12-28 16:48:10.837534", 322 | "modified_by": "Administrator", 323 | "name": "62a1fd7598", 324 | "owner": "Administrator", 325 | "parent": "Customer", 326 | "parentfield": "permissions", 327 | "parenttype": "DocType", 328 | "permlevel": 1, 329 | "print": 0, 330 | "read": 1, 331 | "report": 0, 332 | "role": "Sales User", 333 | "select": 0, 334 | "set_user_permissions": 0, 335 | "share": 0, 336 | "submit": 0, 337 | "write": 0 338 | }, 339 | { 340 | "_assign": null, 341 | "_comments": null, 342 | "_liked_by": null, 343 | "_user_tags": null, 344 | "amend": 0, 345 | "cancel": 0, 346 | "create": 1, 347 | "creation": "2013-06-11 14:26:44", 348 | "delete": 0, 349 | "docstatus": 0, 350 | "email": 1, 351 | "export": 0, 352 | "idx": 1, 353 | "if_owner": 0, 354 | "import": 0, 355 | "modified": "2021-12-28 16:48:10.861862", 356 | "modified_by": "Administrator", 357 | "name": "aaf85ecaa0", 358 | "owner": "Administrator", 359 | "parent": "Customer", 360 | "parentfield": "permissions", 361 | "parenttype": "DocType", 362 | "permlevel": 0, 363 | "print": 1, 364 | "read": 1, 365 | "report": 1, 366 | "role": "Sales User", 367 | "select": 0, 368 | "set_user_permissions": 0, 369 | "share": 1, 370 | "submit": 0, 371 | "write": 1 372 | }, 373 | { 374 | "_assign": null, 375 | "_comments": null, 376 | "_liked_by": null, 377 | "_user_tags": null, 378 | "amend": 0, 379 | "cancel": 0, 380 | "create": 0, 381 | "creation": "2013-06-11 14:26:44", 382 | "delete": 0, 383 | "docstatus": 0, 384 | "email": 1, 385 | "export": 0, 386 | "idx": 6, 387 | "if_owner": 0, 388 | "import": 0, 389 | "modified": "2021-12-28 16:48:10.882800", 390 | "modified_by": "Administrator", 391 | "name": "27deb6293c", 392 | "owner": "Administrator", 393 | "parent": "Customer", 394 | "parentfield": "permissions", 395 | "parenttype": "DocType", 396 | "permlevel": 0, 397 | "print": 1, 398 | "read": 1, 399 | "report": 1, 400 | "role": "Stock User", 401 | "select": 0, 402 | "set_user_permissions": 0, 403 | "share": 0, 404 | "submit": 0, 405 | "write": 0 406 | }, 407 | { 408 | "_assign": null, 409 | "_comments": null, 410 | "_liked_by": null, 411 | "_user_tags": null, 412 | "amend": 0, 413 | "cancel": 0, 414 | "create": 0, 415 | "creation": "2013-06-11 14:26:44", 416 | "delete": 0, 417 | "docstatus": 0, 418 | "email": 0, 419 | "export": 0, 420 | "idx": 5, 421 | "if_owner": 0, 422 | "import": 0, 423 | "modified": "2021-12-28 16:48:10.905810", 424 | "modified_by": "Administrator", 425 | "name": "524fcc1d91", 426 | "owner": "Administrator", 427 | "parent": "Customer", 428 | "parentfield": "permissions", 429 | "parenttype": "DocType", 430 | "permlevel": 1, 431 | "print": 0, 432 | "read": 1, 433 | "report": 0, 434 | "role": "Sales Master Manager", 435 | "select": 0, 436 | "set_user_permissions": 0, 437 | "share": 0, 438 | "submit": 0, 439 | "write": 1 440 | }, 441 | { 442 | "_assign": null, 443 | "_comments": null, 444 | "_liked_by": null, 445 | "_user_tags": null, 446 | "amend": 0, 447 | "cancel": 0, 448 | "create": 0, 449 | "creation": "2013-06-11 14:26:44", 450 | "delete": 0, 451 | "docstatus": 0, 452 | "email": 1, 453 | "export": 0, 454 | "idx": 7, 455 | "if_owner": 0, 456 | "import": 0, 457 | "modified": "2021-12-28 16:48:10.926098", 458 | "modified_by": "Administrator", 459 | "name": "a0bd6c1291", 460 | "owner": "Administrator", 461 | "parent": "Customer", 462 | "parentfield": "permissions", 463 | "parenttype": "DocType", 464 | "permlevel": 0, 465 | "print": 1, 466 | "read": 1, 467 | "report": 1, 468 | "role": "Stock Manager", 469 | "select": 0, 470 | "set_user_permissions": 0, 471 | "share": 0, 472 | "submit": 0, 473 | "write": 0 474 | }, 475 | { 476 | "_assign": null, 477 | "_comments": null, 478 | "_liked_by": null, 479 | "_user_tags": null, 480 | "amend": 0, 481 | "cancel": 0, 482 | "create": 0, 483 | "creation": "2013-06-11 14:26:44", 484 | "delete": 0, 485 | "docstatus": 0, 486 | "email": 1, 487 | "export": 0, 488 | "idx": 8, 489 | "if_owner": 0, 490 | "import": 0, 491 | "modified": "2021-12-28 16:48:10.949896", 492 | "modified_by": "Administrator", 493 | "name": "56ba65c5e8", 494 | "owner": "Administrator", 495 | "parent": "Customer", 496 | "parentfield": "permissions", 497 | "parenttype": "DocType", 498 | "permlevel": 0, 499 | "print": 1, 500 | "read": 1, 501 | "report": 1, 502 | "role": "Accounts User", 503 | "select": 0, 504 | "set_user_permissions": 0, 505 | "share": 0, 506 | "submit": 0, 507 | "write": 0 508 | }, 509 | { 510 | "_assign": null, 511 | "_comments": null, 512 | "_liked_by": null, 513 | "_user_tags": null, 514 | "amend": 0, 515 | "cancel": 0, 516 | "create": 0, 517 | "creation": "2013-06-11 14:26:44", 518 | "delete": 0, 519 | "docstatus": 0, 520 | "email": 1, 521 | "export": 0, 522 | "idx": 3, 523 | "if_owner": 0, 524 | "import": 0, 525 | "modified": "2021-12-28 16:48:10.971090", 526 | "modified_by": "Administrator", 527 | "name": "aa85040aef", 528 | "owner": "Administrator", 529 | "parent": "Customer", 530 | "parentfield": "permissions", 531 | "parenttype": "DocType", 532 | "permlevel": 0, 533 | "print": 1, 534 | "read": 1, 535 | "report": 1, 536 | "role": "Sales Manager", 537 | "select": 0, 538 | "set_user_permissions": 0, 539 | "share": 0, 540 | "submit": 0, 541 | "write": 0 542 | }, 543 | { 544 | "_assign": null, 545 | "_comments": null, 546 | "_liked_by": null, 547 | "_user_tags": null, 548 | "amend": 0, 549 | "cancel": 0, 550 | "create": 1, 551 | "creation": "2013-06-11 14:26:44", 552 | "delete": 1, 553 | "docstatus": 0, 554 | "email": 1, 555 | "export": 1, 556 | "idx": 4, 557 | "if_owner": 0, 558 | "import": 1, 559 | "modified": "2021-12-28 16:48:10.992837", 560 | "modified_by": "Administrator", 561 | "name": "d53a36ea78", 562 | "owner": "Administrator", 563 | "parent": "Customer", 564 | "parentfield": "permissions", 565 | "parenttype": "DocType", 566 | "permlevel": 0, 567 | "print": 1, 568 | "read": 1, 569 | "report": 1, 570 | "role": "Sales Master Manager", 571 | "select": 0, 572 | "set_user_permissions": 1, 573 | "share": 1, 574 | "submit": 0, 575 | "write": 1 576 | }, 577 | { 578 | "_assign": null, 579 | "_comments": null, 580 | "_liked_by": null, 581 | "_user_tags": null, 582 | "amend": 0, 583 | "cancel": 0, 584 | "create": 0, 585 | "creation": "2013-06-11 14:26:44", 586 | "delete": 0, 587 | "docstatus": 0, 588 | "email": 1, 589 | "export": 0, 590 | "idx": 9, 591 | "if_owner": 0, 592 | "import": 0, 593 | "modified": "2021-12-28 16:48:11.008826", 594 | "modified_by": "Administrator", 595 | "name": "944810abae", 596 | "owner": "Administrator", 597 | "parent": "Customer", 598 | "parentfield": "permissions", 599 | "parenttype": "DocType", 600 | "permlevel": 0, 601 | "print": 1, 602 | "read": 1, 603 | "report": 1, 604 | "role": "Accounts Manager", 605 | "select": 0, 606 | "set_user_permissions": 0, 607 | "share": 0, 608 | "submit": 0, 609 | "write": 0 610 | }, 611 | { 612 | "_assign": null, 613 | "_comments": null, 614 | "_liked_by": null, 615 | "_user_tags": null, 616 | "amend": 0, 617 | "cancel": 0, 618 | "create": 0, 619 | "creation": "2021-12-28 16:48:11.031352", 620 | "delete": 0, 621 | "docstatus": 0, 622 | "email": 0, 623 | "export": 1, 624 | "idx": 0, 625 | "if_owner": 0, 626 | "import": 0, 627 | "modified": "2021-12-28 16:48:11.141926", 628 | "modified_by": "Administrator", 629 | "name": "62541aad74", 630 | "owner": "Administrator", 631 | "parent": "Customer", 632 | "parentfield": "permissions", 633 | "parenttype": "DocType", 634 | "permlevel": 0, 635 | "print": 0, 636 | "read": 0, 637 | "report": 0, 638 | "role": "Employee Self Service", 639 | "select": 1, 640 | "set_user_permissions": 0, 641 | "share": 0, 642 | "submit": 0, 643 | "write": 0 644 | } 645 | ], 646 | "doctype": "Customer", 647 | "property_setters": [ 648 | { 649 | "_assign": null, 650 | "_comments": null, 651 | "_liked_by": null, 652 | "_user_tags": null, 653 | "creation": "2021-12-28 17:56:51.929255", 654 | "default_value": null, 655 | "doc_type": "Customer", 656 | "docstatus": 0, 657 | "doctype_or_field": "DocField", 658 | "field_name": "naming_series", 659 | "idx": 0, 660 | "modified": "2021-12-28 17:56:51.929255", 661 | "modified_by": "Administrator", 662 | "name": "Customer-naming_series-hidden", 663 | "owner": "Administrator", 664 | "parent": null, 665 | "parentfield": null, 666 | "parenttype": null, 667 | "property": "hidden", 668 | "property_type": "Check", 669 | "row_name": null, 670 | "value": "1" 671 | }, 672 | { 673 | "_assign": null, 674 | "_comments": null, 675 | "_liked_by": null, 676 | "_user_tags": null, 677 | "creation": "2021-12-28 17:56:51.573731", 678 | "default_value": null, 679 | "doc_type": "Customer", 680 | "docstatus": 0, 681 | "doctype_or_field": "DocField", 682 | "field_name": "naming_series", 683 | "idx": 0, 684 | "modified": "2021-12-28 17:56:51.573731", 685 | "modified_by": "Administrator", 686 | "name": "Customer-naming_series-reqd", 687 | "owner": "Administrator", 688 | "parent": null, 689 | "parentfield": null, 690 | "parenttype": null, 691 | "property": "reqd", 692 | "property_type": "Check", 693 | "row_name": null, 694 | "value": "0" 695 | } 696 | ], 697 | "sync_on_migrate": 1 698 | } --------------------------------------------------------------------------------