3 ms·
Bank reconcilliation in Xero has no "auto match if reference and date are the same" option, so I (very crudely) scripted one. It'll run until it encounters a mi
by grandpoobah 4y ago
Bank reconcilliation in Xero has no "auto match if reference and date are the same" option, so I (very crudely) scripted one. It'll run until it encounters a mismatch (which for the company I work for is basically never). Paste into console.
function go() {
let line = document.querySelector('#statementLines .line');
if (line) {
let leftAndRight = line.querySelectorAll('.statement');
let left = leftAndRight[0];
let right = leftAndRight[1];
if (right.hasClassName('matched')) {
let leftDetails = left.querySelectorAll('.info .details-container .details span');
let leftDate = leftDetails[0].textContent;
let leftReference = leftDetails[1].textContent;
let rightDetails = right.querySelectorAll('.info .details-container .details span');
let rightDate = rightDetails[0].textContent;
let rightReference = rightDetails[2].textContent;
rightReference = rightReference.replace('Ref: ', '');
if (Date.parse(leftDate).getTime() == Date.parse(rightDate).getTime() && leftReference.toLowerCase() == rightReference.toLowerCase()) {
var okButton = line.querySelector(".ok .okayButton");
console.log(leftReference);
okButton.click();
var waiter = function () {
if (line.parentNode == null) {
go();
}
else {
setTimeout(waiter, 50);
}
};
setTimeout(waiter, 50);
}
else {
console.log("Details dont match");
}
}
else {
console.log("Line not matched");
}
}
else {
console.log("No line found");
}
}
setTimeout(go, 100);
- mtlynch 4y agoI switched from Xero to plaintext accounting,[0] and it was a huge step up. There are several different plaintext accounting tools, but they all support automation like this. I personally use Beancount because I work best in Python. The other huge advantage is that the "state" of your finances isn't opaque like in Xero. If you realize you've been categorizing certain transactions incorrectly in Xero, it's a hassle to navigate Xero's interface to correct everything, whereas in plaintext accounting it's usually a 2-second find/replace. The downside is that there's a steep learning curve and the documentation is kind of overwhelming, but once you learn it, it's extremely valuable. [0] https://plaintextaccounting.org/ https://plaintextaccounting.org/
- JoiDegn 4y agoJust logged in to tell you that I am working on an alternative to Xero and you just validated one of our UI designs.