Commit 89839f18 authored by Mal's avatar Mal

Payment module fixes, mainly stricter reference matching for imports.

parent d288efd2
......@@ -391,9 +391,11 @@ if (!this.dobrado.payment) {
grid.setSelectedRows([selectedRow]);
grid.scrollRowIntoView(selectedRow);
}
resetForm();
if (currentImport !== 0) {
if (currentImport === 0) {
resetForm();
}
else {
showImportData();
}
});
......@@ -542,7 +544,7 @@ if (!this.dobrado.payment) {
// Look for a reference in the description.
var reference = "";
$.each(allReferences, function(i, item) {
var re = new RegExp(" - " + item, "i");
var re = new RegExp(" - " + item + "\\s*$", "i");
if (re.test(row.description)) {
reference = item;
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment