-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change display audit report and bugs
- fix payment pos invoice not deleted if null - fix reversed credit account in breakfast
- Loading branch information
Showing
4 changed files
with
13 additions
and
18 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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import frappe | ||
|
||
def before_submit(doc, method=None): | ||
|
||
for index, payment in enumerate(doc.payments): | ||
if payment.amount == 0: | ||
frappe.delete_doc_if_exists("Sales Invoice Payment", payment.name) | ||
doc.payments.pop(index) | ||
|
||
|
||
def before_submit(doc, method=None): | ||
doc.payments = [payment for payment in doc.payments if payment.amount != 0] |