-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(payments): incoming payment requests aren't supposed to be in 'in…
…itiated' state (only outgoing are) (#37447) * fix(payments): incoming payment requests aren't supposed to be in 'initiated' state (only outgoing are) * fixup! fix(payments): incoming payment requests aren't supposed to be in 'initiated' state (only outgoing are)
- Loading branch information
Showing
3 changed files
with
16 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import frappe | ||
|
||
|
||
def execute(): | ||
""" | ||
Description: | ||
Change Inward Payment Requests from statut 'Initiated' to correct status 'Requested'. | ||
Status 'Initiated' is reserved for Outward Payment Requests and was a semantic error in previour versions. | ||
""" | ||
|
||
if frappe.reload_doc("accounts", "doctype", "Payment Request"): | ||
so = frappe.qb.DocType("Payment Request") | ||
frappe.qb.update(so).set(so.status, "Requested").where( | ||
so.payment_request_type == "Inward" | ||
).where(so.status == "Initiated").run() |