fix: Missing commits from hotfix branch (#17997)

* fix: merge conflict

* fix: restored missing set_gst_state_and_state_number function

* fix: style linting as per codacy

* fix: Fixes related to customer/lead merging

* fix: merge conflict

* fix: Fixes related to customer/lead merging

* fix: Assign isue/opportunity to user

* fix: Assign isue/opportunity to user

* fix: Replaced Invoice type by GST Category

* fix: merge conflict

* fix: merge conflict

* fix: test cases

* fix: test cases
This commit is contained in:
Nabin Hait
2019-07-03 10:34:31 +05:30
committed by GitHub
parent 7763d0a059
commit 34c551d9a5
194 changed files with 34197 additions and 21884 deletions

View File

@@ -8,10 +8,17 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) {
method = "erpnext.accounts.party.get_party_details";
}
if(!args) {
if(frm.doctype != "Purchase Order" && frm.doc.customer) {
if((frm.doctype != "Purchase Order" && frm.doc.customer)
|| (frm.doc.party_name && in_list(['Quotation', 'Opportunity'], frm.doc.doctype))) {
let party_type = "Customer";
if(frm.doc.quotation_to && frm.doc.quotation_to === "Lead") {
party_type = "Lead";
}
args = {
party: frm.doc.customer,
party_type: "Customer",
party: frm.doc.customer || frm.doc.party_name,
party_type: party_type,
price_list: frm.doc.selling_price_list
};
} else if(frm.doc.supplier) {
@@ -104,7 +111,7 @@ erpnext.utils.set_taxes_from_address = function(frm, triggered_from_field, billi
if(frappe.meta.get_docfield(frm.doc.doctype, "taxes")) {
if(!erpnext.utils.validate_mandatory(frm, "Lead/Customer/Supplier",
frm.doc.customer || frm.doc.supplier || frm.doc.lead, triggered_from_field)) {
frm.doc.customer || frm.doc.supplier || frm.doc.lead || frm.doc.party_name, triggered_from_field)) {
return;
}
@@ -160,6 +167,9 @@ erpnext.utils.set_taxes = function(frm, triggered_from_field) {
} else if (frm.doc.supplier) {
party_type = 'Supplier';
party = frm.doc.supplier;
} else if (frm.doc.quotation_to){
party_type = frm.doc.quotation_to;
party = frm.doc.party_name;
}
frappe.call({