Bugzilla – Attachment 189336 Details for
Bug 40445
Point of Sale reconciliation input during daily summaries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40445: (follow-up) Exclude reconciliation accountlines from outstanding_accountlines
Bug-40445-follow-up-Exclude-reconciliation-account.patch (text/plain), 1.91 KB, created by
Martin Renvoize (ashimema)
on 2025-11-07 14:44:05 UTC
(
hide
)
Description:
Bug 40445: (follow-up) Exclude reconciliation accountlines from outstanding_accountlines
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-11-07 14:44:05 UTC
Size:
1.91 KB
patch
obsolete
>From ddecf60ac2907f708a3f1250399171048cd68cc2 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Fri, 8 Aug 2025 17:14:27 +0100 >Subject: [PATCH] Bug 40445: (follow-up) Exclude reconciliation accountlines > from outstanding_accountlines > >The outstanding_accountlines method should exclude CASHUP_SURPLUS and >CASHUP_DEFICIT accountlines that are created during cashup reconciliation. >These reconciliation entries represent discrepancies found during cashup >and should not be counted as outstanding amounts for subsequent cashups. > >This prevents surplus/deficit accountlines from being included in the >total when calculating expected amounts for future cashups. > >Test plan: >1. Perform a cashup with surplus or deficit >2. Verify that reconciliation accountlines are created >3. Check that subsequent calls to outstanding_accountlines() > exclude these reconciliation entries >4. Run prove t/db_dependent/Koha/Cash/Register.t >--- > Koha/Cash/Register.pm | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > >diff --git a/Koha/Cash/Register.pm b/Koha/Cash/Register.pm >index ca5b5a00bdd..9f2c17c376e 100644 >--- a/Koha/Cash/Register.pm >+++ b/Koha/Cash/Register.pm >@@ -126,6 +126,22 @@ sub outstanding_accountlines { > $since->count > ? { 'date' => { '>' => $since->get_column('timestamp')->as_query } } > : {}; >+ >+ # Exclude reconciliation accountlines from outstanding accountlines >+ $local_conditions->{'-and'} = [ >+ { >+ '-or' => [ >+ { 'credit_type_code' => { '!=' => 'CASHUP_SURPLUS' } }, >+ { 'credit_type_code' => undef } >+ ] >+ }, >+ { >+ '-or' => [ >+ { 'debit_type_code' => { '!=' => 'CASHUP_DEFICIT' } }, >+ { 'debit_type_code' => undef } >+ ] >+ } >+ ]; > my $merged_conditions = > $conditions > ? { %{$conditions}, %{$local_conditions} } >-- >2.51.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40445
:
185289
|
185290
|
185291
|
185292
|
185809
|
186636
|
186637
|
186638
|
186639
|
186640
|
186641
|
186642
|
186643
|
189333
|
189334
|
189335
|
189336
|
189337
|
189338
|
189339
|
189340
|
189341
|
189353
|
189354
|
189355
|
189356
|
189357
|
189358
|
189359
|
189360
|
189361
|
189362
|
189363
|
189364
|
189410
|
189411
|
189412
|
189413
|
189414
|
189415
|
189420
|
189421
|
189422
|
189423
|
189424
|
189425
|
189426
|
189427
|
189428
|
189429
|
189430
|
189476
|
189477
|
189478
|
189479
|
189480
|
189481
|
189482