mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 23:33:43 +00:00
fix: resolve conflicts
This commit is contained in:
@@ -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", null, "Amount") }} {{doc.get_formatted("grand_total") }}
|
||||
=======
|
||||
{{ _("Pay") }} {{ pay_amount }}
|
||||
>>>>>>> 7efb5a8cb5 (fix(portal): context pay_amount for button)
|
||||
{{ _("Pay", null, "Amount") }} {{ pay_amount }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
<<<<<<< HEAD
|
||||
from erpnext.accounts.doctype.payment_request.payment_request import (
|
||||
ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST,
|
||||
get_amount,
|
||||
)
|
||||
=======
|
||||
from erpnext.accounts.doctype.payment_request.payment_request import get_amount
|
||||
>>>>>>> c18ff5bd25 (fix(portal): payment amount for orders)
|
||||
|
||||
|
||||
def get_context(context):
|
||||
@@ -54,15 +51,7 @@ def get_context(context):
|
||||
)
|
||||
context.available_loyalty_points = int(loyalty_program_details.get("loyalty_points"))
|
||||
|
||||
<<<<<<< HEAD
|
||||
context.show_pay_button = (
|
||||
"payments" in frappe.get_installed_apps()
|
||||
and frappe.db.get_single_value("Buying Settings", "show_pay_button")
|
||||
and context.doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST
|
||||
)
|
||||
=======
|
||||
context.show_pay_button, context.pay_amount = get_payment_details(context.doc)
|
||||
>>>>>>> c18ff5bd25 (fix(portal): payment amount for orders)
|
||||
context.show_make_pi_button = False
|
||||
if context.doc.get("supplier"):
|
||||
# show Make Purchase Invoice button based on permission
|
||||
@@ -79,10 +68,15 @@ def get_attachments(dt, dn):
|
||||
|
||||
def get_payment_details(doc):
|
||||
show_pay_button, amount = (
|
||||
"payments" in frappe.get_installed_apps()
|
||||
and frappe.db.get_single_value("Buying Settings", "show_pay_button")
|
||||
), 0
|
||||
(
|
||||
"payments" in frappe.get_installed_apps()
|
||||
and frappe.db.get_single_value("Buying Settings", "show_pay_button")
|
||||
and doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST
|
||||
),
|
||||
0,
|
||||
)
|
||||
if not show_pay_button:
|
||||
return show_pay_button, amount
|
||||
|
||||
amount = get_amount(doc)
|
||||
return bool(amount), amount
|
||||
|
||||
Reference in New Issue
Block a user