From 0f6eac3b35944fe3874d071d3dcf57fcce35bb07 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 26 Feb 2016 13:01:22 +0530 Subject: [PATCH] [fix] Show credit note button in sales invoice --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 200fca6d66..d4d00ffec8 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -57,7 +57,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte return item.is_delivered_by_supplier ? true : false; }) - 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(doc.update_stock ? __('Sales Return') : __('Credit Note'), this.make_sales_return, __("Make")); cur_frm.page.set_inner_btn_group_as_primary(__("Make"));