fix: sider issues
This commit is contained in:
@@ -31,7 +31,10 @@ class ERPNextAddress(Address):
|
||||
After Address is updated, update the related 'Primary Address' on Customer.
|
||||
"""
|
||||
address_display = get_address_display(self.as_dict())
|
||||
filters = { "customer_primary_address": self.name }
|
||||
filters = {
|
||||
"customer_primary_address": self.name
|
||||
}
|
||||
|
||||
customers = frappe.db.get_all("Customer", filters=filters, as_list=True)
|
||||
for customer_name in customers:
|
||||
frappe.db.set_value("Customer", customer_name[0], "primary_address", address_display)
|
||||
|
||||
@@ -6,9 +6,6 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from erpnext.accounts.utils import check_and_delete_linked_reports
|
||||
|
||||
from erpnext.accounts.utils import check_and_delete_linked_reports
|
||||
|
||||
|
||||
def execute():
|
||||
reports_to_delete = ["Requested Items To Be Ordered",
|
||||
"Purchase Order Items To Be Received or Billed","Purchase Order Items To Be Received",
|
||||
|
||||
@@ -6,9 +6,6 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from erpnext.accounts.utils import check_and_delete_linked_reports
|
||||
|
||||
from erpnext.accounts.utils import check_and_delete_linked_reports
|
||||
|
||||
|
||||
def execute():
|
||||
reports_to_delete = ["Ordered Items To Be Delivered", "Ordered Items To Be Billed"]
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ def get_projectwise_timesheet_data(project=None, parent=None, from_time=None, to
|
||||
tsd.activity_type as activity_type,
|
||||
tsd.description as description,
|
||||
ts.currency as currency,
|
||||
tsd.project_name as project_name
|
||||
tsd.project_name as project_name
|
||||
|
||||
FROM `tabTimesheet Detail` tsd
|
||||
|
||||
|
||||
@@ -1595,30 +1595,6 @@ class StockEntry(StockController):
|
||||
if material_request and material_request not in material_requests:
|
||||
material_requests.append(material_request)
|
||||
frappe.db.set_value('Material Request', material_request, 'transfer_status', status)
|
||||
|
||||
def update_items_for_process_loss(self):
|
||||
process_loss_dict = {}
|
||||
for d in self.get("items"):
|
||||
if not d.is_process_loss:
|
||||
continue
|
||||
|
||||
scrap_warehouse = frappe.db.get_single_value("Manufacturing Settings", "default_scrap_warehouse")
|
||||
if scrap_warehouse is not None:
|
||||
d.t_warehouse = scrap_warehouse
|
||||
d.is_scrap_item = 0
|
||||
|
||||
if d.item_code not in process_loss_dict:
|
||||
process_loss_dict[d.item_code] = [flt(0), flt(0)]
|
||||
process_loss_dict[d.item_code][0] += flt(d.transfer_qty)
|
||||
process_loss_dict[d.item_code][1] += flt(d.qty)
|
||||
|
||||
for d in self.get("items"):
|
||||
if not d.is_finished_item or d.item_code not in process_loss_dict:
|
||||
continue
|
||||
# Assumption: 1 finished item has 1 row.
|
||||
d.transfer_qty -= process_loss_dict[d.item_code][0]
|
||||
d.qty -= process_loss_dict[d.item_code][1]
|
||||
|
||||
|
||||
def update_items_for_process_loss(self):
|
||||
process_loss_dict = {}
|
||||
|
||||
Reference in New Issue
Block a user