Merge branch 'hotfix'
This commit is contained in:
commit
89d494fbf5
@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.2.28'
|
__version__ = '7.2.29'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@ -171,20 +171,6 @@ class TestJournalEntry(unittest.TestCase):
|
|||||||
})
|
})
|
||||||
|
|
||||||
jv.submit()
|
jv.submit()
|
||||||
|
|
||||||
def test_clear_blank_rows(self):
|
|
||||||
je = make_journal_entry("_Test Bank - _TC", "_Test Account Stock Expenses - _TC", 100, save=False)
|
|
||||||
je.append("accounts", {
|
|
||||||
"account": "_Test Cash - _TC",
|
|
||||||
"debit_in_account_currency": 0,
|
|
||||||
"credit_in_account_currency": 0,
|
|
||||||
"exchange_rate": 1
|
|
||||||
})
|
|
||||||
|
|
||||||
self.assertEqual(len(je.get("accounts")), 3)
|
|
||||||
je.save()
|
|
||||||
self.assertEqual(len(je.get("accounts")), 2)
|
|
||||||
|
|
||||||
|
|
||||||
def make_journal_entry(account1, account2, amount, cost_center=None, posting_date=None, exchange_rate=1, save=True, submit=False, project=None):
|
def make_journal_entry(account1, account2, amount, cost_center=None, posting_date=None, exchange_rate=1, save=True, submit=False, project=None):
|
||||||
if not cost_center:
|
if not cost_center:
|
||||||
|
|||||||
@ -141,7 +141,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
|||||||
var item = frappe.get_doc(cdt, cdn);
|
var item = frappe.get_doc(cdt, cdn);
|
||||||
if ((doc.doctype == "Purchase Receipt") || (doc.doctype == "Purchase Invoice" && doc.update_stock)) {
|
if ((doc.doctype == "Purchase Receipt") || (doc.doctype == "Purchase Invoice" && doc.update_stock)) {
|
||||||
frappe.model.round_floats_in(item, ["qty", "received_qty"]);
|
frappe.model.round_floats_in(item, ["qty", "received_qty"]);
|
||||||
if(!(item.received_qty || item.rejected_qty) && item.qty) {
|
if(!item.rejected_qty && item.qty) {
|
||||||
item.received_qty = item.qty;
|
item.received_qty = item.qty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user