[fix] Test cases and editable fields settings for request for quotation
This commit is contained in:
parent
4eaeda710d
commit
9a5cf6000e
@ -64,7 +64,9 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
|
||||
|
||||
def check_opening_balance(asset, liability, equity):
|
||||
# Check if previous year balance sheet closed
|
||||
opening_balance = flt(asset[0].get("opening_balance", 0))
|
||||
opening_balance = 0
|
||||
if asset:
|
||||
opening_balance = flt(asset[0].get("opening_balance", 0))
|
||||
if liability:
|
||||
opening_balance -= flt(liability[0].get("opening_balance", 0))
|
||||
if equity:
|
||||
|
@ -12,7 +12,7 @@ cur_frm.email_field = "contact_email";
|
||||
erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
setup: function() {
|
||||
this._super();
|
||||
if(!this.frm.get_field('items').grid.editable_fields){
|
||||
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: 'qty', columns: 2},
|
||||
|
@ -14,6 +14,19 @@ frappe.ui.form.on("Request for Quotation",{
|
||||
filters: {'supplier': d.supplier}
|
||||
}
|
||||
}
|
||||
|
||||
frm.get_field('items').grid.editable_fields = [
|
||||
{fieldname: 'item_code', columns: 4},
|
||||
{fieldname: 'qty', columns: 2},
|
||||
{fieldname: 'schedule_date', columns: 2},
|
||||
{fieldname: 'warehouse', columns: 3},
|
||||
];
|
||||
|
||||
frm.get_field('suppliers').grid.editable_fields = [
|
||||
{fieldname: 'supplier', columns: 5},
|
||||
{fieldname: 'contact', columns: 3},
|
||||
{fieldname: 'email_id', columns: 3}
|
||||
];
|
||||
},
|
||||
|
||||
onload: function(frm){
|
||||
|
@ -147,7 +147,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-05-10 11:36:04.171180",
|
||||
"modified": "2016-05-31 19:08:15.397706",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Request for Quotation Supplier",
|
||||
|
@ -36,4 +36,6 @@ class TestShoppingCartSettings(unittest.TestCase):
|
||||
cart_settings.enabled = 1
|
||||
if not frappe.db.get_value("Tax Rule", {"use_for_shopping_cart": 1}, "name"):
|
||||
self.assertRaises(ShoppingCartSetupError, cart_settings.validate_tax_rule)
|
||||
|
||||
frappe.db.sql("update `tabTax Rule` set use_for_shopping_cart = 1")
|
||||
|
||||
|
@ -101,7 +101,7 @@ class TestShoppingCart(unittest.TestCase):
|
||||
quotation = self.create_quotation()
|
||||
|
||||
from erpnext.accounts.party import set_taxes
|
||||
|
||||
|
||||
tax_rule_master = set_taxes(quotation.customer, "Customer", \
|
||||
quotation.transaction_date, quotation.company, None, None, \
|
||||
quotation.customer_address, quotation.shipping_address_name, 1)
|
||||
@ -131,6 +131,9 @@ class TestShoppingCart(unittest.TestCase):
|
||||
"taxes": frappe.get_doc("Sales Taxes and Charges Template", "_Test Tax 1").taxes,
|
||||
"company": "_Test Company"
|
||||
}
|
||||
|
||||
for d in values["taxes"]:
|
||||
d.name = None
|
||||
|
||||
quotation.update(values)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user