2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 23:00:56 +00:00

invoice child editing

This commit is contained in:
Rushabh Mehta 2018-02-06 22:43:34 +05:30
parent 76f3f669d3
commit 1b48a5e9ee
8 changed files with 6198 additions and 1071 deletions

View File

@ -11,7 +11,7 @@ Install dependencies
### Build
```sh
node_modules/.bin/webpack
node_modules/.bin/rollup
```
### Start

15
dist/css/style.css vendored
View File

@ -5752,7 +5752,8 @@ html {
right: 0;
left: auto; }
.awesomplete {
display: block; }
display: block;
z-index: 100; }
.awesomplete > ul > li {
padding: .75rem .375rem; }
.awesomplete > ul > li:hover {
@ -5771,3 +5772,15 @@ mark {
background: inherit;
color: inherit;
padding: 0px; }
.data-table-col .edit-cell {
padding: 0px !important; }
.data-table-col .edit-cell input, .data-table-col .edit-cell textarea {
z-index: 100;
border-radius: none;
margin: none;
padding: 0.25rem; }
.data-table-col .edit-cell .awesomplete > ul {
position: fixed;
left: auto;
width: auto;
min-width: 120px; }

6244
dist/js/bundle.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@ class Invoice extends BaseDocument {
}
get_total() {
return this.items.map(d => d.amount).reduce((a, b) => a + b, 0);
return this.items.map(d => (d.amount || 0)).reduce((a, b) => a + b, 0);
}
}

View File

@ -9,7 +9,7 @@
"fieldname": "item",
"label": "Item",
"fieldtype": "Link",
"options": "Item",
"target": "Item",
"reqd": 1
},
{
@ -35,7 +35,7 @@
"fieldname": "amount",
"label": "Amount",
"fieldtype": "Currency",
"readonly": 1,
"read_only": 1,
"formula": "doc.quantity * doc.rate"
}
]

View File

@ -12,7 +12,9 @@
"node-fetch": "^1.7.3",
"popper.js": "^1.12.9",
"sqlite3": "^3.1.13",
"walk": "^2.3.9"
"walk": "^2.3.9",
"clusterize.js": "^0.18.0",
"sortablejs": "^1.7.0"
},
"devDependencies": {
"autoprefixer": "^7.2.4",

View File

@ -11,6 +11,8 @@ client.start({
frappe.modules.account = require('../models/doctype/account/account.js');
frappe.modules.item = require('../models/doctype/item/item.js');
frappe.modules.customer = require('../models/doctype/customer/customer.js');
frappe.modules.invoice = require('../models/doctype/invoice/invoice.js');
frappe.modules.invoice_item = require('../models/doctype/invoice_item/invoice_item.js');
frappe.modules.todo_client = require('frappejs/models/doctype/todo/todo_client.js');
frappe.modules.account_client = require('../models/doctype/account/account_client.js');
@ -19,6 +21,7 @@ client.start({
frappe.desk.add_sidebar_item('Accounts', '#list/account');
frappe.desk.add_sidebar_item('Items', '#list/item');
frappe.desk.add_sidebar_item('Customers', '#list/customer');
frappe.desk.add_sidebar_item('Invoice', '#list/invoice');
frappe.router.default = '#list/todo';

995
yarn.lock

File diff suppressed because it is too large Load Diff