close #2611 and #2612 Fixed: Reconciliations Do Not Save Properly, Reconciliations Saving Unchecked Transactions as Cleared
This commit is contained in:
parent
2421bd9a8e
commit
05aa6a84c3
@ -21,14 +21,16 @@ class UpdateReconciliation extends Job implements ShouldUpdate
|
||||
|
||||
if ($transactions) {
|
||||
foreach ($transactions as $key => $value) {
|
||||
if (empty($value)) {
|
||||
continue;
|
||||
$transaction_reconcile = $reconcile;
|
||||
|
||||
if (empty($value) || $value === 'false') {
|
||||
$transaction_reconcile = 0;
|
||||
}
|
||||
|
||||
$t = explode('_', $key);
|
||||
|
||||
$transaction = Transaction::find($t[1]);
|
||||
$transaction->reconciled = $reconcile;
|
||||
$transaction->reconciled = $transaction_reconcile;
|
||||
$transaction->save();
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@
|
||||
$checked = $item->reconciled;
|
||||
|
||||
if (! $reconciliation->reconciled && array_key_exists($name, $reconciliation->transactions)) {
|
||||
$checked = $reconciliation->transactions[$name];
|
||||
$checked = (empty($reconciliation->transactions[$name]) || $reconciliation->transactions[$name] === 'false') ? 0 : 1;
|
||||
}
|
||||
@endphp
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user