-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1667 from frappe/version-14-hotfix
chore: release v14
- Loading branch information
Showing
4 changed files
with
36 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,6 +258,21 @@ def test_precision(self): | |
self.assertEqual(advance.return_amount, 380.66) | ||
self.assertEqual(advance.status, "Partly Claimed and Returned") | ||
|
||
def test_pending_amount(self): | ||
employee_name = make_employee("[email protected]") | ||
|
||
advance1 = make_employee_advance(employee_name) | ||
make_payment_entry(advance1, 500) | ||
|
||
advance2 = make_employee_advance(employee_name) | ||
# 1000 - 500 | ||
self.assertEqual(advance2.pending_amount, 500) | ||
make_payment_entry(advance2, 700) | ||
|
||
advance3 = make_employee_advance(employee_name) | ||
# (1000 - 500) + (1000 - 700) | ||
self.assertEqual(advance3.pending_amount, 800) | ||
|
||
|
||
def make_journal_entry_for_advance(advance): | ||
journal_entry = frappe.get_doc(make_bank_entry("Employee Advance", advance.name)) | ||
|