From bdf0f0a08dae01319e35a2ada90e9237a8f1a02b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 26 Feb 2016 16:26:20 +0530 Subject: [PATCH 1/3] [fix] Show debit note button in purchase invoice --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 358cf394adc..50a50d9042a 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -28,7 +28,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ this.frm.add_custom_button(__('Payment'), this.make_bank_entry, __("Make")); cur_frm.page.set_inner_btn_group_as_primary(__("Make")); } - if(Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) { + if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) { cur_frm.add_custom_button(__('Debit Note'), this.make_debit_note, __("Make")); } } From 56f7fa66ad3b025cf85926f327064ef4d8dbaba5 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 26 Feb 2016 17:19:11 +0530 Subject: [PATCH 2/3] [fix] Time log overlap validation --- erpnext/projects/doctype/time_log/time_log.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py index 6763209c353..5242b2cd47a 100644 --- a/erpnext/projects/doctype/time_log/time_log.py +++ b/erpnext/projects/doctype/time_log/time_log.py @@ -88,10 +88,9 @@ class TimeLog(Document): existing = frappe.db.sql("""select name, from_time, to_time from `tabTime Log` where `{0}`=%(val)s and ( - (from_time > %(from_time)s and from_time < %(to_time)s) or - (to_time > %(from_time)s and to_time < %(to_time)s) or - (%(from_time)s > from_time and %(from_time)s < to_time) or - (%(from_time)s = from_time and %(to_time)s = to_time)) + (%(from_time)s between from_time and to_time) or + (%(to_time)s between from_time and to_time) or + (%(from_time)s <= from_time and %(to_time)s >= to_time)) and name!=%(name)s and docstatus < 2""".format(fieldname), { From 658b3260c24b5f395e3f54968b046b86222c6537 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 26 Feb 2016 18:04:46 +0600 Subject: [PATCH 3/3] bumped to version 6.23.5 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index c523351163b..6dfe2fe3d27 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1,2 +1,2 @@ from __future__ import unicode_literals -__version__ = '6.23.4' +__version__ = '6.23.5' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index f783fdf7acd..d7eb5f44ed4 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd." app_description = """ERP made simple""" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "6.23.4" +app_version = "6.23.5" app_email = "info@erpnext.com" app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" diff --git a/setup.py b/setup.py index c0431c2000d..70e8e3ea9b1 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages from pip.req import parse_requirements -version = "6.23.4" +version = "6.23.5" requirements = parse_requirements("requirements.txt", session="") setup(