Commit Graph

337 Commits

Author SHA1 Message Date
Conor
ea28ed1bb3
refactor: if() to CASE WHEN (#31360)
* refactor: if() to CASE WHEN

* fix: remove duplicate order by

* fix: remove extraneous table

* style: reformat to black spec

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-06-17 21:17:48 +05:30
Conor
74a782d81d
refactor: DB independent quoting and truthy/falsy values (#31358)
* refactor: DB independent quoting and truthy/falsy values

* style: reformat to black spec

* fix: ifnull -> coalesce

* fix: coalesce -> Coalesce

* fix: revert pypika comparison

* refactor: convert queries to QB

* fix: incorrect value types for query

`=` query makes no sense with list of values

* fix: remove warehouse docstatus condition

* fix: keep using base rate as rate

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-06-17 17:01:27 +05:30
Conor
00ef499739
refactor: use db independent offset syntax (#31345)
* chore: use db independent offset syntax

* fix: typo

* style: reformat code to black spec

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-06-14 10:49:07 +05:30
Rucha Mahabal
edb775c381 test: Employee Benefit Application
- make `get_no_of_days` a function for reusability
2022-06-06 14:34:45 +05:30
Rucha Mahabal
3b8bc7d8e1 fix: incorrect LWP calculation for half days in employee benefit application 2022-06-06 14:34:45 +05:30
Rucha Mahabal
59de303b13 refactor: rewrite lwp queries using query builder 2022-06-06 14:34:45 +05:30
Rucha Mahabal
4decb7a02b fix: Consider only Approved leave applications in LWP, Employee Benefit calculations
- do not allow submitting leave applications with 'Cancelled' status
2022-06-06 14:34:45 +05:30
Rucha Mahabal
1db4e623ab fix: payroll operations button visibility 2022-06-02 17:26:08 +05:30
Rucha Mahabal
d641f26035 fix: error handling and messages
- remove savepoints since submission should stop if any error occurs

- refactor variable naming and msgprints

- test Salary Slip creation failure

- fix(test): explicitly commit after payroll entry creation so that the first salary slip creation failure does not rollback the Payroll Entry insert
2022-06-02 15:08:49 +05:30
Rucha Mahabal
661e05e693 fix(tests): account and company setups 2022-06-01 17:28:42 +05:30
Rucha Mahabal
1c91793634
Merge branch 'develop' into fix-salary-slip-bg-job 2022-06-01 12:15:42 +05:30
Rucha Mahabal
653d6341d4 refactor: clean-up and commonify payroll entry test setups 2022-06-01 12:14:42 +05:30
Rucha Mahabal
ed1ba677d6 test: HRA Exemption in Proof Submission 2022-05-31 11:54:43 +05:30
Rucha Mahabal
cfe2f8cac1 fix: amount precision for Tax Exemption Proof Submission 2022-05-31 11:54:43 +05:30
Rucha Mahabal
2e98e9e0b9 test: set country to India before running regional tests 2022-05-31 11:54:43 +05:30
Rucha Mahabal
00adda7c8d fix: Tax Declaration tests and amount precision 2022-05-31 11:54:43 +05:30
Rucha Mahabal
5e96a46c87 test: HRA Exemption in Employee Tax Exemption Declaration 2022-05-31 11:54:43 +05:30
Rucha Mahabal
2b65c9616f fix: component pay calculation 2022-05-31 11:54:43 +05:30
Deepesh Garg
f07246af82
Merge pull request #31127 from deepeshgarg007/loan_interest_accrual
feat: Auto accrue loan interest for backdated term loans
2022-05-31 09:55:26 +05:30
Rucha Mahabal
78c39e947b test: Salary Slip operations queuing, failure, and payroll entry status
- fix multicurrency test, remove redundant doc creation
2022-05-30 16:07:19 +05:30
Rucha Mahabal
42f6bca935 fix: reset Error Message on successful operation and fix status update on submit/cancel 2022-05-30 16:04:07 +05:30
Rucha Mahabal
de55157997 chore: rename method get_salary_component_account method to set
- since it doesn't return any value
2022-05-30 12:47:26 +05:30
Rucha Mahabal
c9e070393d test: make holiday list before running gratuity tests 2022-05-27 14:42:11 +05:30
Rucha Mahabal
79b0aede00 fix: add list view settings for Gratuity 2022-05-27 13:57:09 +05:30
Rucha Mahabal
6c66bbbbfe refactor: clean-up gratuity tests 2022-05-27 13:39:25 +05:30
Rucha Mahabal
b81d7519c1 test: Gratuity status for payment via salary slip 2022-05-27 12:58:10 +05:30
Rucha Mahabal
385e22a067 fix: Gratuity status not updated on salary slip submission 2022-05-27 12:57:07 +05:30
Deepesh Garg
96d8b1ef3c feat: Auto accrue loan interest for backdated term loans 2022-05-25 14:19:10 +05:30
Deepesh Garg
3128f9603e fix: Loan repayment entries for payroll payable account 2022-05-20 08:31:37 +05:30
Rucha Mahabal
ef8164f188 refactor: UX for Salary Slip creation and submission via Payroll Entry
- Add status for Queued/Failed

- log errors and show corrective actions in payroll entry
2022-05-19 20:33:55 +05:30
Rucha Mahabal
81c82c8d53 fix(ux): inform the user about salary slip creation/submission happening in the background 2022-05-19 13:41:11 +05:30
Rucha Mahabal
7f1024f8aa
feat(minor): fetch default salary structure and base from Employee Grade in Salary Structure Assignment (#30918) 2022-05-06 17:44:30 +05:30
Rucha Mahabal
924cf7763e
fix: payment days calculation for employees joining/leaving mid-month (#30863) 2022-05-03 11:27:25 +05:30
Nabin Hait
7072dda31f fix: sider issues 2022-04-11 15:19:42 +05:30
Nabin Hait
c7848089ab tests: Added unit tests for income tax computation report 2022-04-11 14:51:23 +05:30
Nabin Hait
f9633bbd48 feat: Income Tax Computation Report 2022-04-11 12:23:11 +05:30
Ankush Menat
a896895a9e fix: bulk fix (~330) missing translations 2022-04-04 13:59:51 +05:30
Rucha Mahabal
65763275ae
fix: convert dates to datetime before comparing in leave days calculation and fix half day edge case (#30538) 2022-04-01 13:47:52 +05:30
Rucha Mahabal
9ff1904aec
fix: explicitly check if additional salary is recurring while fetching components for payroll (#30489) 2022-03-30 14:47:11 +05:30
Ankush Menat
494bd9ef78 style: format code with black 2022-03-28 18:52:46 +05:30
Ankush Menat
f606d2ecc6
fix: flaky salary slip email test (#30358) 2022-03-22 17:36:18 +05:30
Rucha Mahabal
f090e63e54
test: fix holiday list creation causing flaky tests (#30260) 2022-03-17 15:21:56 +05:30
Rucha Mahabal
b03b9ac99f
fix: salary slip amount rounding errors (#30248) 2022-03-15 11:39:15 +05:30
mergify[bot]
12696ffeb4
fix: Search query of payroll entry reference in Journal Entry (#30225) (#30226)
(cherry picked from commit 98a67967a38c4e5b7b1977c4257bd0b23c57eded)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2022-03-14 14:44:02 +05:30
Rucha Mahabal
9b152e93cf
Merge branch 'develop' into leave-opening-balance 2022-03-09 16:40:26 +05:30
Dany Robert
748d5c4873
fix: wrong payment days in salary slip for employees joining/leaving during mid payroll dates (#29082)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2022-03-07 19:57:57 +05:30
Rucha Mahabal
650099ee65
Merge branch 'develop' into emp-adv-status 2022-03-01 20:30:58 +05:30
Rucha Mahabal
3f3b1766c2 test: get leave details for leave application dashboard 2022-02-28 17:30:09 +05:30
Rucha Mahabal
942511cfff fix: leave application dashboard
- total leaves allocated considering cancelled leaves

- optional plural for leave category labels

- show dashboard only once from date is set, else it fetches all allocations till date and generates incorrect balance

- change pending leaves to 'Leaves Pending Approval' for better context

- update labels in Salary Slip Leave Details table
2022-02-28 14:10:23 +05:30
Rucha Mahabal
d14a5c0f64
Merge branch 'develop' into leave-opening-balance 2022-02-28 10:03:38 +05:30