Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Employee Advance): add 'Returned' and 'Partly Claimed and Returned' status #29335

Merged
merged 8 commits into from
Mar 1, 2022

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented Jan 18, 2022

Problem:

The main usage of Employee Advance is to allocate it against Expense Claims. Currently, advance only maintains a status for "Claimed" and while allocating advances against a claim, there are two more types of advances that are shown in the list for selection but should not be available for allocation:

  • Returned: Entire amount which was paid for the advance is returned, leaving nothing to be claimed.
  • Partly Claimed and Returned: Some part of the advance is claimed, rest is returned, leaving nothing to be claimed.

Changes:

  • Add status Returned and Partly Claimed and Returned to Employee Advance so that it's easier to track and allocate. Filter and get advances that don't have Claimed/Returned/Partly Claimed and Returned status for allocation in expenses.

  • Set title, document states for Employee Advance

    Before:
    image

    After:
    image

  • In Expense Claim, advances should be validated after setting totals since they are validated against the total claimed amount. Else, it raises an incorrect validation error.

  • Patch and test status

Documentation: https://docs.erpnext.com/compare?wiki_page=9d46d7faf4&&compare=3f8062dc4e

@ruchamahabal ruchamahabal changed the title feat(Employee Advance): add 'Returned' and 'Partly Claimed and Return' status feat(Employee Advance): add 'Returned' and 'Partly Claimed and Returned' status Jan 18, 2022
@ruchamahabal ruchamahabal marked this pull request as draft January 18, 2022 09:29
@ruchamahabal ruchamahabal added this to the v14.0 milestone Jan 18, 2022
@codecov
Copy link

codecov bot commented Jan 18, 2022

Codecov Report

Merging #29335 (9988ec6) into develop (65bb727) will increase coverage by 4.79%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #29335      +/-   ##
===========================================
+ Coverage    55.12%   59.92%   +4.79%     
===========================================
  Files         1084     1084              
  Lines        68442    68455      +13     
===========================================
+ Hits         37729    41019    +3290     
+ Misses       30713    27436    -3277     
Impacted Files Coverage Δ
...xt/hr/doctype/employee_advance/employee_advance.py 89.47% <100.00%> (+21.73%) ⬆️
erpnext/hr/doctype/expense_claim/expense_claim.py 82.82% <100.00%> (+24.15%) ⬆️
...oll/doctype/additional_salary/additional_salary.py 69.56% <100.00%> (+0.67%) ⬆️
...eport/item_variant_details/item_variant_details.py 31.32% <0.00%> (-53.02%) ⬇️
...t/product_bundle_balance/product_bundle_balance.py 81.81% <0.00%> (-13.64%) ⬇️
...rpnext/accounts/doctype/shareholder/shareholder.py 80.00% <0.00%> (-10.00%) ⬇️
...pnext/setup/doctype/sales_partner/sales_partner.py 65.21% <0.00%> (-4.35%) ⬇️
...ctype/accounting_dimension/accounting_dimension.py 64.34% <0.00%> (-1.56%) ⬇️
...e/period_closing_voucher/period_closing_voucher.py 88.23% <0.00%> (-1.48%) ⬇️
erpnext/support/doctype/issue/issue.py 64.56% <0.00%> (-0.98%) ⬇️
... and 146 more

@ruchamahabal ruchamahabal marked this pull request as ready for review March 1, 2022 15:42
@ruchamahabal ruchamahabal merged commit e874149 into frappe:develop Mar 1, 2022
@ruchamahabal ruchamahabal deleted the emp-adv-status branch March 1, 2022 17:06
@ruchamahabal ruchamahabal removed this from the v14.0 milestone May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant