Bugzilla – Attachment 185292 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-08-08 17:29:14 UTC
(
hide
)
Description:
Bug 40445: (follow-up) Exclude reconciliation accountlines from outstanding_accountlines
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-08-08 17:29:14 UTC
Size:
1.91 KB
patch
obsolete
>From 5b59e22afc6de1d75382e3519299fdd009640d8d 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 0ca8f714ad0..b67d91ad6af 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.50.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