mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 11:55:11 +00:00
Merge branch 'version-12-hotfix' into v12-hotfix-clear_pricing_rule_value
This commit is contained in:
@@ -452,6 +452,8 @@ class PaymentEntry(AccountsController):
|
||||
frappe.throw(_("Reference No and Reference Date is mandatory for Bank transaction"))
|
||||
|
||||
def set_remarks(self):
|
||||
if self.remarks: return
|
||||
|
||||
if self.payment_type=="Internal Transfer":
|
||||
remarks = [_("Amount {0} {1} transferred from {2} to {3}")
|
||||
.format(self.paid_from_account_currency, self.paid_amount, self.paid_from, self.paid_to)]
|
||||
|
||||
@@ -244,6 +244,9 @@ doc_events = {
|
||||
"on_cancel": "erpnext.regional.italy.utils.sales_invoice_on_cancel",
|
||||
"on_trash": "erpnext.regional.check_deletion_permission"
|
||||
},
|
||||
"Purchase Invoice": {
|
||||
"on_submit": "erpnext.regional.india.utils.make_reverse_charge_entries"
|
||||
},
|
||||
"Payment Entry": {
|
||||
"on_submit": ["erpnext.regional.create_transaction_log", "erpnext.accounts.doctype.payment_request.payment_request.update_payment_req_status"],
|
||||
"on_trash": "erpnext.regional.check_deletion_permission"
|
||||
|
||||
@@ -534,6 +534,12 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
},
|
||||
() => me.frm.script_manager.trigger("price_list_rate", cdt, cdn),
|
||||
() => me.toggle_conversion_factor(item),
|
||||
() => {
|
||||
if (show_batch_dialog && !item.has_serial_no
|
||||
&& !item.has_batch_no) {
|
||||
show_batch_dialog = false;
|
||||
}
|
||||
},
|
||||
() => {
|
||||
if (show_batch_dialog)
|
||||
return frappe.db.get_value("Item", item.item_code, ["has_batch_no", "has_serial_no"])
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<td class="disabled"></td>
|
||||
<td class="disabled"></td>
|
||||
<tr>
|
||||
<td>(d) {{__("Inward Supplies(liable to reverse charge")}}</td>
|
||||
<td>(d) {{__("Inward Supplies(liable to reverse charge)")}}</td>
|
||||
<td class="right">{{ flt(data.sup_details.isup_rev.txval, 2) }}</td>
|
||||
<td class="right">{{ flt(data.sup_details.isup_rev.iamt, 2) }}</td>
|
||||
<td class="right">{{ flt(data.sup_details.isup_rev.camt, 2) }}</td>
|
||||
|
||||
@@ -158,7 +158,7 @@ class GSTR3BReport(Document):
|
||||
|
||||
self.prepare_data("Sales Invoice", outward_supply_tax_amounts, "sup_details", "osup_det", ["Registered Regular"])
|
||||
self.prepare_data("Sales Invoice", outward_supply_tax_amounts, "sup_details", "osup_zero", ["SEZ", "Deemed Export", "Overseas"])
|
||||
self.prepare_data("Purchase Invoice", inward_supply_tax_amounts, "sup_details", "isup_rev", ["Registered Regular"], reverse_charge="Y")
|
||||
self.prepare_data("Purchase Invoice", inward_supply_tax_amounts, "sup_details", "isup_rev", ["Unregistered", "Overseas"], reverse_charge="Y")
|
||||
self.report_dict["sup_details"]["osup_nil_exmp"]["txval"] = flt(self.get_nil_rated_supply_value(), 2)
|
||||
self.set_itc_details(itc_details)
|
||||
|
||||
@@ -192,31 +192,27 @@ class GSTR3BReport(Document):
|
||||
for d in self.report_dict["itc_elg"]["itc_avl"]:
|
||||
|
||||
itc_type = itc_type_map.get(d["ty"])
|
||||
gst_category = "Registered Regular"
|
||||
gst_category = ["Registered Regular"]
|
||||
|
||||
if d["ty"] == 'ISRC':
|
||||
reverse_charge = "Y"
|
||||
itc_type = 'All Other ITC'
|
||||
gst_category = ['Unregistered', 'Overseas']
|
||||
else:
|
||||
reverse_charge = "N"
|
||||
|
||||
for account_head in self.account_heads:
|
||||
for category in gst_category:
|
||||
for key in [['iamt', 'igst_account'], ['camt', 'cgst_account'], ['samt', 'sgst_account'], ['csamt', 'cess_account']]:
|
||||
d[key[0]] += flt(itc_details.get((category, itc_type, reverse_charge, account_head.get(key[1])), {}).get("amount"), 2)
|
||||
|
||||
d["iamt"] += flt(itc_details.get((gst_category, itc_type, reverse_charge, account_head.get('igst_account')), {}).get("amount"), 2)
|
||||
d["camt"] += flt(itc_details.get((gst_category, itc_type, reverse_charge, account_head.get('cgst_account')), {}).get("amount"), 2)
|
||||
d["samt"] += flt(itc_details.get((gst_category, itc_type, reverse_charge, account_head.get('sgst_account')), {}).get("amount"), 2)
|
||||
d["csamt"] += flt(itc_details.get((gst_category, itc_type, reverse_charge, account_head.get('cess_account')), {}).get("amount"), 2)
|
||||
|
||||
net_itc["iamt"] += flt(d["iamt"], 2)
|
||||
net_itc["camt"] += flt(d["camt"], 2)
|
||||
net_itc["samt"] += flt(d["samt"], 2)
|
||||
net_itc["csamt"] += flt(d["csamt"], 2)
|
||||
for key in ['iamt', 'camt', 'samt', 'csamt']:
|
||||
net_itc[key] += flt(d[key], 2)
|
||||
|
||||
for account_head in self.account_heads:
|
||||
itc_inelg = self.report_dict["itc_elg"]["itc_inelg"][1]
|
||||
itc_inelg["iamt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("igst_account")), {}).get("amount"), 2)
|
||||
itc_inelg["camt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("cgst_account")), {}).get("amount"), 2)
|
||||
itc_inelg["samt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("sgst_account")), {}).get("amount"), 2)
|
||||
itc_inelg["csamt"] = flt(itc_details.get(("Ineligible", "N", account_head.get("cess_account")), {}).get("amount"), 2)
|
||||
for key in [['iamt', 'igst_account'], ['camt', 'cgst_account'], ['samt', 'sgst_account'], ['csamt', 'cess_account']]:
|
||||
itc_inelg[key[0]] = flt(itc_details.get(("Ineligible", "N", account_head.get(key[1])), {}).get("amount"), 2)
|
||||
|
||||
def prepare_data(self, doctype, tax_details, supply_type, supply_category, gst_category_list, reverse_charge="N"):
|
||||
|
||||
@@ -274,17 +270,16 @@ class GSTR3BReport(Document):
|
||||
""" #nosec
|
||||
.format(doctype = doctype), (self.month_no, self.year, reverse_charge, self.company, self.gst_details.get("gstin"))))
|
||||
|
||||
def get_itc_details(self, reverse_charge='N'):
|
||||
|
||||
def get_itc_details(self):
|
||||
itc_amount = frappe.db.sql("""
|
||||
select s.gst_category, sum(t.tax_amount_after_discount_amount) as tax_amount, t.account_head, s.eligibility_for_itc, s.reverse_charge
|
||||
from `tabPurchase Invoice` s , `tabPurchase Taxes and Charges` t
|
||||
where s.docstatus = 1 and t.parent = s.name and s.reverse_charge = %s
|
||||
where s.docstatus = 1 and t.parent = s.name
|
||||
and month(s.posting_date) = %s and year(s.posting_date) = %s and s.company = %s
|
||||
and s.company_gstin = %s
|
||||
group by t.account_head, s.gst_category, s.eligibility_for_itc
|
||||
""",
|
||||
(reverse_charge, self.month_no, self.year, self.company, self.gst_details.get("gstin")), as_dict=1)
|
||||
(self.month_no, self.year, self.company, self.gst_details.get("gstin")), as_dict=1)
|
||||
|
||||
itc_details = {}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ from erpnext.hr.utils import get_salary_assignment
|
||||
from erpnext.hr.doctype.salary_structure.salary_structure import make_salary_slip
|
||||
from erpnext.regional.india import number_state_mapping
|
||||
from six import string_types
|
||||
from erpnext.accounts.general_ledger import make_gl_entries
|
||||
from erpnext.accounts.utils import get_account_currency
|
||||
|
||||
def validate_gstin_for_india(doc, method):
|
||||
if hasattr(doc, 'gst_state') and doc.gst_state:
|
||||
@@ -643,5 +645,53 @@ def get_gst_accounts(company, account_wise=False):
|
||||
elif val:
|
||||
gst_accounts[val] = acc
|
||||
|
||||
|
||||
return gst_accounts
|
||||
|
||||
def make_reverse_charge_entries(doc, method):
|
||||
country = frappe.get_cached_value('Company', doc.company, 'country')
|
||||
|
||||
if country != 'India':
|
||||
return
|
||||
|
||||
if doc.reverse_charge == 'Y':
|
||||
gl_entries = []
|
||||
gst_accounts = get_gst_accounts(doc.company)
|
||||
gst_account_list = gst_accounts.get('cgst_account') + gst_accounts.get('sgst_account') \
|
||||
+ gst_accounts.get('igst_account')
|
||||
|
||||
for tax in doc.get('taxes'):
|
||||
if tax.category not in ("Total", "Valuation and Total"):
|
||||
continue
|
||||
|
||||
if flt(tax.base_tax_amount_after_discount_amount) and tax.account_head in gst_account_list:
|
||||
account_currency = get_account_currency(tax.account_head)
|
||||
|
||||
gl_entries.append(doc.get_gl_dict(
|
||||
{
|
||||
"account": tax.account_head,
|
||||
"cost_center": tax.cost_center,
|
||||
"posting_date": doc.posting_date,
|
||||
"against": doc.supplier,
|
||||
"credit": tax.base_tax_amount_after_discount_amount,
|
||||
"credits_in_account_currency": tax.base_tax_amount_after_discount_amount \
|
||||
if account_currency==doc.company_currency \
|
||||
else tax.tax_amount_after_discount_amount
|
||||
}, account_currency, item=tax)
|
||||
)
|
||||
|
||||
gl_entries.append(doc.get_gl_dict(
|
||||
{
|
||||
"account": doc.credit_to if doc.doctype == 'Purchase Invoice' else doc.debit_to,
|
||||
"cost_center": doc.cost_center,
|
||||
"posting_date": doc.posting_date,
|
||||
"party_type": 'Supplier',
|
||||
"party": doc.supplier,
|
||||
"against": tax.account_head,
|
||||
"debit": tax.base_tax_amount_after_discount_amount,
|
||||
"debit_in_account_currency": tax.base_tax_amount_after_discount_amount \
|
||||
if account_currency==doc.company_currency \
|
||||
else tax.tax_amount_after_discount_amount
|
||||
}, account_currency, item=doc)
|
||||
)
|
||||
|
||||
make_gl_entries(gl_entries)
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"add_total_row": 0,
|
||||
"add_total_row": 1,
|
||||
"creation": "2018-09-21 12:46:29.451048",
|
||||
"disable_prepared_report": 0,
|
||||
"disabled": 0,
|
||||
@@ -7,7 +7,7 @@
|
||||
"doctype": "Report",
|
||||
"idx": 0,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2020-04-30 19:49:02.303320",
|
||||
"modified": "2020-06-19 17:41:03.132101",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Sales Analytics",
|
||||
|
||||
@@ -23,7 +23,14 @@ class Analytics(object):
|
||||
self.get_columns()
|
||||
self.get_data()
|
||||
self.get_chart_data()
|
||||
return self.columns, self.data, None, self.chart
|
||||
|
||||
# Skipping total row for tree-view reports
|
||||
skip_total_row = 0
|
||||
|
||||
if self.filters.tree_type in ["Supplier Group", "Item Group", "Customer Group", "Territory"]:
|
||||
skip_total_row = 1
|
||||
|
||||
return self.columns, self.data, None, self.chart, None, skip_total_row
|
||||
|
||||
def get_columns(self):
|
||||
self.columns = [{
|
||||
@@ -194,9 +201,6 @@ class Analytics(object):
|
||||
def get_rows(self):
|
||||
self.data = []
|
||||
self.get_periodic_data()
|
||||
total_row = {
|
||||
"entity": "Total",
|
||||
}
|
||||
|
||||
for entity, period_data in iteritems(self.entity_periodic_data):
|
||||
row = {
|
||||
@@ -210,9 +214,6 @@ class Analytics(object):
|
||||
row[scrub(period)] = amount
|
||||
total += amount
|
||||
|
||||
if not total_row.get(scrub(period)): total_row[scrub(period)] = 0
|
||||
total_row[scrub(period)] += amount
|
||||
|
||||
row["total"] = total
|
||||
|
||||
if self.filters.tree_type == "Item":
|
||||
@@ -220,8 +221,6 @@ class Analytics(object):
|
||||
|
||||
self.data.append(row)
|
||||
|
||||
self.data.append(total_row)
|
||||
|
||||
def get_rows_by_group(self):
|
||||
self.get_periodic_data()
|
||||
out = []
|
||||
|
||||
@@ -33,21 +33,6 @@ class TestAnalytics(unittest.TestCase):
|
||||
report = execute(filters)
|
||||
|
||||
expected_data = [
|
||||
{
|
||||
'entity': 'Total',
|
||||
'apr_2017': 0.0,
|
||||
'may_2017': 0.0,
|
||||
'jun_2017': 2000.0,
|
||||
'jul_2017': 1000.0,
|
||||
'aug_2017': 0.0,
|
||||
'sep_2017': 1500.0,
|
||||
'oct_2017': 1000.0,
|
||||
'nov_2017': 0.0,
|
||||
'dec_2017': 0.0,
|
||||
'jan_2018': 0.0,
|
||||
'feb_2018': 2000.0,
|
||||
'mar_2018': 0.0
|
||||
},
|
||||
{
|
||||
"entity": "_Test Customer 1",
|
||||
"entity_name": "_Test Customer 1",
|
||||
@@ -149,21 +134,6 @@ class TestAnalytics(unittest.TestCase):
|
||||
report = execute(filters)
|
||||
|
||||
expected_data = [
|
||||
{
|
||||
'entity': 'Total',
|
||||
'apr_2017': 0.0,
|
||||
'may_2017': 0.0,
|
||||
'jun_2017': 20.0,
|
||||
'jul_2017': 10.0,
|
||||
'aug_2017': 0.0,
|
||||
'sep_2017': 15.0,
|
||||
'oct_2017': 10.0,
|
||||
'nov_2017': 0.0,
|
||||
'dec_2017': 0.0,
|
||||
'jan_2018': 0.0,
|
||||
'feb_2018': 20.0,
|
||||
'mar_2018': 0.0
|
||||
},
|
||||
{
|
||||
"entity": "_Test Customer 1",
|
||||
"entity_name": "_Test Customer 1",
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
{% macro title() %}
|
||||
<div class="mb-3">
|
||||
<a href="/lms/course?name={{ course }}&program={{ program }}" class="text-muted">
|
||||
Back to Course
|
||||
{{_('Back to Course')}}
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
@@ -69,15 +69,15 @@
|
||||
|
||||
{% macro navigation() %}
|
||||
{% if previous %}
|
||||
<a href="/lms/content?program={{ program }}&course={{ course }}&topic={{ topic }}&type={{ previous.content_type }}&content={{ previous.content }}" class='btn text-muted' style="box-shadow: none;">Previous</a>
|
||||
<a href="/lms/content?program={{ program }}&course={{ course }}&topic={{ topic }}&type={{ previous.content_type }}&content={{ previous.content }}" class='btn text-muted' style="box-shadow: none;">{{_('Previous')}}</a>
|
||||
{% else %}
|
||||
<a href="/lms/course?name={{ course }}&program={{ program }}" class='btn text-muted' style="box-shadow: none;">Back to Course</a>
|
||||
<a href="/lms/course?name={{ course }}&program={{ program }}" class='btn text-muted' style="box-shadow: none;">{{ _('Back to Course') }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if next %}
|
||||
<button id="nextButton" onclick="handle('/lms/content?program={{ program }}&course={{ course }}&topic={{ topic }}&type={{ next.content_type }}&content={{ next.content }}')" class='btn btn-primary' disabled="true">Next</button>
|
||||
<button id="nextButton" onclick="handle('/lms/content?program={{ program }}&course={{ course }}&topic={{ topic }}&type={{ next.content_type }}&content={{ next.content }}')" class='btn btn-primary' disabled="true">{{_('Next')}}</button>
|
||||
{% else %}
|
||||
<button id="nextButton" onclick="handle('/lms/course?name={{ course }}&program={{ program }}')" class='btn btn-primary' disabled="true">Finish Topic</button>
|
||||
<button id="nextButton" onclick="handle('/lms/course?name={{ course }}&program={{ program }}')" class='btn btn-primary' disabled="true">{{_('Finish Topic')}}</button>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
{{ title() }}
|
||||
<div class="text-muted">
|
||||
{% if content.duration %}
|
||||
{{ content.duration }} Mins
|
||||
{{ content.duration }} {{_('Mins')}}
|
||||
{% endif %}
|
||||
|
||||
{% if content.publish_date and content.duration%}
|
||||
@@ -94,7 +94,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if content.publish_date %}
|
||||
Published on {{ content.publish_date.strftime('%d, %b %Y') }}
|
||||
{{_('Published on')}} {{ content.publish_date.strftime('%d, %b %Y') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,13 +109,13 @@
|
||||
{{ title() }}
|
||||
<div class="text-muted">
|
||||
{% if content.author or content.publish_date %}
|
||||
Published
|
||||
{{_('Published')}}
|
||||
{% endif %}
|
||||
{% if content.author %}
|
||||
by {{ content.author }}
|
||||
{{_('by')}} {{ content.author }}
|
||||
{% endif %}
|
||||
{% if content.publish_date %}
|
||||
on {{ content.publish_date.strftime('%d, %b %Y') }}
|
||||
{{_('on')}} {{ content.publish_date.strftime('%d, %b %Y') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -205,4 +205,4 @@
|
||||
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -72,11 +72,11 @@
|
||||
{% if has_access %}
|
||||
<div class='card-footer'>
|
||||
{% if progress[topic.name].completed %}
|
||||
<span class="indicator green">Completed</span>
|
||||
<span class="indicator green">{{_('Completed')}}</span>
|
||||
{% elif progress[topic.name].started %}
|
||||
<span class="indicator orange">In Progress</span>
|
||||
<span class="indicator orange">{{_('In Progress')}}</span>
|
||||
{% else %}
|
||||
<span class="indicator blue">Start</span>
|
||||
<span class="indicator blue">{{_('Start')}}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<p class='lead'>{{ education_settings.description }}</p>
|
||||
<p class="mt-4">
|
||||
{% if frappe.session.user == 'Guest' %}
|
||||
<a class="btn btn-primary btn-lg" href="'/login#signup'">Sign Up</a>
|
||||
<a class="btn btn-primary btn-lg" href="'/login#signup'">{{_('Sign Up')}}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
</div>
|
||||
{% if has_access or program.intro_video%}
|
||||
<div class='card-footer'>
|
||||
{% if has_access %} <span class="indicator green">Enrolled</span>
|
||||
{% elif program.intro_video %} <span><a href="{{ program.intro_video }}" target="blank">Watch Intro</a></span>
|
||||
{% if has_access %} <span class="indicator green">{{_('Enrolled')}}</span>
|
||||
{% elif program.intro_video %} <span><a href="{{ program.intro_video }}" target="blank">{{_('Watch Intro')}}</a></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<div class='container pb-5'>
|
||||
<div class="mb-3">
|
||||
<a href="{{ back.url }}" class="text-muted">
|
||||
Back to {{ back.name }}
|
||||
{{_('Back to')}} {{ _(back.name) }}
|
||||
</a>
|
||||
</div>
|
||||
<h1>{{ title }}</h1>
|
||||
<p class='lead' style="max-width: 100%;">{{ description or ''}}</p>
|
||||
<p class="mt-4">
|
||||
{% if frappe.session.user == 'Guest' %}
|
||||
<a id="signup" class="btn btn-primary btn-lg" href="/login#signup">Sign Up</a>
|
||||
<a id="signup" class="btn btn-primary btn-lg" href="/login#signup">{{_('Sign Up')}}</a>
|
||||
{% elif not has_access %}
|
||||
<button id="enroll" class="btn btn-primary btn-lg" onclick="enroll()" disabled>Enroll</button>
|
||||
<button id="enroll" class="btn btn-primary btn-lg" onclick="enroll()" disabled>{{_('Enroll')}}</button>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
let btn = document.getElementById('enroll');
|
||||
btn.disbaled = true;
|
||||
btn.innerText = 'Enrolling...'
|
||||
btn.innerText = __('Enrolling...')
|
||||
|
||||
let opts = {
|
||||
method: 'erpnext.education.utils.enroll_in_program',
|
||||
@@ -44,7 +44,7 @@
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
success_dialog.set_message('You have successfully enrolled for the program ');
|
||||
success_dialog.set_message(__('You have successfully enrolled for the program '));
|
||||
success_dialog.$message.show()
|
||||
success_dialog.show();
|
||||
btn.disbaled = false;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class='card-footer'>
|
||||
<span class="small">{{ program.completion }}% Complete</span>
|
||||
<span class="small">{{ program.completion }}{{_('% Complete')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@@ -43,11 +43,11 @@
|
||||
<div class="mb-3 row">
|
||||
<div class="col-md-7">
|
||||
<a href="/lms" class="text-muted">
|
||||
Back to Home
|
||||
{{_('Back to Home')}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-5 text-right">
|
||||
<a href="/update-profile?name={{ frappe.session.user }}" target="blank" class="mt-0 text-muted">Edit Profile</a>
|
||||
<a href="/update-profile?name={{ frappe.session.user }}" target="blank" class="mt-0 text-muted">{{_('Edit Profile')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<h1>{{ student.first_name }} {{ student.last_name or '' }}</h1>
|
||||
@@ -61,4 +61,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -55,11 +55,11 @@
|
||||
{% if has_access and progress[course.name] %}
|
||||
<div class='card-footer'>
|
||||
{% if progress[course.name].completed %}
|
||||
<span class="indicator green">Completed</span>
|
||||
<span class="indicator green">{{_('Completed')}}</span>
|
||||
{% elif progress[course.name].started %}
|
||||
<span class="indicator orange">In Progress</span>
|
||||
<span class="indicator orange">{{_('In Progress')}}</span>
|
||||
{% else %}
|
||||
<span class="indicator blue">Start</span>
|
||||
<span class="indicator blue">{{_('Start')}}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
{% if has_access %}
|
||||
<div class='card-footer'>
|
||||
{% if content.content_type == 'Quiz' %}
|
||||
{% if content.result == 'Fail' %} <span class="indicator red">Fail <span class="text-muted">({{ content.score }}/100)</span></span>
|
||||
{% elif content.result == 'Pass' %} <span class="indicator green">Pass <span class="text-muted">({{ content.score }}/100)</span>
|
||||
{% else %} <span class="indicator blue">Start</span>
|
||||
{% if content.result == 'Fail' %} <span class="indicator red">{{_('Fail')}} <span class="text-muted">({{ content.score }}/100)</span></span>
|
||||
{% elif content.result == 'Pass' %} <span class="indicator green">{{_('Pass')}} <span class="text-muted">({{ content.score }}/100)</span>
|
||||
{% else %} <span class="indicator blue">{{_('Start')}}</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if content.completed %} <span class="indicator green">Completed</span>
|
||||
{% else %} <span class="indicator blue">Start</span>
|
||||
{% if content.completed %} <span class="indicator green">{{_('Completed')}}</span>
|
||||
{% else %} <span class="indicator blue">{{_('Start')}}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user