2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 19:09:01 +00:00

incr: cleanup and import schemas

This commit is contained in:
18alantom 2022-03-23 14:07:00 +05:30
parent 02cacd5697
commit 879b677b3b
39 changed files with 626 additions and 930 deletions

View File

@ -4,11 +4,6 @@
"doctype": "DocType",
"isSingle": false,
"isTree": true,
"keywordFields": [
"name",
"rootType",
"accountType"
],
"fields": [
{
"fieldname": "name",
@ -22,11 +17,26 @@
"fieldtype": "Select",
"placeholder": "Root Type",
"options": [
"Asset",
"Liability",
"Equity",
"Income",
"Expense"
{
"value": "Asset",
"label": "Asset"
},
{
"value": "Liability",
"label": "Liability"
},
{
"value": "Equity",
"label": "Equity"
},
{
"value": "Income",
"label": "Income"
},
{
"value": "Expense",
"label": "Expense"
}
],
"required": true
},
@ -42,25 +52,82 @@
"placeholder": "Account Type",
"fieldtype": "Select",
"options": [
"Accumulated Depreciation",
"Bank",
"Cash",
"Chargeable",
"Cost of Goods Sold",
"Depreciation",
"Equity",
"Expense Account",
"Expenses Included In Valuation",
"Fixed Asset",
"Income Account",
"Payable",
"Receivable",
"Round Off",
"Stock",
"Stock Adjustment",
"Stock Received But Not Billed",
"Tax",
"Temporary"
{
"value": "Accumulated Depreciation",
"label": "Accumulated Depreciation"
},
{
"value": "Bank",
"label": "Bank"
},
{
"value": "Cash",
"label": "Cash"
},
{
"value": "Chargeable",
"label": "Chargeable"
},
{
"value": "Cost of Goods Sold",
"label": "Cost of Goods Sold"
},
{
"value": "Depreciation",
"label": "Depreciation"
},
{
"value": "Equity",
"label": "Equity"
},
{
"value": "Expense Account",
"label": "Expense Account"
},
{
"value": "Expenses Included In Valuation",
"label": "Expenses Included In Valuation"
},
{
"value": "Fixed Asset",
"label": "Fixed Asset"
},
{
"value": "Income Account",
"label": "Income Account"
},
{
"value": "Payable",
"label": "Payable"
},
{
"value": "Receivable",
"label": "Receivable"
},
{
"value": "Round Off",
"label": "Round Off"
},
{
"value": "Stock",
"label": "Stock"
},
{
"value": "Stock Adjustment",
"label": "Stock Adjustment"
},
{
"value": "Stock Received But Not Billed",
"label": "Stock Received But Not Billed"
},
{
"value": "Tax",
"label": "Tax"
},
{
"value": "Temporary",
"label": "Temporary"
}
]
},
{
@ -82,7 +149,8 @@
"accountType",
"isGroup"
],
"keywordFields": ["name", "rootType", "accountType"],
"treeSettings": {
"parentField": "parentAccount"
}
}
}

View File

@ -1,15 +1,8 @@
{
"name": "AccountingLedgerEntry",
"label": "Ledger Entry",
"naming": "autoincrement",
"doctype": "DocType",
"isSingle": false,
"isChild": false,
"keywordFields": [
"account",
"party",
"referenceName"
],
"fields": [
{
"fieldname": "date",
@ -23,11 +16,6 @@
"target": "Account",
"required": true
},
{
"fieldname": "description",
"label": "Description",
"fieldtype": "Text"
},
{
"fieldname": "party",
"label": "Party",
@ -44,11 +32,6 @@
"label": "Credit",
"fieldtype": "Currency"
},
{
"fieldname": "againstAccount",
"label": "Against Account",
"fieldtype": "Text"
},
{
"fieldname": "referenceType",
"label": "Ref. Type",
@ -69,19 +52,18 @@
"fieldname": "reverted",
"label": "Reverted",
"fieldtype": "Check",
"default": 0
"default": false
}
],
"quickEditFields": [
"date",
"account",
"description",
"party",
"debit",
"credit",
"againstAccount",
"referenceType",
"referenceName",
"balance"
]
],
"keywordFields": ["account", "party", "referenceName"]
}

View File

@ -1,12 +1,9 @@
{
"name": "AccountingSettings",
"label": "Accounting Settings",
"naming": "name",
"isSingle": true,
"isChild": false,
"isSubmittable": false,
"settings": null,
"keywordFields": [],
"fields": [
{
"label": "Company Name",
@ -53,10 +50,7 @@
"fieldname": "email",
"label": "Email",
"fieldtype": "Data",
"required": true,
"validate": {
"type": "email"
}
"required": true
},
{
"fieldname": "bankName",
@ -80,13 +74,7 @@
"fieldname": "setupComplete",
"label": "Setup Complete",
"fieldtype": "Check",
"default": 0
},
{
"fieldname": "gstin",
"label": "GSTIN",
"fieldtype": "Data",
"placeholder": "27AAAAA0000A1Z5"
"default": false
}
],
"quickEditFields": [
@ -96,7 +84,6 @@
"country",
"currency",
"fiscalYearStart",
"fiscalYearEnd",
"gstin"
"fiscalYearEnd"
]
}
}

View File

@ -1,16 +1,7 @@
{
"name": "Address",
"doctype": "DocType",
"regional": 1,
"label": "Address",
"isSingle": false,
"keywordFields": [
"addressLine1",
"addressLine2",
"city",
"state",
"country",
"postalCode"
],
"fields": [
{
"fieldname": "addressLine1",
@ -36,6 +27,7 @@
"fieldname": "state",
"label": "State",
"placeholder": "State",
"options": [],
"fieldtype": "AutoComplete"
},
{
@ -43,6 +35,7 @@
"label": "Country",
"placeholder": "Country",
"fieldtype": "AutoComplete",
"options": [],
"required": true
},
{
@ -73,12 +66,6 @@
"fieldtype": "Text",
"label": "Address Display",
"readOnly": true
},
{
"fieldname": "pos",
"label": "Place of Supply",
"fieldtype": "AutoComplete",
"placeholder": "Place of Supply"
}
],
"quickEditFields": [
@ -87,9 +74,14 @@
"city",
"state",
"country",
"postalCode",
"pos"
"postalCode"
],
"inlineEditDisplayField": "addressDisplay",
"augmented": 1
}
"keywordFields": [
"addressLine1",
"addressLine2",
"city",
"state",
"country",
"postalCode"
]
}

View File

@ -1,6 +1,6 @@
{
"name": "Color",
"doctype": "DocType",
"label": "Color",
"fields": [
{
"fieldname": "name",
@ -11,7 +11,8 @@
{
"fieldname": "hexvalue",
"fieldtype": "Data",
"label": "Hex Value"
"label": "Hex Value",
"required": true
}
]
}
}

View File

@ -4,24 +4,20 @@
"naming": "autoincrement",
"isSingle": true,
"isChild": false,
"keywordFields": [
"companyName"
],
"fields": [
{
"fieldname": "companyName",
"label": "Company Name",
"fieldtype": "Data",
"disabled": false,
"required": true
},
{
"fieldname": "companyAddress",
"label": "Company Address",
"fieldtype": "Link",
"disabled": false,
"required": true,
"target": "Address"
}
]
}
],
"keywordFields": ["companyName"]
}

View File

@ -1,87 +0,0 @@
{
"name": "Contact",
"doctype": "DocType",
"isSingle": false,
"naming": "autoincrement",
"pageSettings": {
"hideTitle": true
},
"titleField": "fullName",
"keywordFields": [
"fullName"
],
"fields": [
{
"fieldname": "fullName",
"label": "Full Name",
"fieldtype": "Data",
"required": true
},
{
"fieldname": "emailAddress",
"label": "Email Address",
"fieldtype": "Data"
},
{
"fieldname": "userId",
"label": "User ID",
"fieldtype": "Link",
"target": "User",
"hidden": true
},
{
"fieldname": "status",
"label": "Status",
"fieldtype": "Select",
"options": [
"Passive",
"Open",
"Replied"
]
},
{
"fieldname": "gender",
"label": "Gender",
"fieldtype": "Select",
"options": [
"Male",
"Female",
"Gender"
]
},
{
"fieldname": "mobileNumber",
"label": "Mobile Number",
"fieldtype": "Data"
},
{
"fieldname": "phone",
"label": "Phone",
"fieldtype": "Data"
}
],
"events": {},
"listSettings": {},
"layout": [
{
"columns": [
{
"fields": [
"fullName",
"emailAddress",
"userId",
"status"
]
},
{
"fields": [
"postalCode",
"gender",
"phone",
"mobileNumber"
]
}
]
}
]
}

View File

@ -1,16 +1,7 @@
{
"name": "Currency",
"label": "Currency",
"doctype": "DocType",
"isSingle": false,
"keywordFields": [
"name",
"symbol"
],
"quickEditFields": [
"name",
"symbol"
],
"fields": [
{
"fieldname": "name",
@ -38,5 +29,7 @@
"fieldname": "symbol",
"fieldtype": "Data"
}
]
}
],
"keywordFields": ["name", "symbol"],
"quickEditFields": ["name", "symbol"]
}

View File

@ -1,121 +1,5 @@
{
"name": "Customer",
"label": "Customer",
"basedOn": "Party",
"filters": {
"customer": 1
},
"actions": [
{
"label": "Create Invoice"
},
{
"label": "View Invoices"
}
],
"regional": 1,
"keywordFields": [
"name"
],
"fields": [
{
"fieldname": "name",
"label": "Name",
"fieldtype": "Data",
"required": true,
"placeholder": "Full Name"
},
{
"fieldname": "image",
"label": "Image",
"fieldtype": "AttachImage"
},
{
"fieldname": "customer",
"label": "Is Customer",
"fieldtype": "Check"
},
{
"fieldname": "gstin",
"label": "GSTIN No.",
"fieldtype": "Data"
},
{
"fieldname": "gstType",
"label": "GST Registration",
"placeholder": "GST Registration",
"fieldtype": "Select",
"default": "Unregistered",
"options": [
"Unregistered",
"Registered Regular",
"Consumer"
]
},
{
"fieldname": "supplier",
"label": "Is Supplier",
"fieldtype": "Check"
},
{
"fieldname": "defaultAccount",
"label": "Default Account",
"fieldtype": "Link",
"target": "Account"
},
{
"fieldname": "outstandingAmount",
"label": "Outstanding Amount",
"fieldtype": "Currency"
},
{
"fieldname": "currency",
"label": "Currency",
"fieldtype": "Link",
"target": "Currency",
"placeholder": "INR"
},
{
"fieldname": "email",
"label": "Email",
"fieldtype": "Data",
"placeholder": "john@doe.com",
"validate": {
"type": "email"
}
},
{
"fieldname": "phone",
"label": "Phone",
"fieldtype": "Data",
"placeholder": "Phone",
"validate": {
"type": "phone"
}
},
{
"fieldname": "address",
"label": "Address",
"fieldtype": "Link",
"target": "Address",
"placeholder": "Click to create",
"inline": true
},
{
"fieldname": "addressDisplay",
"label": "Address Display",
"fieldtype": "Text",
"readOnly": true
}
],
"quickEditFields": [
"email",
"phone",
"address",
"defaultAccount",
"currency",
"gstType",
"gstin"
],
"augmented": 1
"extends": "Party"
}

View File

@ -1,5 +1,6 @@
{
"name": "GetStarted",
"label": "Get Started",
"isSingle": true,
"fields": [
{
@ -63,4 +64,4 @@
"fieldtype": "Check"
}
]
}
}

View File

@ -1,13 +1,7 @@
{
"name": "Item",
"label": "Item",
"doctype": "DocType",
"isSingle": false,
"regional": 1,
"keywordFields": [
"name",
"description"
],
"fields": [
{
"fieldname": "name",
@ -16,12 +10,6 @@
"placeholder": "Item Name",
"required": true
},
{
"fieldname": "hsnCode",
"label": "HSN/SAC",
"fieldtype": "Int",
"placeholder": "HSN/SAC Code"
},
{
"fieldname": "image",
"label": "Image",
@ -40,11 +28,26 @@
"placeholder": "Unit Type",
"default": "Unit",
"options": [
"Unit",
"Kg",
"Gram",
"Hour",
"Day"
{
"value": "Unit",
"name": "Unit"
},
{
"value": "Kg",
"name": "Kg"
},
{
"value": "Gram",
"label": "Gram"
},
{
"value": "Hour",
"label": "Hour"
},
{
"value": "Day",
"label": "Day"
}
]
},
{
@ -54,8 +57,14 @@
"fieldtype": "Select",
"default": "Product",
"options": [
"Product",
"Service"
{
"value": "Product",
"label": "Product"
},
{
"value": "Service",
"label": "Service"
}
]
},
{
@ -63,15 +72,19 @@
"label": "For",
"fieldtype": "Select",
"options": [
"purchases",
"sales",
"both"
{
"value": "purchases",
"label": "Purchases"
},
{
"value": "sales",
"label": "Sales"
},
{
"value": "both",
"label": "Both"
}
],
"map": {
"purchases": "Purchases",
"sales": "Sales",
"both": "Both"
},
"default": "both"
},
{
@ -80,11 +93,7 @@
"fieldtype": "Link",
"target": "Account",
"placeholder": "Income",
"required": true,
"disableCreation": true,
"formulaDependsOn": [
"itemType"
]
"required": true
},
{
"fieldname": "expenseAccount",
@ -92,11 +101,7 @@
"fieldtype": "Link",
"target": "Account",
"placeholder": "Expense",
"required": true,
"disableCreation": true,
"formulaDependsOn": [
"itemType"
]
"required": true
},
{
"fieldname": "tax",
@ -109,10 +114,15 @@
"fieldname": "rate",
"label": "Rate",
"fieldtype": "Currency"
},
{
"fieldname": "hsnCode",
"label": "HSN/SAC",
"fieldtype": "Int",
"placeholder": "HSN/SAC Code"
}
],
"quickEditFields": [
"hsnCode",
"rate",
"unit",
"itemType",
@ -120,15 +130,8 @@
"tax",
"description",
"incomeAccount",
"expenseAccount"
"expenseAccount",
"hsnCode"
],
"actions": [
{
"label": "New Invoice"
},
{
"label": "New Bill"
}
],
"augmented": 1
}
"keywordFields": ["name", "description"]
}

View File

@ -1,9 +1,7 @@
{
"label": "Journal Entry",
"name": "JournalEntry",
"doctype": "DocType",
"isSubmittable": true,
"settings": "JournalEntrySettings",
"fields": [
{
"fieldname": "entryType",
@ -11,31 +9,51 @@
"fieldtype": "Select",
"placeholder": "Entry Type",
"options": [
"Journal Entry",
"Bank Entry",
"Cash Entry",
"Credit Card Entry",
"Debit Note",
"Credit Note",
"Contra Entry",
"Excise Entry",
"Write Off Entry",
"Opening Entry",
"Depreciation Entry"
{
"value": "Journal Entry",
"label": "Journal Entry"
},
{
"value": "Bank Entry",
"label": "Bank Entry"
},
{
"value": "Cash Entry",
"label": "Cash Entry"
},
{
"value": "Credit Card Entry",
"label": "Credit Card Entry"
},
{
"value": "Debit Note",
"label": "Debit Note"
},
{
"value": "Credit Note",
"label": "Credit Note"
},
{
"value": "Contra Entry",
"label": "Contra Entry"
},
{
"value": "Excise Entry",
"label": "Excise Entry"
},
{
"value": "Write Off Entry",
"label": "Write Off Entry"
},
{
"value": "Opening Entry",
"label": "Opening Entry"
},
{
"value": "Depreciation Entry",
"label": "Depreciation Entry"
}
],
"map": {
"Journal Entry": "Journal Entry",
"Bank Entry": "Bank Entry",
"Cash Entry": "Cash Entry",
"Credit Card Entry": "Credit Card Entry",
"Debit Note": "Debit Note",
"Credit Note": "Credit Note",
"Contra Entry": "Contra Entry",
"Excise Entry": "Excise Entry",
"Write Off Entry": "Write Off Entry",
"Opening Entry": "Opening Entry",
"Depreciation Entry": "Depreciation Entry"
},
"required": true
},
{
@ -54,7 +72,7 @@
"fieldname": "accounts",
"label": "Account Entries",
"fieldtype": "Table",
"childtype": "JournalEntryAccount",
"target": "JournalEntryAccount",
"required": true
},
{
@ -73,13 +91,6 @@
"fieldtype": "Text",
"placeholder": "User Remark"
},
{
"fieldname": "cancelled",
"label": "Cancelled",
"fieldtype": "Check",
"default": 0,
"readOnly": true
},
{
"fieldname": "numberSeries",
"label": "Number Series",
@ -88,10 +99,5 @@
"required": true,
"default": "JV-"
}
],
"actions": [
{
"label": "Ledger Entries"
}
]
}

View File

@ -1,5 +1,6 @@
{
"name": "JournalEntryAccount",
"label": "Journal Entry Account",
"isChild": true,
"fields": [
{
@ -22,9 +23,5 @@
"fieldtype": "Currency"
}
],
"tableFields": [
"account",
"debit",
"credit"
]
"tableFields": ["account", "debit", "credit"]
}

View File

@ -1,9 +0,0 @@
{
"name": "JournalEntrySettings",
"label": "Journal Entry Setting",
"doctype": "DocType",
"isSingle": true,
"isChild": false,
"keywordFields": [],
"fields": []
}

View File

@ -1,10 +1,8 @@
{
"name": "NumberSeries",
"label": "Number Series",
"doctype": "DocType",
"isSingle": false,
"isChild": false,
"keywordFields": [],
"fields": [
{
"fieldname": "name",
@ -32,29 +30,23 @@
"label": "Reference Type",
"fieldtype": "Select",
"options": [
"SalesInvoice",
"PurchaseInvoice",
"Payment",
"JournalEntry",
"Quotation",
"SalesOrder",
"Fulfillment",
"PurchaseOrder",
"PurchaseReceipt",
"-"
{
"value": "SalesInvoice",
"label": "Invoice"
},
{
"value": "PurchaseInvoice",
"label": "Bill"
},
{
"value": "Payment",
"label": "Payment"
},
{
"value": "JournalEntry",
"label": "Journal Entry"
}
],
"map": {
"SalesInvoice": "Invoice",
"PurchaseInvoice": "Bill",
"Payment": "Payment",
"JournalEntry": "Journal Entry",
"Quotation": "Quotation",
"SalesOrder": "SalesOrder",
"Fulfillment": "Fulfillment",
"PurchaseOrder": "PurchaseOrder",
"PurchaseReceipt": "PurchaseReceipt",
"-": "None"
},
"default": "-",
"required": true,
"readOnly": true
@ -67,9 +59,6 @@
"readOnly": true
}
],
"quickEditFields": [
"start",
"padZeros",
"referenceType"
]
}
"quickEditFields": ["start", "padZeros", "referenceType"],
"keywordFields": []
}

View File

@ -1,10 +1,7 @@
{
"name": "Party",
"label": "Party",
"regional": 1,
"keywordFields": [
"name"
],
"isAbstract": true,
"fields": [
{
"fieldname": "name",
@ -18,33 +15,6 @@
"label": "Image",
"fieldtype": "AttachImage"
},
{
"fieldname": "customer",
"label": "Is Customer",
"fieldtype": "Check"
},
{
"fieldname": "gstin",
"label": "GSTIN No.",
"fieldtype": "Data"
},
{
"fieldname": "gstType",
"label": "GST Registration",
"placeholder": "GST Registration",
"fieldtype": "Select",
"default": "Unregistered",
"options": [
"Unregistered",
"Registered Regular",
"Consumer"
]
},
{
"fieldname": "supplier",
"label": "Is Supplier",
"fieldtype": "Check"
},
{
"fieldname": "defaultAccount",
"label": "Default Account",
@ -67,19 +37,13 @@
"fieldname": "email",
"label": "Email",
"fieldtype": "Data",
"placeholder": "john@doe.com",
"validate": {
"type": "email"
}
"placeholder": "john@doe.com"
},
{
"fieldname": "phone",
"label": "Phone",
"fieldtype": "Data",
"placeholder": "Phone",
"validate": {
"type": "phone"
}
"placeholder": "Phone"
},
{
"fieldname": "address",
@ -88,12 +52,6 @@
"target": "Address",
"placeholder": "Click to create",
"inline": true
},
{
"fieldname": "addressDisplay",
"label": "Address Display",
"fieldtype": "Text",
"readOnly": true
}
],
"quickEditFields": [
@ -101,9 +59,7 @@
"phone",
"address",
"defaultAccount",
"currency",
"gstType",
"gstin"
"currency"
],
"augmented": 1
}
"keywordFields": ["name"]
}

View File

@ -4,7 +4,6 @@
"isSingle": false,
"isChild": false,
"isSubmittable": true,
"keywordFields": [],
"settings": "PaymentSettings",
"fields": [
{
@ -18,7 +17,7 @@
"fieldname": "party",
"label": "Party",
"fieldtype": "Link",
"target": "Party",
"target": ["Customer", "Supplier"],
"required": true
},
{
@ -39,13 +38,15 @@
"fieldtype": "Select",
"placeholder": "Payment Type",
"options": [
"Receive",
"Pay"
{
"value": "Receive",
"label": "Receive"
},
{
"value": "Pay",
"label": "Pay"
}
],
"map": {
"Receive": "Receive",
"Pay": "Pay"
},
"required": true
},
{
@ -70,9 +71,18 @@
"placeholder": "Payment Method",
"fieldtype": "Select",
"options": [
"Cash",
"Cheque",
"Transfer"
{
"value": "Cash",
"label": "Cash"
},
{
"value": "Cheque",
"label": "Cheque"
},
{
"value": "Transfer",
"label": "Transfer"
}
],
"default": "Cash",
"required": true
@ -110,15 +120,8 @@
"fieldname": "for",
"label": "Payment Reference",
"fieldtype": "Table",
"childtype": "PaymentFor",
"target": "PaymentFor",
"required": false
},
{
"fieldname": "cancelled",
"label": "Cancelled",
"fieldtype": "Check",
"default": 0,
"readOnly": true
}
],
"quickEditFields": [
@ -135,85 +138,5 @@
"amount",
"writeoff",
"for"
],
"layout": [
{
"columns": [
{
"fields": [
"party",
"account"
]
},
{
"fields": [
"date",
"paymentAccount"
]
}
]
},
{
"columns": [
{
"fields": [
"paymentMethod"
]
},
{
"fields": [
"paymentType"
]
},
{
"fields": [
"referenceId"
]
}
]
},
{
"columns": [
{
"fields": [
"referenceDate"
]
},
{
"fields": [
"clearanceDate"
]
}
]
},
{
"columns": [
{
"fields": [
"for"
]
}
]
},
{
"columns": [
{
"fields": [
"amount",
"writeoff"
]
}
]
}
],
"actions": [
{
"label": "Ledger Entries"
}
],
"links": [
{
"label": "Ledger Entries"
}
]
}
}

View File

@ -3,12 +3,6 @@
"label": "Payment For",
"isSingle": false,
"isChild": true,
"keywordFields": [],
"tableFields": [
"referenceType",
"referenceName",
"amount"
],
"fields": [
{
"fieldname": "referenceType",
@ -16,13 +10,15 @@
"placeholder": "Type",
"fieldtype": "Select",
"options": [
"SalesInvoice",
"PurchaseInvoice"
{
"value": "SalesInvoice",
"label": "Sales Invoice"
},
{
"value": "PurchaseInvoice",
"label": "Purchase Invoice"
}
],
"map": {
"SalesInvoice": "Invoice",
"PurchaseInvoice": "Bill"
},
"required": true
},
{
@ -40,4 +36,4 @@
"required": true
}
]
}
}

View File

@ -1,8 +0,0 @@
{
"name": "PaymentSettings",
"label": "Payment Settings",
"isSingle": true,
"isChild": false,
"keywordFields": [],
"fields": []
}

View File

@ -17,10 +17,7 @@
"fieldname": "email",
"label": "Email",
"fieldtype": "Data",
"placeholder": "john@doe.com",
"validate": {
"type": "email"
}
"placeholder": "john@doe.com"
},
{
"fieldname": "displayLogo",
@ -31,18 +28,14 @@
"fieldname": "phone",
"label": "Phone",
"fieldtype": "Data",
"placeholder": "9888900000",
"validate": {
"type": "phone"
}
"placeholder": "9888900000"
},
{
"fieldname": "address",
"label": "Address",
"fieldtype": "Link",
"target": "Address",
"placeholder": "Click to create",
"inline": true
"placeholder": "Click to create"
},
{
"fieldname": "template",
@ -50,9 +43,18 @@
"placeholder": "Template",
"fieldtype": "Select",
"options": [
"Basic",
"Minimal",
"Business"
{
"value": "Basic",
"label": "Basic"
},
{
"value": "Minimal",
"label": "Minimal"
},
{
"value": "Business",
"label": "Business"
}
],
"default": "Basic"
},
@ -61,7 +63,8 @@
"label": "Color",
"placeholder": "Select Color",
"fieldtype": "Color",
"colors": [
"default": "#112B42",
"options": [
{
"label": "Red",
"value": "#f56565"
@ -110,10 +113,22 @@
"placeholder": "Font",
"fieldtype": "Select",
"options": [
"Inter",
"Times New Roman",
"Arial",
"Courier"
{
"value": "Inter",
"label": "Inter"
},
{
"value": "Times New Roman",
"label": "Times New Roman"
},
{
"value": "Arial",
"label": "Arial"
},
{
"value": "Courier",
"label": "Courier"
}
],
"default": "Inter"
}
@ -128,4 +143,4 @@
"phone",
"address"
]
}
}

View File

@ -1,25 +1,9 @@
{
"name": "PurchaseInvoice",
"doctype": "DocType",
"label": "Bill",
"printTemplate": {
"name": "InvoiceTemplate",
"props": [
"doc",
"printSettings"
],
"computed": {},
"__file": "models/doctype/SalesInvoice/InvoiceTemplate.vue",
"__hmrId": "3d0cd49d"
},
"label": "Purchase Invoice",
"isSingle": false,
"isChild": false,
"isSubmittable": true,
"keywordFields": [
"name",
"supplier"
],
"settings": "PurchaseInvoiceSettings",
"showTitle": true,
"fields": [
{
@ -52,10 +36,7 @@
"label": "Supplier Currency",
"fieldtype": "Link",
"target": "Currency",
"hidden": true,
"formulaDependsOn": [
"supplier"
]
"hidden": true
},
{
"fieldname": "exchangeRate",
@ -67,38 +48,42 @@
"fieldname": "items",
"label": "Items",
"fieldtype": "Table",
"childtype": "PurchaseInvoiceItem",
"target": "PurchaseInvoiceItem",
"required": true
},
{
"fieldname": "netTotal",
"label": "Net Total",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "baseNetTotal",
"label": "Net Total (Company Currency)",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "taxes",
"label": "Taxes",
"fieldtype": "Table",
"childtype": "TaxSummary",
"target": "TaxSummary",
"readOnly": true
},
{
"fieldname": "grandTotal",
"label": "Grand Total",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "baseGrandTotal",
"label": "Grand Total (Company Currency)",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
@ -112,13 +97,6 @@
"label": "Terms",
"fieldtype": "Text"
},
{
"fieldname": "cancelled",
"label": "Cancelled",
"fieldtype": "Check",
"default": 0,
"readOnly": true
},
{
"fieldname": "numberSeries",
"label": "Number Series",
@ -128,15 +106,5 @@
"default": "PINV-"
}
],
"actions": [
{
"label": "Make Payment"
},
{
"label": "Print"
},
{
"label": "Ledger Entries"
}
]
"keywordFields": ["name", "supplier", "numberSeries"]
}

View File

@ -1,15 +1,8 @@
{
"name": "PurchaseInvoiceItem",
"doctype": "DocType",
"label": "Purchase Invoice Item",
"isChild": true,
"keywordFields": [],
"tableFields": [
"item",
"tax",
"quantity",
"rate",
"amount"
],
"tableFields": ["item", "tax", "quantity", "rate", "amount"],
"fields": [
{
"fieldname": "item",
@ -41,6 +34,7 @@
"fieldname": "baseRate",
"label": "Rate (Company Currency)",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
@ -61,12 +55,14 @@
"fieldname": "amount",
"label": "Amount",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "baseAmount",
"label": "Amount (Company Currency)",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
}
]

View File

@ -1,9 +0,0 @@
{
"name": "PurchaseInvoiceSettings",
"label": "Bills Settings",
"doctype": "DocType",
"isSingle": true,
"isChild": false,
"keywordFields": [],
"fields": []
}

View File

@ -1,24 +1,10 @@
{
"name": "SalesInvoice",
"label": "Invoice",
"doctype": "DocType",
"printTemplate": {
"name": "InvoiceTemplate",
"props": [
"doc",
"printSettings"
],
"computed": {},
"__file": "models/doctype/SalesInvoice/InvoiceTemplate.vue",
"__hmrId": "3d0cd49d"
},
"label": "Sales Invoice",
"isSingle": false,
"isChild": false,
"isSubmittable": true,
"keywordFields": [
"name",
"customer"
],
"keywordFields": ["name", "customer"],
"settings": "SalesInvoiceSettings",
"fields": [
{
@ -44,17 +30,13 @@
"fieldname": "account",
"label": "Account",
"fieldtype": "Link",
"target": "Account",
"disableCreation": true
"target": "Account"
},
{
"fieldname": "currency",
"label": "Customer Currency",
"fieldtype": "Link",
"target": "Currency",
"formulaDependsOn": [
"customer"
]
"target": "Currency"
},
{
"fieldname": "exchangeRate",
@ -74,37 +56,42 @@
"fieldname": "netTotal",
"label": "Net Total",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "baseNetTotal",
"label": "Net Total (Company Currency)",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "taxes",
"label": "Taxes",
"fieldtype": "Table",
"childtype": "TaxSummary",
"target": "TaxSummary",
"readOnly": true
},
{
"fieldname": "grandTotal",
"label": "Grand Total",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "baseGrandTotal",
"label": "Grand Total (Company Currency)",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "outstandingAmount",
"label": "Outstanding Amount",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
@ -112,13 +99,6 @@
"label": "Notes",
"fieldtype": "Text"
},
{
"fieldname": "cancelled",
"label": "Cancelled",
"fieldtype": "Check",
"default": 0,
"readOnly": true
},
{
"fieldname": "numberSeries",
"label": "Number Series",
@ -127,16 +107,5 @@
"required": true,
"default": "SINV-"
}
],
"actions": [
{
"label": "Make Payment"
},
{
"label": "Print"
},
{
"label": "Ledger Entries"
}
]
}

View File

@ -1,16 +1,7 @@
{
"name": "SalesInvoiceItem",
"doctype": "DocType",
"label": "Sales Invoice Item",
"isChild": true,
"regional": 1,
"keywordFields": [],
"tableFields": [
"item",
"tax",
"quantity",
"rate",
"amount"
],
"fields": [
{
"fieldname": "item",
@ -23,10 +14,7 @@
"fieldname": "description",
"label": "Description",
"fieldtype": "Text",
"hidden": true,
"formulaDependsOn": [
"item"
]
"hidden": true
},
{
"fieldname": "quantity",
@ -39,15 +27,13 @@
"fieldname": "rate",
"label": "Rate",
"fieldtype": "Currency",
"required": true,
"formulaDependsOn": [
"item"
]
"required": true
},
{
"fieldname": "baseRate",
"label": "Rate (Company Currency)",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
@ -63,31 +49,22 @@
"fieldname": "tax",
"label": "Tax",
"fieldtype": "Link",
"target": "Tax",
"formulaDependsOn": [
"item"
]
"target": "Tax"
},
{
"fieldname": "amount",
"label": "Amount",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "baseAmount",
"label": "Amount (Company Currency)",
"fieldtype": "Currency",
"computed": true,
"readOnly": true
},
{
"fieldname": "hsnCode",
"label": "HSN/SAC",
"fieldtype": "Int",
"formulaDependsOn": [
"item"
]
}
],
"augmented": 1
"tableFields": ["item", "tax", "quantity", "rate", "amount"]
}

View File

@ -1,10 +1,8 @@
{
"name": "SalesInvoiceSettings",
"label": "SalesInvoice Settings",
"doctype": "DocType",
"label": "Sales Invoice Settings",
"isSingle": true,
"isChild": false,
"keywordFields": [],
"fields": [
{
"fieldname": "template",
@ -12,9 +10,18 @@
"placeholder": "Template",
"fieldtype": "Select",
"options": [
"Basic I",
"Basic II",
"Modern"
{
"value": "Basic I",
"label": "Basic I"
},
{
"value": "Basic II",
"label": "Basic II"
},
{
"value": "Modern",
"label": "Modern"
}
],
"required": true,
"default": "Basic I"
@ -25,10 +32,22 @@
"placeholder": "Font",
"fieldtype": "Select",
"options": [
"Montserrat",
"Open Sans",
"Oxygen",
"Merriweather"
{
"value": "Montserrat",
"label": "Montserrat"
},
{
"value": "Open Sans",
"label": "Open Sans"
},
{
"value": "Oxygen",
"label": "Oxygen"
},
{
"value": "Merriweather",
"label": "Merriweather"
}
],
"required": true,
"default": "Montserrat"
@ -42,4 +61,4 @@
"hidden": true
}
]
}
}

View File

@ -1,12 +1,9 @@
{
"name": "SetupWizard",
"label": "Setup Wizard",
"naming": "name",
"isSingle": true,
"isChild": false,
"isSubmittable": false,
"settings": null,
"keywordFields": [],
"fields": [
{
"fieldname": "companyLogo",
@ -32,10 +29,7 @@
"label": "Email",
"fieldtype": "Data",
"placeholder": "john@doe.com",
"required": true,
"validate": {
"type": "email"
}
"required": true
},
{
"fieldname": "companyName",
@ -56,7 +50,6 @@
"label": "Fiscal Year Start Date",
"placeholder": "Fiscal Year Start Date",
"fieldtype": "Date",
"formulaDependsOn": ["country"],
"required": true
},
{
@ -64,7 +57,6 @@
"label": "Fiscal Year End Date",
"placeholder": "Fiscal Year End Date",
"fieldtype": "Date",
"formulaDependsOn": ["country"],
"required": true
},
{
@ -72,7 +64,6 @@
"label": "Currency",
"fieldtype": "Data",
"placeholder": "Currency",
"formulaDependsOn": ["country"],
"required": true
},
{
@ -85,8 +76,7 @@
"fieldname": "chartOfAccounts",
"label": "Chart of Accounts",
"fieldtype": "AutoComplete",
"placeholder": "Select CoA",
"formulaDependsOn": ["country"]
"placeholder": "Select CoA"
}
],
"quickEditFields": [

View File

@ -1,121 +1,5 @@
{
"name": "Supplier",
"label": "Supplier",
"basedOn": "Party",
"filters": {
"supplier": 1
},
"actions": [
{
"label": "Create Bill"
},
{
"label": "View Bills"
}
],
"regional": 1,
"keywordFields": [
"name"
],
"fields": [
{
"fieldname": "name",
"label": "Name",
"fieldtype": "Data",
"required": true,
"placeholder": "Full Name"
},
{
"fieldname": "image",
"label": "Image",
"fieldtype": "AttachImage"
},
{
"fieldname": "customer",
"label": "Is Customer",
"fieldtype": "Check"
},
{
"fieldname": "gstin",
"label": "GSTIN No.",
"fieldtype": "Data"
},
{
"fieldname": "gstType",
"label": "GST Registration",
"placeholder": "GST Registration",
"fieldtype": "Select",
"default": "Unregistered",
"options": [
"Unregistered",
"Registered Regular",
"Consumer"
]
},
{
"fieldname": "supplier",
"label": "Is Supplier",
"fieldtype": "Check"
},
{
"fieldname": "defaultAccount",
"label": "Default Account",
"fieldtype": "Link",
"target": "Account"
},
{
"fieldname": "outstandingAmount",
"label": "Outstanding Amount",
"fieldtype": "Currency"
},
{
"fieldname": "currency",
"label": "Currency",
"fieldtype": "Link",
"target": "Currency",
"placeholder": "INR"
},
{
"fieldname": "email",
"label": "Email",
"fieldtype": "Data",
"placeholder": "john@doe.com",
"validate": {
"type": "email"
}
},
{
"fieldname": "phone",
"label": "Phone",
"fieldtype": "Data",
"placeholder": "Phone",
"validate": {
"type": "phone"
}
},
{
"fieldname": "address",
"label": "Address",
"fieldtype": "Link",
"target": "Address",
"placeholder": "Click to create",
"inline": true
},
{
"fieldname": "addressDisplay",
"label": "Address Display",
"fieldtype": "Text",
"readOnly": true
}
],
"quickEditFields": [
"email",
"phone",
"address",
"defaultAccount",
"currency",
"gstType",
"gstin"
],
"augmented": 1
"extends": "Party"
}

View File

@ -1,12 +1,8 @@
{
"name": "Tax",
"label": "Tax",
"doctype": "DocType",
"isSingle": false,
"isChild": false,
"keywordFields": [
"name"
],
"fields": [
{
"fieldname": "name",
@ -22,7 +18,6 @@
"required": true
}
],
"quickEditFields": [
"details"
]
"keywordFields": ["name"],
"quickEditFields": ["details"]
}

View File

@ -1,10 +1,8 @@
{
"name": "TaxDetail",
"label": "Tax Detail",
"doctype": "DocType",
"isSingle": false,
"isChild": true,
"keywordFields": [],
"fields": [
{
"fieldname": "account",
@ -21,8 +19,5 @@
"placeholder": "0%"
}
],
"tableFields": [
"account",
"rate"
]
"tableFields": ["account", "rate"]
}

View File

@ -1,6 +1,6 @@
{
"name": "TaxSummary",
"doctype": "DocType",
"label": "Tax Summary",
"isChild": true,
"fields": [
{

View File

@ -1,5 +1,6 @@
{
"name": "PatchRun",
"label": "Patch Run",
"fields": [
{
"fieldname": "name",
@ -8,4 +9,4 @@
"required": true
}
]
}
}

View File

@ -1,9 +1,8 @@
{
"name": "SingleValue",
"doctype": "DocType",
"label": "Single Value",
"isSingle": false,
"isChild": false,
"keywordFields": [],
"fields": [
{
"fieldname": "parent",
@ -23,5 +22,6 @@
"fieldtype": "Data",
"required": true
}
]
],
"keywordFields": []
}

View File

@ -1,10 +1,8 @@
{
"name": "SystemSettings",
"label": "System Settings",
"doctype": "DocType",
"isSingle": true,
"isChild": false,
"keywordFields": [],
"fields": [
{
"fieldname": "dateFormat",
@ -82,5 +80,6 @@
"dateFormat",
"displayPrecision",
"hideGetStarted"
]
}
],
"keywordFields": []
}

View File

@ -0,0 +1,22 @@
{
"name": "AccountingSettings",
"fields": [
{
"fieldname": "gstin",
"label": "GSTIN",
"fieldtype": "Data",
"placeholder": "27AAAAA0000A1Z5"
}
],
"keywordFields": [],
"quickEditFields": [
"fullname",
"email",
"companyName",
"country",
"currency",
"fiscalYearStart",
"fiscalYearEnd",
"gstin"
]
}

View File

@ -0,0 +1,20 @@
{
"name": "Address",
"fields": [
{
"fieldname": "pos",
"label": "Place of Supply",
"fieldtype": "AutoComplete",
"placeholder": "Place of Supply"
}
],
"quickEditFields": [
"addressLine1",
"addressLine2",
"city",
"state",
"country",
"postalCode",
"pos"
]
}

View File

@ -0,0 +1,27 @@
{
"name": "Party",
"fields": [
{
"fieldname": "gstin",
"label": "GSTIN No.",
"fieldtype": "Data"
},
{
"fieldname": "gstType",
"label": "GST Registration",
"placeholder": "GST Registration",
"fieldtype": "Select",
"default": "Unregistered",
"options": ["Unregistered", "Registered Regular", "Consumer"]
}
],
"quickEditFields": [
"email",
"phone",
"address",
"defaultAccount",
"currency",
"gstType",
"gstin"
]
}

77
schemas/schemas.ts Normal file
View File

@ -0,0 +1,77 @@
import Account from './app/Account.json';
import AccountingLedgerEntry from './app/AccountingLedgerEntry.json';
import AccountingSettings from './app/AccountingSettings.json';
import Address from './app/Address.json';
import Color from './app/Color.json';
import CompanySettings from './app/CompanySettings.json';
import Currency from './app/Currency.json';
import Customer from './app/Customer.json';
import GetStarted from './app/GetStarted.json';
import Item from './app/Item.json';
import JournalEntry from './app/JournalEntry.json';
import JournalEntryAccount from './app/JournalEntryAccount.json';
import NumberSeries from './app/NumberSeries.json';
import Party from './app/Party.json';
import Payment from './app/Payment.json';
import PaymentFor from './app/PaymentFor.json';
import PrintSettings from './app/PrintSettings.json';
import PurchaseInvoice from './app/PurchaseInvoice.json';
import PurchaseInvoiceItem from './app/PurchaseInvoiceItem.json';
import SalesInvoice from './app/SalesInvoice.json';
import SalesInvoiceItem from './app/SalesInvoiceItem.json';
import SalesInvoiceSettings from './app/SalesInvoiceSettings.json';
import SetupWizard from './app/SetupWizard.json';
import Supplier from './app/Supplier.json';
import Tax from './app/Tax.json';
import TaxDetail from './app/TaxDetail.json';
import TaxSummary from './app/TaxSummary.json';
import PatchRun from './core/PatchRun.json';
import SingleValue from './core/SingleValue.json';
import SystemSettings from './core/SystemSettings.json';
import { Schema } from './types';
export const coreSchemas: Schema[] = [
PatchRun as Schema,
SingleValue as Schema,
SystemSettings as Schema,
];
export const appSchemas: Schema[] = [
SetupWizard as Schema,
GetStarted as Schema,
Color as Schema,
Currency as Schema,
NumberSeries as Schema,
PrintSettings as Schema,
CompanySettings as Schema,
Account as Schema,
AccountingSettings as Schema,
AccountingLedgerEntry as Schema,
Party as Schema,
Supplier as Schema,
Customer as Schema,
Address as Schema,
Item as Schema,
Payment as Schema,
PaymentFor as Schema,
JournalEntry as Schema,
JournalEntryAccount as Schema,
PurchaseInvoice as Schema,
PurchaseInvoiceItem as Schema,
SalesInvoice as Schema,
SalesInvoiceItem as Schema,
SalesInvoiceSettings as Schema,
Tax as Schema,
TaxDetail as Schema,
TaxSummary as Schema,
];

81
schemas/types.ts Normal file
View File

@ -0,0 +1,81 @@
export enum FieldTypeEnum {
Data = 'Data',
Select = 'Select',
Link = 'Link',
Date = 'Date',
Table = 'Table',
AutoComplete = 'AutoComplete',
Check = 'Check',
AttachImage = 'AttachImage',
DynamicLink = 'DynamicLink',
Int = 'Int',
Float = 'Float',
Currency = 'Currency',
Text = 'Text',
Color = 'Color',
Code = 'Code',
}
export type FieldType = keyof typeof FieldTypeEnum;
export type RawValue = string | number | boolean;
export interface BaseField {
fieldname: string;
fieldtype: FieldType;
label: string;
hidden?: boolean;
required?: boolean;
readOnly?: boolean;
description?: string;
default?: RawValue;
placeholder?: string;
groupBy?: string;
computed?: boolean;
}
export type SelectOption = { value: string; label: string };
export interface OptionField extends BaseField {
fieldtype:
| FieldTypeEnum.Select
| FieldTypeEnum.AutoComplete
| FieldTypeEnum.Color;
options: SelectOption[];
}
export interface TargetField extends BaseField {
fieldtype: FieldTypeEnum.Table | FieldTypeEnum.Link;
target: string | string[];
}
export interface DynamicLinkField extends BaseField {
fieldtype: FieldTypeEnum.DynamicLink;
references: string;
}
export interface NumberField extends BaseField {
fieldtype: FieldTypeEnum.Float | FieldTypeEnum.Int;
minvalue?: number;
maxvalue?: number;
}
export type Field =
| BaseField
| OptionField
| TargetField
| DynamicLinkField
| NumberField;
export type TreeSettings = { parentField: string };
export interface Schema {
name: string;
label: string;
fields: Field[];
isTree?: boolean;
extends?: string;
isChild?: boolean;
isSingle?: boolean;
isAbstract?: boolean;
isSubmittable?: boolean;
keywordFields?: string[];
treeSettings?: TreeSettings;
}