This commit is contained in:
Ali 2026-03-11 17:08:44 +04:00
parent 1c002a5e87
commit d20435b587
2 changed files with 5 additions and 3 deletions

View File

@ -106,7 +106,9 @@ const KBBRTMapping = {
const partyName = $("<div>").html(row[2] || "").text().trim(); const partyName = $("<div>").html(row[2] || "").text().trim();
const deposit = parseFloat(row[4]) || 0; const deposit = parseFloat(row[4]) || 0;
const withdrawal = parseFloat(row[5]) || 0; const withdrawal = parseFloat(row[5]) || 0;
const bankTransactionName = $(row[8] || "").data("name") || ""; // row[8] = Actions button (original) OR plain name inserted by jey_erp BRT patch
// row[9] = Actions button when jey_erp patch is active (shifted by 1)
const bankTransactionName = $(row[9] || row[8] || "").data("name") || "";
txns.push({ txns.push({
purpose: description, purpose: description,
drcr: withdrawal > 0 ? "D" : "C", drcr: withdrawal > 0 ? "D" : "C",

View File

@ -184,7 +184,7 @@ def _create_payment_entry_for_brt(txn, paid_from, paid_to, bank_txn):
pe.received_amount = amount pe.received_amount = amount
pe.reference_no = bank_txn.reference_number or txn.get("reference_number") or "" pe.reference_no = bank_txn.reference_number or txn.get("reference_number") or ""
pe.reference_date = posting_date pe.reference_date = posting_date
pe.remarks = txn.get("purpose") or "" pe.remarks = bank_txn.description or txn.get("purpose") or ""
if party_type and party: if party_type and party:
pe.party_type = party_type pe.party_type = party_type
pe.party = party pe.party = party
@ -220,7 +220,7 @@ def _create_journal_entry_for_brt(txn, paid_from, paid_to, bank_txn):
je.company = bank_txn.company je.company = bank_txn.company
je.cheque_no = ref_no je.cheque_no = ref_no
je.cheque_date = posting_date je.cheque_date = posting_date
je.user_remark = txn.get("purpose") or "" je.user_remark = bank_txn.description or txn.get("purpose") or ""
# Pay: paid_from credit, paid_to debit # Pay: paid_from credit, paid_to debit
# Receive: paid_from debit, paid_to credit # Receive: paid_from debit, paid_to credit