mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 00:25:01 +00:00
chore: resolve conflicts
This commit is contained in:
@@ -76,48 +76,6 @@ def get_fiscal_years(
|
||||
as_dict=False,
|
||||
boolean=False,
|
||||
):
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
if transaction_date:
|
||||
transaction_date = getdate(transaction_date)
|
||||
# backwards compat
|
||||
if boolean is not None:
|
||||
raise_on_missing = not boolean
|
||||
|
||||
all_fiscal_years = _get_fiscal_years(company=company)
|
||||
|
||||
# No restricting selectors
|
||||
if not transaction_date and not fiscal_year:
|
||||
return all_fiscal_years
|
||||
|
||||
for fy in all_fiscal_years:
|
||||
if (fiscal_year and fy.name == fiscal_year) or (
|
||||
transaction_date
|
||||
and getdate(fy.year_start_date) <= transaction_date
|
||||
and getdate(fy.year_end_date) >= transaction_date
|
||||
):
|
||||
if as_dict:
|
||||
return (fy,)
|
||||
else:
|
||||
return ((fy.name, fy.year_start_date, fy.year_end_date),)
|
||||
|
||||
# No match for restricting selectors
|
||||
if raise_on_missing:
|
||||
error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(
|
||||
_(label), formatdate(transaction_date)
|
||||
)
|
||||
if company:
|
||||
error_msg = _("""{0} for {1}""").format(error_msg, frappe.bold(company))
|
||||
|
||||
if verbose == 1:
|
||||
frappe.msgprint(error_msg)
|
||||
|
||||
raise FiscalYearError(error_msg)
|
||||
return []
|
||||
|
||||
|
||||
def _get_fiscal_years(company=None):
|
||||
>>>>>>> a87e7fde03 (fix: in_contex_translation_fixes)
|
||||
fiscal_years = frappe.cache().hget("fiscal_years", company) or []
|
||||
|
||||
if not fiscal_years:
|
||||
|
||||
@@ -40,11 +40,7 @@
|
||||
<p>
|
||||
<a href="/api/method/erpnext.accounts.doctype.payment_request.payment_request.make_payment_request?dn={{ doc.name }}&dt={{ doc.doctype }}&submit_doc=1&order_type=Shopping Cart"
|
||||
class="btn btn-primary btn-sm" id="pay-for-order">
|
||||
<<<<<<< HEAD
|
||||
{{ _("Pay") }} {{doc.get_formatted("grand_total") }}
|
||||
=======
|
||||
{{ _("Pay", null, "Amount") }} {{ pay_amount }}
|
||||
>>>>>>> a87e7fde03 (fix: in_contex_translation_fixes)
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user