chore: fix conflicts

This commit is contained in:
rohitwaghchaure
2025-01-11 10:59:26 +05:30
committed by GitHub
parent 0df18080c7
commit 9426a32184

View File

@@ -3,13 +3,6 @@
from frappe.model.document import Document
<<<<<<< HEAD
=======
from frappe.utils.data import cint
from erpnext.assets.doctype.asset.depreciation import get_disposal_account_and_cost_center
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
>>>>>>> 61efb2bb39 (fix: delivery_document_no column issue)
class SalesInvoiceItem(Document):
@@ -100,35 +93,4 @@ class SalesInvoiceItem(Document):
weight_uom: DF.Link | None
# end: auto-generated types
<<<<<<< HEAD
pass
=======
def validate_cost_center(self, company: str):
cost_center_company = frappe.get_cached_value("Cost Center", self.cost_center, "company")
if cost_center_company != company:
frappe.throw(
_("Row #{0}: Cost Center {1} does not belong to company {2}").format(
frappe.bold(self.idx), frappe.bold(self.cost_center), frappe.bold(company)
)
)
def set_actual_qty(self):
if self.item_code and self.warehouse:
self.actual_qty = (
frappe.db.get_value(
"Bin", {"item_code": self.item_code, "warehouse": self.warehouse}, "actual_qty"
)
or 0
)
def set_income_account_for_fixed_asset(self, company: str):
"""Set income account for fixed asset item based on company's disposal account and cost center."""
if not self.is_fixed_asset:
return
disposal_account, depreciation_cost_center = get_disposal_account_and_cost_center(company)
self.income_account = disposal_account
if not self.cost_center:
self.cost_center = depreciation_cost_center
>>>>>>> 61efb2bb39 (fix: delivery_document_no column issue)