Skip to content

Commit

Permalink
chore: fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Jan 11, 2025
1 parent 0df1808 commit 9426a32
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)

0 comments on commit 9426a32

Please sign in to comment.