From 90ae7dda4c7122966e5032f197aae1138f9ecd02 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 19 Feb 2018 12:38:54 +0530 Subject: [PATCH] Delete invoice.js --- models/doctype/invoice/invoice.js | 67 ------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 models/doctype/invoice/invoice.js diff --git a/models/doctype/invoice/invoice.js b/models/doctype/invoice/invoice.js deleted file mode 100644 index b99a500b..00000000 --- a/models/doctype/invoice/invoice.js +++ /dev/null @@ -1,67 +0,0 @@ -const frappe = require('frappejs'); - -module.exports = { - "name": "Invoice", - "doctype": "DocType", - "documentClass": require("./InvoiceDocument.js"), - "isSingle": 0, - "istable": 0, - "keywordFields": ["name", "customer"], - "settings": "InvoiceSettings", - "showTitle": true, - "fields": [ - { - "fieldname": "date", - "label": "Date", - "fieldtype": "Date" - }, - { - "fieldname": "customer", - "label": "Customer", - "fieldtype": "Link", - "target": "Customer", - "required": 1 - }, - { - "fieldname": "items", - "label": "Items", - "fieldtype": "Table", - "childtype": "InvoiceItem", - "required": true - }, - { - "fieldname": "netTotal", - "label": "Total", - "fieldtype": "Currency", - formula: (doc) => doc.getSum('items', 'amount'), - "disabled": true - }, - { - "fieldname": "taxes", - "label": "Taxes", - "fieldtype": "Table", - "childtype": "TaxSummary", - "disabled": true, - template: (doc, row) => { - return `
-
-
${(doc.taxes || []).map(row => { - return `
-
${row.account} (${row.rate}%)
-
- ${frappe.format(row.amount, {fieldtype:'Currency'})} -
-
` - }).join('')} -
`; - } - }, - { - "fieldname": "grandTotal", - "label": "Total", - "fieldtype": "Currency", - formula: (doc) => doc.getGrandTotal(), - "disabled": true - } - ] -} \ No newline at end of file