Merge branch 'hotfix'
This commit is contained in:
commit
75f3f81a9b
@ -4,7 +4,7 @@ import inspect
|
|||||||
import frappe
|
import frappe
|
||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
|
|
||||||
__version__ = '9.2.2'
|
__version__ = '9.2.3'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -648,13 +648,13 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
|
|
||||||
set_difference_amount: function(frm) {
|
set_difference_amount: function(frm) {
|
||||||
var unallocated_amount = 0;
|
var unallocated_amount = 0;
|
||||||
|
var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [],
|
||||||
|
function(d) { return flt(d.amount) }));
|
||||||
|
|
||||||
if(frm.doc.party) {
|
if(frm.doc.party) {
|
||||||
var party_amount = frm.doc.payment_type=="Receive" ?
|
var party_amount = frm.doc.payment_type=="Receive" ?
|
||||||
frm.doc.paid_amount : frm.doc.received_amount;
|
frm.doc.paid_amount : frm.doc.received_amount;
|
||||||
|
|
||||||
var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [],
|
|
||||||
function(d) { return flt(d.amount) }));
|
|
||||||
|
|
||||||
if(frm.doc.total_allocated_amount < party_amount) {
|
if(frm.doc.total_allocated_amount < party_amount) {
|
||||||
if(frm.doc.payment_type == "Receive") {
|
if(frm.doc.payment_type == "Receive") {
|
||||||
unallocated_amount = party_amount - (frm.doc.total_allocated_amount - total_deductions);
|
unallocated_amount = party_amount - (frm.doc.total_allocated_amount - total_deductions);
|
||||||
|
@ -87,22 +87,24 @@ frappe.ui.form.on('Employee Loan', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
employee_loan_application: function (frm) {
|
employee_loan_application: function (frm) {
|
||||||
return frappe.call({
|
if(frm.doc.employee_loan_application){
|
||||||
method: "erpnext.hr.doctype.employee_loan.employee_loan.get_employee_loan_application",
|
return frappe.call({
|
||||||
args: {
|
method: "erpnext.hr.doctype.employee_loan.employee_loan.get_employee_loan_application",
|
||||||
"employee_loan_application": frm.doc.employee_loan_application
|
args: {
|
||||||
},
|
"employee_loan_application": frm.doc.employee_loan_application
|
||||||
callback: function (r) {
|
},
|
||||||
if (!r.exc && r.message) {
|
callback: function (r) {
|
||||||
frm.set_value("loan_type", r.message.loan_type);
|
if (!r.exc && r.message) {
|
||||||
frm.set_value("loan_amount", r.message.loan_amount);
|
frm.set_value("loan_type", r.message.loan_type);
|
||||||
frm.set_value("repayment_method", r.message.repayment_method);
|
frm.set_value("loan_amount", r.message.loan_amount);
|
||||||
frm.set_value("monthly_repayment_amount", r.message.repayment_amount);
|
frm.set_value("repayment_method", r.message.repayment_method);
|
||||||
frm.set_value("repayment_periods", r.message.repayment_periods);
|
frm.set_value("monthly_repayment_amount", r.message.repayment_amount);
|
||||||
frm.set_value("rate_of_interest", r.message.rate_of_interest);
|
frm.set_value("repayment_periods", r.message.repayment_periods);
|
||||||
}
|
frm.set_value("rate_of_interest", r.message.rate_of_interest);
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
repayment_method: function (frm) {
|
repayment_method: function (frm) {
|
||||||
|
@ -34,7 +34,9 @@ def get_categories():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_item_details(hub_sync_id):
|
def get_item_details(hub_sync_id=None):
|
||||||
|
if not hub_sync_id:
|
||||||
|
return
|
||||||
connection = get_connection()
|
connection = get_connection()
|
||||||
return connection.get_doc('Hub Item', hub_sync_id)
|
return connection.get_doc('Hub Item', hub_sync_id)
|
||||||
|
|
||||||
|
@ -382,6 +382,7 @@ erpnext.hub.Hub = class Hub {
|
|||||||
},
|
},
|
||||||
method: "erpnext.hub_node.get_item_details",
|
method: "erpnext.hub_node.get_item_details",
|
||||||
callback: (r) => {
|
callback: (r) => {
|
||||||
|
if (!r || !r.message) return;
|
||||||
let item = r.message;
|
let item = r.message;
|
||||||
this.item_cache[item_code] = item;
|
this.item_cache[item_code] = item;
|
||||||
this.render_item_page(item);
|
this.render_item_page(item);
|
||||||
|
@ -477,9 +477,11 @@ def make_delivery_note(source_name, target_doc=None):
|
|||||||
target.qty = flt(source.qty) - flt(source.delivered_qty)
|
target.qty = flt(source.qty) - flt(source.delivered_qty)
|
||||||
|
|
||||||
item = frappe.db.get_value("Item", target.item_code, ["item_group", "selling_cost_center"], as_dict=1)
|
item = frappe.db.get_value("Item", target.item_code, ["item_group", "selling_cost_center"], as_dict=1)
|
||||||
target.cost_center = frappe.db.get_value("Project", source_parent.project, "cost_center") \
|
|
||||||
or item.selling_cost_center \
|
if item:
|
||||||
or frappe.db.get_value("Item Group", item.item_group, "default_cost_center")
|
target.cost_center = frappe.db.get_value("Project", source_parent.project, "cost_center") \
|
||||||
|
or item.selling_cost_center \
|
||||||
|
or frappe.db.get_value("Item Group", item.item_group, "default_cost_center")
|
||||||
|
|
||||||
target_doc = get_mapped_doc("Sales Order", source_name, {
|
target_doc = get_mapped_doc("Sales Order", source_name, {
|
||||||
"Sales Order": {
|
"Sales Order": {
|
||||||
|
@ -57,7 +57,7 @@ class Item(WebsiteGenerator):
|
|||||||
if not self.description:
|
if not self.description:
|
||||||
self.description = self.item_name
|
self.description = self.item_name
|
||||||
|
|
||||||
if self.is_sales_item and not self.is_item_from_hub:
|
if self.is_sales_item and not self.get('is_item_from_hub'):
|
||||||
self.publish_in_hub = 1
|
self.publish_in_hub = 1
|
||||||
|
|
||||||
def after_insert(self):
|
def after_insert(self):
|
||||||
|
@ -32,7 +32,7 @@ class Issue(Document):
|
|||||||
if email_id:
|
if email_id:
|
||||||
if not self.lead:
|
if not self.lead:
|
||||||
self.lead = frappe.db.get_value("Lead", {"email_id": email_id})
|
self.lead = frappe.db.get_value("Lead", {"email_id": email_id})
|
||||||
if not self.contact:
|
if not self.contact and not self.customer:
|
||||||
self.contact = frappe.db.get_value("Contact", {"email_id": email_id})
|
self.contact = frappe.db.get_value("Contact", {"email_id": email_id})
|
||||||
|
|
||||||
if self.contact:
|
if self.contact:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user