[fix] grid columns now restricted to 10
This commit is contained in:
parent
4fddff1606
commit
76b134192f
@ -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');
|
||||
|
@ -5,20 +5,20 @@ frappe.ui.form.on("Bank Reconciliation", {
|
||||
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": {
|
||||
|
@ -9,7 +9,7 @@ frappe.ui.form.on("Journal Entry", {
|
||||
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 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
|
||||
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
|
||||
},
|
||||
|
@ -12,7 +12,7 @@ frappe.ui.form.on('Payment Entry', {
|
||||
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}
|
||||
];
|
||||
|
@ -7,12 +7,12 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
|
||||
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 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
|
||||
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 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
|
||||
if(!inList(invoices, cstr(p.invoice_number))) p.invoice_number = null;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
refresh_field("payments");
|
||||
},
|
||||
|
||||
|
@ -454,13 +454,6 @@ frappe.ui.form.on('Sales Invoice', {
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if(frm.doc.is_pos){
|
||||
frm.get_field('payments').grid.editable_fields = [
|
||||
{fieldname: 'mode_of_payment', columns: 2},
|
||||
{fieldname: 'amount', columns: 2}
|
||||
];
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -14,7 +14,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
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}
|
||||
|
@ -16,7 +16,7 @@ frappe.ui.form.on("Request for Quotation",{
|
||||
}
|
||||
|
||||
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},
|
||||
|
@ -6,7 +6,7 @@ frappe.provide("erpnext.bom");
|
||||
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}
|
||||
|
@ -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}
|
||||
|
@ -5,7 +5,7 @@ cur_frm.add_fetch('employee', 'employee_name', 'employee_name');
|
||||
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 @@ frappe.ui.form.on("Timesheet", {
|
||||
|
||||
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");
|
||||
|
@ -6,7 +6,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
||||
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}
|
||||
|
@ -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 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
|
||||
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 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
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 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
make_payment_entry: function() {
|
||||
return frappe.call({
|
||||
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry",
|
||||
|
@ -15,7 +15,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
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}
|
||||
];
|
||||
},
|
||||
|
@ -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},
|
||||
|
@ -52,9 +52,9 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
|
||||
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}
|
||||
];
|
||||
|
||||
},
|
||||
|
@ -6,7 +6,7 @@ frappe.provide("erpnext.stock");
|
||||
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 @@ frappe.ui.form.on("Stock Reconciliation", {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (frm.doc.company) {
|
||||
erpnext.queries.setup_queries(frm, "Warehouse", function() {
|
||||
return erpnext.queries.warehouse(frm.doc);
|
||||
@ -140,12 +140,12 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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}
|
||||
];
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user