From 285701d9f104400ef90c8e7ef8e3513b6c3dee21 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Wed, 10 Jul 2019 22:22:14 +0530 Subject: [PATCH 1/3] fix: Add missing Cost Center filter in cash flow statement --- .../accounts/report/cash_flow/cash_flow.js | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/report/cash_flow/cash_flow.js b/erpnext/accounts/report/cash_flow/cash_flow.js index 0422111093..03940f4b24 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.js +++ b/erpnext/accounts/report/cash_flow/cash_flow.js @@ -8,17 +8,19 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() { // The last item in the array is the definition for Presentation Currency // filter. It won't be used in cash flow for now so we pop it. Please take // of this if you are working here. - frappe.query_reports["Cash Flow"]["filters"].pop(); - frappe.query_reports["Cash Flow"]["filters"].push({ - "fieldname": "accumulated_values", - "label": __("Accumulated Values"), - "fieldtype": "Check" - }); + frappe.query_reports["Cash Flow"]["filters"].splice(5, 1); - frappe.query_reports["Cash Flow"]["filters"].push({ - "fieldname": "include_default_book_entries", - "label": __("Include Default Book Entries"), - "fieldtype": "Check" - }); + frappe.query_reports["Cash Flow"]["filters"].push( + { + "fieldname": "accumulated_values", + "label": __("Accumulated Values"), + "fieldtype": "Check" + }, + { + "fieldname": "include_default_book_entries", + "label": __("Include Default Book Entries"), + "fieldtype": "Check" + } + ); }); \ No newline at end of file From 4870e95b834c72664b5f138ec91e806968c0129a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 11 Jul 2019 10:03:35 +0530 Subject: [PATCH 2/3] fix: po, rate set as zero against the item (#18242) --- erpnext/public/js/controllers/buying.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 824b8d98d2..750900e3be 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -141,6 +141,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ price_list_rate: function(doc, cdt, cdn) { var item = frappe.get_doc(cdt, cdn); + frappe.model.round_floats_in(item, ["price_list_rate", "discount_percentage"]); let item_rate = item.price_list_rate; @@ -154,6 +155,8 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ if (item.discount_amount) { item.rate = flt((item.price_list_rate) - (item.discount_amount), precision('rate', item)); + } else { + item.rate = item_rate; } this.calculate_taxes_and_totals(); From bfcc84789f0e170e6dd1c11453fd8c05b2aec2e3 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Thu, 11 Jul 2019 10:04:46 +0530 Subject: [PATCH 3/3] fix(sales-invoice): get items from quotation (#18237) --- .../accounts/doctype/sales_invoice/sales_invoice.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 07494a27d6..c3c3e2643e 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -187,9 +187,13 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte method: "erpnext.selling.doctype.quotation.quotation.make_sales_invoice", source_doctype: "Quotation", target: me.frm, - setters: { - customer: me.frm.doc.customer || undefined, - }, + setters: [{ + fieldtype: 'Link', + label: __('Customer'), + options: 'Customer', + fieldname: 'party_name', + default: me.frm.doc.customer, + }], get_query_filters: { docstatus: 1, status: ["!=", "Lost"],