Skip to content

Commit 7c44ab2

Browse files
authored
Merge pull request #485 from frappe/version-14-hotfix
2 parents 8bf091d + e25e7cf commit 7c44ab2

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

hrms/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "14.2.3"
1+
__version__ = "14.2.4"

hrms/hr/doctype/shift_request/shift_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def on_submit(self):
5050
)
5151

5252
def on_cancel(self):
53-
shift_assignment_list = frappe.get_list(
54-
"Shift Assignment", {"employee": self.employee, "shift_request": self.name}
53+
shift_assignment_list = frappe.db.get_all(
54+
"Shift Assignment", {"employee": self.employee, "shift_request": self.name, "docstatus": 1}
5555
)
5656
if shift_assignment_list:
5757
for shift in shift_assignment_list:

hrms/hr/doctype/shift_request/test_shift_request.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def test_make_shift_request(self):
4848
"Shift Assignment", filters={"shift_request": shift_request.name}, fieldname="docstatus"
4949
)
5050
self.assertEqual(shift_assignment_docstatus, 2)
51+
self.assertEqual(shift_request.docstatus, 2)
5152

5253
def test_shift_request_approver_perms(self):
5354
setup_shift_type(shift_type="Day Shift")

hrms/payroll/doctype/income_tax_slab/income_tax_slab.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
"label": "Disabled"
6969
},
7070
{
71-
"depends_on": "allow_tax_exemption",
7271
"fieldname": "standard_tax_exemption_amount",
7372
"fieldtype": "Currency",
7473
"label": "Standard Tax Exemption Amount",
@@ -109,7 +108,7 @@
109108
],
110109
"is_submittable": 1,
111110
"links": [],
112-
"modified": "2022-11-09 16:08:47.654119",
111+
"modified": "2023-04-30 15:01:22.706198",
113112
"modified_by": "Administrator",
114113
"module": "Payroll",
115114
"name": "Income Tax Slab",

hrms/payroll/doctype/salary_slip/salary_slip.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ def compute_income_tax_breakup(self):
746746

747747
self.standard_tax_exemption_amount = 0
748748
self.tax_exemption_declaration = 0
749+
self.deductions_before_tax_calculation = 0
749750

750751
self.non_taxable_earnings = self.compute_non_taxable_earnings()
751752

@@ -755,12 +756,12 @@ def compute_income_tax_breakup(self):
755756

756757
self.total_earnings = self.ctc + self.income_from_other_sources
757758

758-
self.deductions_before_tax_calculation = self.compute_annual_deductions_before_tax_calculation()
759-
760759
if hasattr(self, "tax_slab"):
761-
self.standard_tax_exemption_amount = (
762-
self.tax_slab.standard_tax_exemption_amount if self.tax_slab.allow_tax_exemption else 0.0
763-
)
760+
if self.tax_slab.allow_tax_exemption:
761+
self.standard_tax_exemption_amount = self.tax_slab.standard_tax_exemption_amount
762+
self.deductions_before_tax_calculation = (
763+
self.compute_annual_deductions_before_tax_calculation()
764+
)
764765

765766
self.tax_exemption_declaration = (
766767
self.get_total_exemption_amount() - self.standard_tax_exemption_amount
@@ -1597,6 +1598,7 @@ def get_total_exemption_amount(self):
15971598
if declaration:
15981599
total_exemption_amount = declaration
15991600

1601+
if self.tax_slab.standard_tax_exemption_amount:
16001602
total_exemption_amount += flt(self.tax_slab.standard_tax_exemption_amount)
16011603

16021604
return total_exemption_amount

0 commit comments

Comments
 (0)