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

change case

This commit is contained in:
Rushabh Mehta 2018-02-08 15:09:10 +05:30
parent d74fe3656a
commit 36be3b98f7
6 changed files with 340 additions and 283 deletions

9
dist/css/style.css vendored
View File

@ -5736,8 +5736,14 @@ a.text-dark:hover, a.text-dark:focus {
color: inherit; }
html {
font-size: 14px; }
.main {
border-left: 1px solid #dee2e6; }
.hide {
display: none !important; }
.page-head {
padding-bottom: 1rem; }
.page-head .btn {
margin-right: 0.5rem; }
.page-error {
text-align: center;
padding: 200px 0px; }
@ -5772,7 +5778,8 @@ mark {
color: inherit;
padding: 0px; }
.table-wrapper {
margin-bottom: 0.5rem; }
margin-top: 1rem;
margin-bottom: 1rem; }
.table-toolbar {
margin-top: 0.5rem; }
.data-table-col .edit-cell {

600
dist/js/bundle.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -10,12 +10,12 @@ class AccountMeta extends BaseMeta {
class Account extends BaseDocument {
setup() {
this.add_handler('validate');
this.addHandler('validate');
}
async validate() {
if (!this.account_type) {
if (this.parent_account) {
this.account_type = await frappe.db.get_value('Account', this.parent_account, 'account_type');
this.account_type = await frappe.db.getValue('Account', this.parent_account, 'account_type');
} else {
this.account_type = 'Asset';
}

View File

@ -2,10 +2,10 @@ const BaseList = require('frappejs/client/view/list');
const BaseForm = require('frappejs/client/view/form');
class AccountList extends BaseList {
get_fields() {
getFields() {
return ['name', 'account_type'];
}
get_row_html(data) {
getRowHTML(data) {
return `<a href="#edit/account/${data.name}">${data.name} (${data.account_type})</a>`;
}
}
@ -15,7 +15,7 @@ class AccountForm extends BaseForm {
super.make();
// override controller event
this.controls['parent_account'].get_filters = (query) => {
this.controls['parent_account'].getFilters = (query) => {
return {
keywords: ["like", query],
name: ["!=", this.doc.name]

View File

@ -9,7 +9,7 @@ class InvoiceMeta extends BaseMeta {
class Invoice extends BaseDocument {
setup() {
this.add_handler('validate');
this.addHandler('validate');
}
validate() {

View File

@ -3,7 +3,7 @@ const path = require('path');
server.start({
backend: 'sqlite',
connection_params: {db_path: 'test.db'},
connection_params: {dbPath: 'test.db'},
static: './',
models_path: path.resolve(__dirname, './models')
});