2
0
mirror of https://github.com/frappe/books.git synced 2025-01-10 18:24:40 +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; } color: inherit; }
html { html {
font-size: 14px; } font-size: 14px; }
.main {
border-left: 1px solid #dee2e6; }
.hide { .hide {
display: none !important; } display: none !important; }
.page-head {
padding-bottom: 1rem; }
.page-head .btn {
margin-right: 0.5rem; }
.page-error { .page-error {
text-align: center; text-align: center;
padding: 200px 0px; } padding: 200px 0px; }
@ -5772,7 +5778,8 @@ mark {
color: inherit; color: inherit;
padding: 0px; } padding: 0px; }
.table-wrapper { .table-wrapper {
margin-bottom: 0.5rem; } margin-top: 1rem;
margin-bottom: 1rem; }
.table-toolbar { .table-toolbar {
margin-top: 0.5rem; } margin-top: 0.5rem; }
.data-table-col .edit-cell { .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 { class Account extends BaseDocument {
setup() { setup() {
this.add_handler('validate'); this.addHandler('validate');
} }
async validate() { async validate() {
if (!this.account_type) { if (!this.account_type) {
if (this.parent_account) { 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 { } else {
this.account_type = 'Asset'; this.account_type = 'Asset';
} }

View File

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

View File

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

View File

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