2
0
mirror of https://github.com/frappe/books.git synced 2024-11-12 16:36:27 +00:00

incr: update invoice schema with sections

- hide name from transactional schemas
This commit is contained in:
18alantom 2023-04-12 14:35:38 +05:30
parent e9300e350d
commit 28158e5add
7 changed files with 105 additions and 72 deletions

View File

@ -11,13 +11,13 @@
"fieldname": "name", "fieldname": "name",
"fieldtype": "Data", "fieldtype": "Data",
"required": true, "required": true,
"readOnly": true "readOnly": true,
"hidden": true
}, },
{ {
"fieldname": "date", "abstract": true,
"label": "Date", "fieldname": "numberSeries",
"fieldtype": "Date", "section": "Default"
"required": true
}, },
{ {
"fieldname": "party", "fieldname": "party",
@ -25,7 +25,8 @@
"fieldtype": "Link", "fieldtype": "Link",
"target": "Party", "target": "Party",
"create": true, "create": true,
"required": true "required": true,
"section": "Default"
}, },
{ {
"fieldname": "account", "fieldname": "account",
@ -36,73 +37,66 @@
"required": true "required": true
}, },
{ {
"fieldname": "currency", "fieldname": "date",
"label": "Customer Currency", "label": "Date",
"fieldtype": "Link", "fieldtype": "Date",
"target": "Currency" "required": true,
"section": "Default"
}, },
{ {
"fieldname": "exchangeRate", "abstract": true,
"label": "Exchange Rate", "fieldname": "items",
"fieldtype": "Float", "section": "Items"
"default": 1,
"readOnly": true
}, },
{ {
"fieldname": "netTotal", "fieldname": "netTotal",
"label": "Net Total", "label": "Net Total",
"fieldtype": "Currency", "fieldtype": "Currency",
"readOnly": true "readOnly": true,
"section": "Items"
}, },
{ {
"fieldname": "taxes", "fieldname": "taxes",
"label": "Taxes", "label": "Taxes",
"fieldtype": "Table", "fieldtype": "Table",
"target": "TaxSummary", "target": "TaxSummary",
"readOnly": true "readOnly": true,
}, "section": "Tax and Totals"
{
"fieldname": "grandTotal",
"label": "Grand Total",
"fieldtype": "Currency",
"readOnly": true
}, },
{ {
"fieldname": "baseGrandTotal", "fieldname": "baseGrandTotal",
"label": "Base Grand Total", "label": "Base Grand Total",
"fieldtype": "Currency", "fieldtype": "Currency",
"readOnly": true "readOnly": true,
"section": "Tax and Totals"
}, },
{ {
"fieldname": "outstandingAmount", "fieldname": "grandTotal",
"label": "Outstanding Amount", "label": "Grand Total",
"fieldtype": "Currency", "fieldtype": "Currency",
"readOnly": true "readOnly": true,
"section": "Tax and Totals"
}, },
{ {
"fieldname": "setDiscountAmount", "fieldname": "setDiscountAmount",
"label": "Set Discount Amount", "label": "Set Discount Amount",
"fieldtype": "Check", "fieldtype": "Check",
"default": false "default": false,
"hidden": true
}, },
{ {
"fieldname": "discountAmount", "fieldname": "discountAmount",
"label": "Discount Amount", "label": "Discount Amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"readOnly": false "readOnly": false,
"hidden": true
}, },
{ {
"fieldname": "discountPercent", "fieldname": "discountPercent",
"label": "Discount Percent", "label": "Discount Percent",
"fieldtype": "Float", "fieldtype": "Float",
"readOnly": false "readOnly": false,
}, "hidden": true
{
"fieldname": "discountAfterTax",
"label": "Discount After Tax",
"fieldtype": "Check",
"default": false,
"readOnly": false
}, },
{ {
"fieldname": "entryCurrency", "fieldname": "entryCurrency",
@ -118,25 +112,59 @@
"label": "Company" "label": "Company"
} }
], ],
"default": "Party" "default": "Party",
"section": "Settings"
}, },
{ {
"fieldname": "terms", "fieldname": "currency",
"label": "Notes", "label": "Customer Currency",
"placeholder": "Add invoice terms", "fieldtype": "Link",
"fieldtype": "Text" "target": "Currency",
"section": "Settings"
}, },
{ {
"fieldname": "attachment", "fieldname": "exchangeRate",
"placeholder": "Add attachment", "label": "Exchange Rate",
"label": "Attachment", "fieldtype": "Float",
"fieldtype": "Attachment" "default": 1,
"readOnly": true,
"section": "Settings"
},
{
"fieldname": "discountAfterTax",
"label": "Discount After Tax",
"fieldtype": "Check",
"default": false,
"readOnly": false,
"section": "Settings"
},
{
"fieldname": "outstandingAmount",
"label": "Outstanding Amount",
"fieldtype": "Currency",
"readOnly": true,
"section": "Outstanding"
}, },
{ {
"fieldname": "stockNotTransferred", "fieldname": "stockNotTransferred",
"label": "Stock Not Transferred", "label": "Stock Not Transferred",
"fieldtype": "Float", "fieldtype": "Float",
"readOnly": true "readOnly": true,
"section": "Outstanding"
},
{
"fieldname": "terms",
"label": "Notes",
"placeholder": "Add invoice terms",
"fieldtype": "Text",
"section": "References"
},
{
"fieldname": "attachment",
"placeholder": "Add attachment",
"label": "Attachment",
"fieldtype": "Attachment",
"section": "References"
} }
], ],
"keywordFields": ["name", "party"] "keywordFields": ["name", "party"]

View File

@ -12,7 +12,7 @@
"fieldtype": "Data", "fieldtype": "Data",
"required": true, "required": true,
"readOnly": true, "readOnly": true,
"section": "Default" "hidden": true
}, },
{ {
"fieldname": "numberSeries", "fieldname": "numberSeries",

View File

@ -5,14 +5,6 @@
"naming": "numberSeries", "naming": "numberSeries",
"showTitle": true, "showTitle": true,
"fields": [ "fields": [
{
"fieldname": "items",
"label": "Items",
"fieldtype": "Table",
"target": "PurchaseInvoiceItem",
"required": true,
"edit": true
},
{ {
"fieldname": "numberSeries", "fieldname": "numberSeries",
"label": "Number Series", "label": "Number Series",
@ -20,7 +12,17 @@
"target": "NumberSeries", "target": "NumberSeries",
"create": true, "create": true,
"required": true, "required": true,
"default": "PINV-" "default": "PINV-",
"section": "Default"
},
{
"fieldname": "items",
"label": "Items",
"fieldtype": "Table",
"target": "PurchaseInvoiceItem",
"required": true,
"edit": true,
"section": "Items"
} }
], ],
"keywordFields": ["name", "party"] "keywordFields": ["name", "party"]

View File

@ -5,14 +5,6 @@
"naming": "numberSeries", "naming": "numberSeries",
"showTitle": true, "showTitle": true,
"fields": [ "fields": [
{
"fieldname": "items",
"label": "Items",
"fieldtype": "Table",
"target": "SalesInvoiceItem",
"required": true,
"edit": true
},
{ {
"fieldname": "numberSeries", "fieldname": "numberSeries",
"label": "Number Series", "label": "Number Series",
@ -20,7 +12,17 @@
"target": "NumberSeries", "target": "NumberSeries",
"create": true, "create": true,
"required": true, "required": true,
"default": "SINV-" "default": "SINV-",
"section": "Default"
},
{
"fieldname": "items",
"label": "Items",
"fieldtype": "Table",
"target": "SalesInvoiceItem",
"required": true,
"edit": true,
"section": "Items"
} }
], ],
"keywordFields": ["name", "party"] "keywordFields": ["name", "party"]

View File

@ -12,15 +12,16 @@
}, },
{ {
"fieldname": "rate", "fieldname": "rate",
"label": "Rate", "label": "Tax Rate",
"fieldtype": "Float", "fieldtype": "Float",
"required": true "required": true
}, },
{ {
"fieldname": "amount", "fieldname": "amount",
"label": "Amount", "label": "Tax Amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"required": true "required": true
} }
] ],
"tableFields": ["account", "rate", "amount"]
} }

View File

@ -12,7 +12,7 @@
"fieldtype": "Data", "fieldtype": "Data",
"required": true, "required": true,
"readOnly": true, "readOnly": true,
"section": "Default" "hidden": true
}, },
{ {
"fieldname": "numberSeries", "fieldname": "numberSeries",

View File

@ -12,7 +12,7 @@
"fieldtype": "Data", "fieldtype": "Data",
"required": true, "required": true,
"readOnly": true, "readOnly": true,
"section": "Default" "hidden": true
}, },
{ {
"abstract": true, "abstract": true,