Skip to content

Commit

Permalink
chore: resolving conflicts and renaming entries to assets
Browse files Browse the repository at this point in the history
  • Loading branch information
anandbaburajan committed Jun 20, 2023
1 parent b0105e4 commit 7a3e86f
Showing 1 changed file with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,38 +202,16 @@ def prepare_chart_data(data, filters):
def get_assets_linked_to_fb(filters):
afb = frappe.qb.DocType("Asset Finance Book")

<<<<<<< HEAD
return flt(depr_amount, 2)


def get_finance_book_value_map(filters):
date = filters.to_date if filters.filter_based_on == "Date Range" else filters.year_end_date

return frappe._dict(
frappe.db.sql(
""" Select
parent, SUM(depreciation_amount)
FROM `tabDepreciation Schedule`
WHERE
parentfield='schedules'
AND schedule_date<=%s
AND journal_entry IS NOT NULL
AND ifnull(finance_book, '')=%s
GROUP BY parent""",
(date, cstr(filters.finance_book or "")),
)
=======
query = frappe.qb.from_(afb).select(
afb.parent,
>>>>>>> 0d12588583 (fix: date and finance book fixes in fixed asset register (#35751))
)

if filters.include_default_book_assets:
company_fb = frappe.get_cached_value("Company", filters.company, "default_finance_book")

if filters.finance_book and company_fb and cstr(filters.finance_book) != cstr(company_fb):
frappe.throw(
_("To use a different finance book, please uncheck 'Include Default Book Entries'")
_("To use a different finance book, please uncheck 'Include Default Book Assets'")
)

query = query.where(
Expand Down

0 comments on commit 7a3e86f

Please sign in to comment.