Merge branch 'hotfix'
This commit is contained in:
commit
537db4c2c7
@ -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.23'
|
__version__ = '9.2.24'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -408,7 +408,7 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make read only if Accounts Settings doesn't allow stale rates
|
// Make read only if Accounts Settings doesn't allow stale rates
|
||||||
frm.set_df_property("source_exchange_rate", "read_only", erpnext.stale_rate_allowed());
|
frm.set_df_property("source_exchange_rate", "read_only", erpnext.stale_rate_allowed() ? 0 : 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
target_exchange_rate: function(frm) {
|
target_exchange_rate: function(frm) {
|
||||||
@ -429,7 +429,7 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
frm.set_paid_amount_based_on_received_amount = false;
|
frm.set_paid_amount_based_on_received_amount = false;
|
||||||
|
|
||||||
// Make read only if Accounts Settings doesn't allow stale rates
|
// Make read only if Accounts Settings doesn't allow stale rates
|
||||||
frm.set_df_property("target_exchange_rate", "read_only", erpnext.stale_rate_allowed());
|
frm.set_df_property("target_exchange_rate", "read_only", erpnext.stale_rate_allowed() ? 0 : 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
paid_amount: function(frm) {
|
paid_amount: function(frm) {
|
||||||
|
@ -7,12 +7,14 @@ frappe.query_reports["Sales Payment Summary"] = {
|
|||||||
"label": __("From Date"),
|
"label": __("From Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"default": frappe.datetime.get_today(),
|
"default": frappe.datetime.get_today(),
|
||||||
|
"reqd": 1,
|
||||||
"width": "80"
|
"width": "80"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"to_date",
|
"fieldname":"to_date",
|
||||||
"label": __("To Date"),
|
"label": __("To Date"),
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
|
"reqd": 1,
|
||||||
"default": frappe.datetime.get_today()
|
"default": frappe.datetime.get_today()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -37,11 +37,11 @@ def get_sales_payment_data(filters, columns):
|
|||||||
|
|
||||||
def get_conditions(filters):
|
def get_conditions(filters):
|
||||||
conditions = ""
|
conditions = ""
|
||||||
if filters.get("company"): conditions += " a.company=%(company)s"
|
if filters.get("from_date"): conditions += "a.posting_date >= %(from_date)s"
|
||||||
|
if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s"
|
||||||
|
if filters.get("company"): conditions += " and a.company=%(company)s"
|
||||||
if filters.get("customer"): conditions += " and a.customer = %(customer)s"
|
if filters.get("customer"): conditions += " and a.customer = %(customer)s"
|
||||||
if filters.get("owner"): conditions += " and a.owner = %(owner)s"
|
if filters.get("owner"): conditions += " and a.owner = %(owner)s"
|
||||||
if filters.get("from_date"): conditions += " and a.posting_date >= %(from_date)s"
|
|
||||||
if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s"
|
|
||||||
if filters.get("is_pos"): conditions += " and a.is_pos = %(is_pos)s"
|
if filters.get("is_pos"): conditions += " and a.is_pos = %(is_pos)s"
|
||||||
return conditions
|
return conditions
|
||||||
|
|
||||||
|
@ -519,6 +519,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite
|
|||||||
# Did not use qty_consumed_per_unit in the query, as it leads to rounding loss
|
# Did not use qty_consumed_per_unit in the query, as it leads to rounding loss
|
||||||
query = """select
|
query = """select
|
||||||
bom_item.item_code,
|
bom_item.item_code,
|
||||||
|
bom_item.idx,
|
||||||
item.item_name,
|
item.item_name,
|
||||||
sum(bom_item.stock_qty/ifnull(bom.quantity, 1)) * %(qty)s as qty,
|
sum(bom_item.stock_qty/ifnull(bom.quantity, 1)) * %(qty)s as qty,
|
||||||
item.description,
|
item.description,
|
||||||
|
@ -171,7 +171,10 @@ erpnext.utils.validate_mandatory = function(frm, label, value, trigger_on) {
|
|||||||
erpnext.utils.get_shipping_address = function(frm, callback){
|
erpnext.utils.get_shipping_address = function(frm, callback){
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "frappe.contacts.doctype.address.address.get_shipping_address",
|
method: "frappe.contacts.doctype.address.address.get_shipping_address",
|
||||||
args: {company: frm.doc.company},
|
args: {
|
||||||
|
company: frm.doc.company,
|
||||||
|
address: frm.doc.shipping_address
|
||||||
|
},
|
||||||
callback: function(r){
|
callback: function(r){
|
||||||
if(r.message){
|
if(r.message){
|
||||||
frm.set_value("shipping_address", r.message[0]) //Address title or name
|
frm.set_value("shipping_address", r.message[0]) //Address title or name
|
||||||
|
@ -980,7 +980,7 @@ class POSItems {
|
|||||||
}
|
}
|
||||||
curr_row += all_items[i];
|
curr_row += all_items[i];
|
||||||
|
|
||||||
if(i == all_items.length - 1 && all_items.length % 4 !== 0) {
|
if(i == all_items.length - 1) {
|
||||||
row_items.push(curr_row);
|
row_items.push(curr_row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,9 @@ class StockEntry(StockController):
|
|||||||
self.validate_with_material_request()
|
self.validate_with_material_request()
|
||||||
self.validate_batch()
|
self.validate_batch()
|
||||||
|
|
||||||
|
if not self.from_bom:
|
||||||
|
self.fg_completed_qty = 0.0
|
||||||
|
|
||||||
if self._action == 'submit':
|
if self._action == 'submit':
|
||||||
self.make_batches('t_warehouse')
|
self.make_batches('t_warehouse')
|
||||||
else:
|
else:
|
||||||
@ -351,6 +354,7 @@ class StockEntry(StockController):
|
|||||||
if self.purpose == "Subcontract" and self.purchase_order:
|
if self.purpose == "Subcontract" and self.purchase_order:
|
||||||
purchase_order = frappe.get_doc("Purchase Order", self.purchase_order)
|
purchase_order = frappe.get_doc("Purchase Order", self.purchase_order)
|
||||||
for se_item in self.items:
|
for se_item in self.items:
|
||||||
|
precision = cint(frappe.db.get_default("float_precision")) or 3
|
||||||
total_allowed = sum([flt(d.required_qty) for d in purchase_order.supplied_items \
|
total_allowed = sum([flt(d.required_qty) for d in purchase_order.supplied_items \
|
||||||
if d.rm_item_code == se_item.item_code])
|
if d.rm_item_code == se_item.item_code])
|
||||||
if not total_allowed:
|
if not total_allowed:
|
||||||
@ -364,8 +368,8 @@ class StockEntry(StockController):
|
|||||||
and `tabStock Entry Detail`.parent = `tabStock Entry`.name""",
|
and `tabStock Entry Detail`.parent = `tabStock Entry`.name""",
|
||||||
(self.purchase_order, se_item.item_code))[0][0]
|
(self.purchase_order, se_item.item_code))[0][0]
|
||||||
|
|
||||||
if total_supplied > total_allowed:
|
if flt(total_supplied, precision) > flt(total_allowed, precision):
|
||||||
frappe.throw(_("Not allowed to tranfer more {0} than {1} against Purchase Order {2}").format(se_item.item_code,
|
frappe.throw(_("Not allowed to transfer more {0} than {1} against Purchase Order {2}").format(se_item.item_code,
|
||||||
total_allowed, self.purchase_order))
|
total_allowed, self.purchase_order))
|
||||||
|
|
||||||
def validate_bom(self):
|
def validate_bom(self):
|
||||||
@ -771,6 +775,9 @@ class StockEntry(StockController):
|
|||||||
se_child.expense_account = item_dict[d].get("expense_account") or expense_account
|
se_child.expense_account = item_dict[d].get("expense_account") or expense_account
|
||||||
se_child.cost_center = item_dict[d].get("cost_center") or cost_center
|
se_child.cost_center = item_dict[d].get("cost_center") or cost_center
|
||||||
|
|
||||||
|
if item_dict[d].get("idx"):
|
||||||
|
se_child.idx = item_dict[d].get("idx")
|
||||||
|
|
||||||
if se_child.s_warehouse==None:
|
if se_child.s_warehouse==None:
|
||||||
se_child.s_warehouse = self.from_warehouse
|
se_child.s_warehouse = self.from_warehouse
|
||||||
if se_child.t_warehouse==None:
|
if se_child.t_warehouse==None:
|
||||||
|
Loading…
Reference in New Issue
Block a user