Skip to content

Commit

Permalink
fix: pass allow_edit flag as integer
Browse files Browse the repository at this point in the history
Resolves #92
  • Loading branch information
barredterra committed Apr 3, 2024
1 parent 69564ba commit 92dec77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ def create_journal_entry_bts(
mode_of_payment: str = None,
party_type: str = None,
party: str = None,
allow_edit: bool = False,
allow_edit: int = 0,
):
"""Create a new Journal Entry for Reconciling the Bank Transaction"""
if isinstance(allow_edit, str):
allow_edit = cint(allow_edit)

bank_transaction = frappe.get_doc("Bank Transaction", bank_transaction_name)
if bank_transaction.deposit and bank_transaction.withdrawal:
frappe.throw(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ erpnext.accounts.bank_reconciliation.CreateTab = class CreateTab {
});
}

create_voucher_bts(allow_edit=false, success_callback) {
create_voucher_bts(allow_edit, success_callback) {
// Create PE or JV and run `success_callback`
let values = this.create_field_group.get_values();
let document_type = values.document_type;
Expand All @@ -64,7 +64,7 @@ erpnext.accounts.bank_reconciliation.CreateTab = class CreateTab {
party: values.party,
posting_date: values.posting_date,
mode_of_payment: values.mode_of_payment,
allow_edit: allow_edit
allow_edit: allow_edit || 0,
};

if (document_type === "Payment Entry") {
Expand Down

0 comments on commit 92dec77

Please sign in to comment.