Files
enlight-lms/lms/www/billing/billing.html
2023-09-22 21:46:08 +05:30

76 lines
2.1 KiB
HTML

{% extends "lms/templates/lms_base.html" %}
{% block title %}
{{ title }} {{ _("Billing") }}
{% endblock %}
{% block page_content %}
<div class="common-page-style">
<div class="container form-width common-card-style column-card px-0 h-0 mt-8">
{{ Header() }}
{{ Details() }}
{{ BillingDetails() }}
</div>
</div>
{% endblock %}
{% macro Header() %}
<div class="px-4 pb-2">
<div class="page-title">
{{ _("Order Details") }}
</div>
<div>
{{ _("Enter the billing information to complete the payment.").format(module) }}
</div>
</div>
{% endmacro %}
{% macro Details() %}
<div class="px-4 pt-5 border-top">
<div class="">
<div class="flex mb-2">
<div class="field-label">
{% set label = "Course" if module == "course" else "Batch" %}
{{ _(label) }} : {{ title }}
</div>
</div>
<div class="flex">
<div class="field-label">
{{ _("Total Price: ") }}
<span class="total-price">{{ frappe.utils.fmt_money(amount, 2, currency) }}</span>
</div>
</div>
{% if gst_applied %}
<span class="small mt-2">
{{ _("18% GST included") }}
</span>
{% endif %}
</div>
</div>
{% endmacro %}
{% macro BillingDetails() %}
<div class="mt-8 px-4">
<div class="bold-heading mb-4">
{{ _("Billing Details") }}
</div>
<div id="billing-form"></div>
<button class="btn btn-primary btn-md btn-pay" data-doctype="{{ doctype }}" data-name="{{ docname | urlencode }}">
{{ "Proceed to Payment" }}
</button>
</div>
{% endmacro %}
{%- block script %}
{{ super() }}
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
const address = {{ address if address else 0 }};
const amount = {{ amount }};
const currency = "{{ currency }}";
const exception_country = {{ exception_country }};
const original_price_formatted = "{{ frappe.utils.fmt_money(original_amount, 0, original_currency) }}"
</script>
{% endblock %}