10000 feat: Add Bank Reconciliation Process by Robera16 · Pull Request #5 · phamos-eu/kefiya · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add Bank Reconciliation Process #5

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

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ erpnextfints.tools.AssignWizardTool = class AssignWizardTool extends (
"posting_date",
"due_date",
"currency",
"paid_amount",
];
}

Expand Down Expand Up @@ -210,7 +211,6 @@ erpnextfints.tools.AssignWizardTool = class AssignWizardTool extends (
// Extract the selected value from "Payment Wizard Setting" doctype
const optionValue =
selectedOption.message.show_entries_in_payment_assignment_wizard;
console.log("option", optionValue);

const me = this;
this.$result.find(".list-row-container").remove();
Expand All @@ -220,6 +220,7 @@ erpnextfints.tools.AssignWizardTool = class AssignWizardTool extends (
let index = 0;
let rowHTML;
// me.data - list of sales invoice. the below code fetchs all payment entries associated with single sales invoice

for (const value of me.data) {
rowHTML =
index % 2 !== 0
Expand Down Expand Up @@ -290,23 +291,26 @@ erpnextfints.tools.AssignWizardRow = class AssignWizardRow {

// reconcile bank transaction against sales invoice
$(me.row).on("click", ".reconcile_transaction", function () {
console.log(
"sales invoice",
me.data.name,
"bank_transaction",
$(this).attr("data-name")
);
// frappe.call({
// method: "erpnextfints.utils.client.add_payment_reference",
// args: {
// sales_invoice: me.data.name,
// payment_entry: $(this).attr("data-name"),
// },
// callback(/* r */) {
// // Refresh page after asignment
// erpnextfints.tools.assignWizardList.refresh();
// },
// });
let vouchers = [];

vouchers.push({
payment_doctype: "Sales Invoice",
payment_name: me.data.name,
amount: format_currency(me.data.paid_amount, me.data.currency),
});

frappe.call({
method:
"erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.reconcile_vouchers",
args: {
bank_transaction_name: $(this).attr("data-name"),
vouchers: vouchers,
},
callback(/* r */) {
// Refresh page after asignment
erpnextfints.tools.assignWizardList.refresh();
},
});
});
}
};
Expand Down
0