mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 06:29:20 +00:00
[fix] [minor] new grid fix to hide other grid
This commit is contained in:
@@ -13,11 +13,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
cur_frm.cscript.show_item_prices = function() {
|
cur_frm.cscript.show_item_prices = function() {
|
||||||
var item_price = wn.model.get("Item Price", {parent: cur_frm.doc.name});
|
var item_price = wn.model.get("Item Price", {parent: cur_frm.doc.name});
|
||||||
var show = item_price && item_price.length;
|
|
||||||
|
cur_frm.toggle_display("item_prices", true);
|
||||||
cur_frm.toggle_display("item_prices", show);
|
|
||||||
$(cur_frm.fields_dict.item_prices.wrapper).empty();
|
$(cur_frm.fields_dict.item_prices.wrapper).empty();
|
||||||
if (!show) return;
|
|
||||||
|
|
||||||
new wn.ui.form.TableGrid({
|
new wn.ui.form.TableGrid({
|
||||||
parent: cur_frm.fields_dict.item_prices.wrapper,
|
parent: cur_frm.fields_dict.item_prices.wrapper,
|
||||||
|
|||||||
Reference in New Issue
Block a user