[minor] [tests] fix, tests will fail on the 5th of a month!
This commit is contained in:
parent
7b4bdffea2
commit
8b133ac087
@ -76,7 +76,7 @@ class TestSalarySlip(unittest.TestCase):
|
||||
if getdate(nowdate()).day >= 15:
|
||||
date_of_joining = getdate(add_days(nowdate(),-10))
|
||||
relieving_date = getdate(add_days(nowdate(),-10))
|
||||
elif getdate(nowdate()).day < 15 and getdate(nowdate()).day > 5:
|
||||
elif getdate(nowdate()).day < 15 and getdate(nowdate()).day >= 5:
|
||||
date_of_joining = getdate(add_days(nowdate(),-3))
|
||||
relieving_date = getdate(add_days(nowdate(),-3))
|
||||
elif getdate(nowdate()).day < 5 and not getdate(nowdate()).day == 1:
|
||||
|
@ -74,7 +74,7 @@ class Warehouse(NestedSet):
|
||||
ac_doc.flags.ignore_mandatory = True
|
||||
try:
|
||||
ac_doc.insert()
|
||||
msgprint(_("Account head {0} created").format(ac_doc.name))
|
||||
msgprint(_("Account head {0} created").format(ac_doc.name), indicator='green', alert=True)
|
||||
|
||||
except frappe.DuplicateEntryError, e:
|
||||
if not (e.args and e.args[0]=='Account'):
|
||||
@ -193,9 +193,9 @@ class Warehouse(NestedSet):
|
||||
existing_allow_negative_stock = frappe.db.get_value("Stock Settings", None, "allow_negative_stock")
|
||||
frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1)
|
||||
|
||||
repost_stock_for_items = frappe.db.sql_list("""select distinct item_code
|
||||
repost_stock_for_items = frappe.db.sql_list("""select distinct item_code
|
||||
from tabBin where warehouse=%s""", newdn)
|
||||
|
||||
|
||||
# Delete all existing bins to avoid duplicate bins for the same item and warehouse
|
||||
frappe.db.sql("delete from `tabBin` where warehouse=%s", newdn)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user