[fix] grid columns now restricted to 10
diff --git a/erpnext/accounts/doctype/asset_category/asset_category.js b/erpnext/accounts/doctype/asset_category/asset_category.js
index cbbdd48..d5f4864 100644
--- a/erpnext/accounts/doctype/asset_category/asset_category.js
+++ b/erpnext/accounts/doctype/asset_category/asset_category.js
@@ -4,13 +4,13 @@
frappe.ui.form.on('Asset Category', {
setup: function(frm) {
frm.get_field('accounts').grid.editable_fields = [
- {fieldname: 'company_name', columns: 2},
+ {fieldname: 'company_name', columns: 3},
{fieldname: 'fixed_asset_account', columns: 3},
- {fieldname: 'accumulated_depreciation_account', columns: 3},
- {fieldname: 'depreciation_expense_account', columns: 3}
+ {fieldname: 'accumulated_depreciation_account', columns: 2},
+ {fieldname: 'depreciation_expense_account', columns: 2}
];
},
-
+
onload: function(frm) {
frm.add_fetch('company_name', 'accumulated_depreciation_account', 'accumulated_depreciation_account');
frm.add_fetch('company_name', 'depreciation_expense_account', 'accumulated_depreciation_account');
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index 4b33fd3..fcd280f 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -5,20 +5,20 @@
setup: function(frm) {
frm.get_docfield("payment_entries").allow_bulk_edit = 1;
frm.add_fetch("bank_account", "account_currency", "account_currency");
-
+
frm.get_field('payment_entries').grid.editable_fields = [
{fieldname: 'against_account', columns: 3},
{fieldname: 'amount', columns: 2},
{fieldname: 'cheque_number', columns: 3},
- {fieldname: 'clearance_date', columns: 3}
+ {fieldname: 'clearance_date', columns: 2}
];
},
onload: function(frm) {
var default_bank_account = locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"];
-
+
frm.set_value("bank_account", default_bank_account);
-
+
frm.set_query("bank_account", function() {
return {
"filters": {
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index cb6c36c..2b06e60 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -9,7 +9,7 @@
setup: function(frm) {
frm.get_field('accounts').grid.editable_fields = [
{fieldname: 'account', columns: 3},
- {fieldname: 'party', columns: 4},
+ {fieldname: 'party', columns: 3},
{fieldname: 'debit_in_account_currency', columns: 2},
{fieldname: 'credit_in_account_currency', columns: 2}
];
@@ -283,7 +283,7 @@
type: "GET",
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_default_bank_cash_account",
args: {
- "account_type": (doc.voucher_type=="Bank Entry" ?
+ "account_type": (doc.voucher_type=="Bank Entry" ?
"Bank" : (doc.voucher_type=="Cash" ? "Cash" : null)),
"company": doc.company
},
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index 9b1ed38..a5fbfba 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -12,7 +12,7 @@
setup: function(frm) {
frm.get_field('references').grid.editable_fields = [
{fieldname: 'reference_doctype', columns: 2},
- {fieldname: 'reference_name', columns: 3},
+ {fieldname: 'reference_name', columns: 2},
{fieldname: 'outstanding_amount', columns: 3},
{fieldname: 'allocated_amount', columns: 3}
];
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
index a50ff19..027fa63 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
@@ -7,12 +7,12 @@
setup: function() {
this.frm.get_field('payments').grid.editable_fields = [
{fieldname: 'reference_name', columns: 3},
- {fieldname: 'amount', columns: 2},
{fieldname: 'invoice_number', columns: 3},
- {fieldname: 'allocated_amount', columns: 3}
+ {fieldname: 'amount', columns: 2},
+ {fieldname: 'allocated_amount', columns: 2}
];
- },
-
+ },
+
onload: function() {
var me = this
this.frm.set_query('party_type', function() {
@@ -113,7 +113,7 @@
if (row.invoice_number && !inList(invoices, row.invoice_number))
invoices.push(row.invoice_type + " | " + row.invoice_number);
});
-
+
if (invoices) {
frappe.meta.get_docfield("Payment Reconciliation Payment", "invoice_number",
me.frm.doc.name).options = "\n" + invoices.join("\n");
@@ -122,7 +122,7 @@
if(!inList(invoices, cstr(p.invoice_number))) p.invoice_number = null;
});
}
-
+
refresh_field("payments");
},
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 64379a1..8ca4d5f 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -454,13 +454,6 @@
]
}
}
-
- if(frm.doc.is_pos){
- frm.get_field('payments').grid.editable_fields = [
- {fieldname: 'mode_of_payment', columns: 2},
- {fieldname: 'amount', columns: 2}
- ];
- }
},
})
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index c684715..1806d93 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -14,7 +14,7 @@
this._super();
if(!in_list(["Material Request", "Request for Quotation"], this.frm.doc.doctype)){
this.frm.get_field('items').grid.editable_fields = [
- {fieldname: 'item_code', columns: 4},
+ {fieldname: 'item_code', columns: 3},
{fieldname: 'qty', columns: 2},
{fieldname: 'rate', columns: 3},
{fieldname: 'amount', columns: 2}
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
index ce1c088..5eafb81 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
@@ -16,7 +16,7 @@
}
frm.get_field('items').grid.editable_fields = [
- {fieldname: 'item_code', columns: 4},
+ {fieldname: 'item_code', columns: 3},
{fieldname: 'qty', columns: 2},
{fieldname: 'schedule_date', columns: 2},
{fieldname: 'warehouse', columns: 3},
diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js
index 832402e..2fbdbcb 100644
--- a/erpnext/manufacturing/doctype/bom/bom.js
+++ b/erpnext/manufacturing/doctype/bom/bom.js
@@ -6,7 +6,7 @@
frappe.ui.form.on("BOM", {
setup: function(frm) {
frm.get_field('items').grid.editable_fields = [
- {fieldname: 'item_code', columns: 4},
+ {fieldname: 'item_code', columns: 3},
{fieldname: 'item_name', columns: 3},
{fieldname: 'qty', columns: 2},
{fieldname: 'rate', columns: 2}
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index f9b71c4..1b3b05d 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -4,7 +4,7 @@
frappe.ui.form.on("Project", {
setup: function(frm) {
frm.get_field('tasks').grid.editable_fields = [
- {fieldname: 'title', columns: 4},
+ {fieldname: 'title', columns: 3},
{fieldname: 'status', columns: 3},
{fieldname: 'start_date', columns: 2},
{fieldname: 'end_date', columns: 2}
diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js
index 4d16295..9ba24e3 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.js
+++ b/erpnext/projects/doctype/timesheet/timesheet.js
@@ -5,7 +5,7 @@
frappe.ui.form.on("Timesheet", {
setup: function(frm) {
frm.get_field('time_logs').grid.editable_fields = [
- {fieldname: 'activity_type', columns: 2},
+ {fieldname: 'activity_type', columns: 4},
{fieldname: 'from_time', columns: 2},
{fieldname: 'hours', columns: 2},
{fieldname: 'to_time', columns: 2},
@@ -36,7 +36,7 @@
refresh: function(frm) {
if(frm.doc.docstatus==1) {
- if(!frm.doc.sales_invoice && frm.doc.total_billing_amount > 0
+ if(!frm.doc.sales_invoice && frm.doc.total_billing_amount > 0
&& frm.doc.employee){
frm.add_custom_button(__("Make Sales Invoice"), function() { frm.trigger("make_invoice") },
"icon-file-alt");
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index a0507ef..e7485c1 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -6,7 +6,7 @@
if(this.frm.get_field('taxes')) {
this.frm.get_field('taxes').grid.editable_fields = [
{fieldname: 'charge_type', columns: 2},
- {fieldname: 'account_head', columns: 3},
+ {fieldname: 'account_head', columns: 2},
{fieldname: 'rate', columns: 2},
{fieldname: 'tax_amount', columns: 2},
{fieldname: 'total', columns: 2}
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index c39048d..2b73cf4 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -4,16 +4,16 @@
erpnext.TransactionController = erpnext.taxes_and_totals.extend({
setup: function() {
this._super();
-
+
if(in_list(["Sales Invoice", "Purchase Invoice"], this.frm.doc.doctype)) {
this.frm.get_field('advances').grid.editable_fields = [
- {fieldname: 'reference_name', columns: 2},
+ {fieldname: 'reference_name', columns: 3},
{fieldname: 'remarks', columns: 3},
- {fieldname: 'advance_amount', columns: 3},
- {fieldname: 'allocated_amount', columns: 3}
+ {fieldname: 'advance_amount', columns: 2},
+ {fieldname: 'allocated_amount', columns: 2}
];
}
-
+
frappe.ui.form.on(this.frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn);
frappe.model.round_floats_in(item, ["rate", "price_list_rate"]);
@@ -432,7 +432,7 @@
var company_currency = this.get_company_currency();
// Added `ignore_pricing_rule` to determine if document is loading after mapping from another doc
- if(this.frm.doc.currency && this.frm.doc.currency !== company_currency
+ if(this.frm.doc.currency && this.frm.doc.currency !== company_currency
&& !this.frm.doc.ignore_pricing_rule) {
this.get_exchange_rate(this.frm.doc.currency, company_currency,
function(exchange_rate) {
@@ -973,7 +973,7 @@
this.item_selector = new erpnext.ItemSelector({frm: this.frm});
}
},
-
+
get_advances: function() {
if(!this.frm.is_return) {
return this.frm.call({
@@ -985,7 +985,7 @@
})
}
},
-
+
make_payment_entry: function() {
return frappe.call({
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry",
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index d02fed2..d58adce 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -15,7 +15,7 @@
this.frm.get_field('items').grid.editable_fields = [
{fieldname: 'item_code', columns: 4},
{fieldname: 'qty', columns: 2},
- {fieldname: 'rate', columns: 3},
+ {fieldname: 'rate', columns: 2},
{fieldname: 'amount', columns: 2}
];
},
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index bbd312d..62ae091 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -6,7 +6,7 @@
frappe.ui.form.on('Material Request', {
setup: function(frm) {
frm.get_field('items').grid.editable_fields = [
- {fieldname: 'item_code', columns: 4},
+ {fieldname: 'item_code', columns: 3},
{fieldname: 'qty', columns: 2},
{fieldname: 'warehouse', columns: 3},
{fieldname: 'schedule_date', columns: 2},
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 69d9a76..6c2a14b 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -52,9 +52,9 @@
this.frm.get_field('items').grid.editable_fields = [
{fieldname: 'item_code', columns: 3},
- {fieldname: 'qty', columns: 2},
- {fieldname: 's_warehouse', columns: 3},
- {fieldname: 't_warehouse', columns: 3}
+ {fieldname: 'qty', columns: 3},
+ {fieldname: 's_warehouse', columns: 2},
+ {fieldname: 't_warehouse', columns: 2}
];
},
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 58b3549..e7ba1ba 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -6,7 +6,7 @@
frappe.ui.form.on("Stock Reconciliation", {
onload: function(frm) {
frm.add_fetch("item_code", "item_name", "item_name");
-
+
// end of life
frm.set_query("item_code", "items", function(doc, cdt, cdn) {
return {
@@ -17,7 +17,7 @@
}
}
});
-
+
if (frm.doc.company) {
erpnext.queries.setup_queries(frm, "Warehouse", function() {
return erpnext.queries.warehouse(frm.doc);
@@ -140,12 +140,12 @@
}
}
}
-
+
this.frm.get_field('items').grid.editable_fields = [
{fieldname: 'item_code', columns: 3},
{fieldname: 'warehouse', columns: 3},
{fieldname: 'qty', columns: 2},
- {fieldname: 'valuation_rate', columns: 3}
+ {fieldname: 'valuation_rate', columns: 2}
];
},