Skip to content

Commit

Permalink
chore: added filter for branch in etims settings doctype branch refer…
Browse files Browse the repository at this point in the history
…ence to only show branches marked as "etims branch"
  • Loading branch information
GichanaMayaka committed Jul 1, 2024
1 parent 145ead6 commit 41e4b87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def sales_information_submission_on_success(
receipt_signature = response_data["rcptSign"]

encoded_uri = requote_uri(
f"https://etims-sbx.kra.go.ke/common/link/etims/receipt/indexEtimsReceiptData?Data={pin}+{branch_id}+{receipt_signature}"
f"https://etims-sbx.kra.go.ke/common/link/etims/receipt/indexEtimsReceiptData?Data={pin}{branch_id}{receipt_signature}"
)

qr_code = get_qr_code(encoded_uri)
Expand Down Expand Up @@ -401,5 +401,6 @@ def search_branch_request_on_success(response: dict) -> None:
doc.custom_manager_contact = branch["mgrTelNo"]
doc.custom_manager_email = branch["mgrEmail"]
doc.custom_is_head_office = branch["hqYn"]
doc.custom_is_etims_branch = 1

doc.save()
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ frappe.ui.form.on("Navari KRA eTims Settings", {
},
__("eTims Actions")
);

frm.set_query("bhfid", function () {
return {
filters: [["Branch", "custom_is_etims_branch", "=", 1]],
};
});
},
sandbox: function (frm) {
const sandboxFieldValue = parseInt(frm.doc.sandbox);
Expand Down

0 comments on commit 41e4b87

Please sign in to comment.