Merge pull request #4881 from nabinhait/develop

[fix] Show credit note button in sales invoice
This commit is contained in:
Nabin Hait 2016-02-26 15:18:52 +05:30
commit c37c7ed5c6

View File

@ -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"));