From ab68634d1bf2fb1612d4b08db0e441fa8a46c0ef Mon Sep 17 00:00:00 2001 From: Horilla Date: Wed, 18 Sep 2024 15:46:59 +0530 Subject: [PATCH] [UPDT] EMPLOYEE: Change in currency section to view prefix or postfix to the amount --- employee/templates/payroll-tab.html | 30 +++++++++++++++++------- employee/templates/tabs/payroll-tab.html | 30 +++++++++++++++++------- 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/employee/templates/payroll-tab.html b/employee/templates/payroll-tab.html index 557248f3d..4cffe4b09 100644 --- a/employee/templates/payroll-tab.html +++ b/employee/templates/payroll-tab.html @@ -63,15 +63,27 @@
{{payslip.get_status_display}}
-
- {{currency}} {{payslip.gross_pay|floatformat:2}} -
-
- {{currency}} {{payslip.deduction|floatformat:2}} -
-
- {{currency}} {{payslip.net_pay|floatformat:2}} -
+ {% if position == "prefix" %} +
+ {{currency}} {{payslip.gross_pay|floatformat:2}} +
+
+ {{currency}} {{payslip.deduction|floatformat:2}} +
+
+ {{currency}} {{payslip.net_pay|floatformat:2}} +
+ {% else %} +
+ {{payslip.gross_pay|floatformat:2}} {{currency}} +
+
+ {{payslip.deduction|floatformat:2}} {{currency}} +
+
+ {{payslip.net_pay|floatformat:2}} {{currency}} +
+ {% endif %} {% endfor %} diff --git a/employee/templates/tabs/payroll-tab.html b/employee/templates/tabs/payroll-tab.html index 3d1a2fff2..b92584ad4 100644 --- a/employee/templates/tabs/payroll-tab.html +++ b/employee/templates/tabs/payroll-tab.html @@ -66,15 +66,27 @@
{{payslip.get_status_display}}
-
- {{currency}} {{payslip.gross_pay|floatformat:2}} -
-
- {{currency}} {{payslip.deduction|floatformat:2}} -
-
- {{currency}} {{payslip.net_pay|floatformat:2}} -
+ {% if position == "prefix" %} +
+ {{currency}} {{payslip.gross_pay|floatformat:2}} +
+
+ {{currency}} {{payslip.deduction|floatformat:2}} +
+
+ {{currency}} {{payslip.net_pay|floatformat:2}} +
+ {% else %} +
+ {{payslip.gross_pay|floatformat:2}} {{currency}} +
+
+ {{payslip.deduction|floatformat:2}} {{currency}} +
+
+ {{payslip.net_pay|floatformat:2}} {{currency}} +
+ {% endif %}