Fix reconciliation.

This commit is contained in:
James Cole
2019-06-22 13:09:11 +02:00
parent 2710a30a7c
commit 940a730827
10 changed files with 392 additions and 282 deletions

View File

@@ -77,9 +77,9 @@ function storeReconcile() {
var ids = [];
$.each($('.reconcile_checkbox:checked'), function (i, v) {
var obj = $(v);
if(obj.data('inrange') === true){
console.log('Added item with amount to list of checked ' + obj.val());
ids.push(obj.data('id'));
if (obj.data('inrange') === true) {
console.log('Added item with amount to list of checked ' + obj.val());
ids.push(obj.data('id'));
} else {
console.log('Ignored item with amount because is not in range ' + obj.val());
}
@@ -97,7 +97,7 @@ function storeReconcile() {
endBalance: parseFloat($('input[name="end_balance"]').val()),
startDate: $('input[name="start_date"]').val(),
startEnd: $('input[name="end_date"]').val(),
transactions: ids,
journals: ids,
cleared: cleared,
};
var uri = overviewUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val());