Merge branch 'develop' into cash-flow-chart
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 07494a2..c3c3e26 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -187,9 +187,13 @@
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"],
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.js b/erpnext/accounts/report/cash_flow/cash_flow.js
index 0422111..03940f4 100644
--- a/erpnext/accounts/report/cash_flow/cash_flow.js
+++ b/erpnext/accounts/report/cash_flow/cash_flow.js
@@ -8,17 +8,19 @@
// 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
diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js
index 824b8d9..750900e 100644
--- a/erpnext/public/js/controllers/buying.js
+++ b/erpnext/public/js/controllers/buying.js
@@ -141,6 +141,7 @@
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 @@
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();