Bugzilla – Attachment 185289 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: Add CASHUP_SURPLUS and CASHUP_DEFICIT account types
Bug-40445-Add-CASHUPSURPLUS-and-CASHUPDEFICIT-acco.patch (text/plain), 3.99 KB, created by
Martin Renvoize (ashimema)
on 2025-08-08 17:29:08 UTC
(
hide
)
Description:
Bug 40445: Add CASHUP_SURPLUS and CASHUP_DEFICIT account types
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-08-08 17:29:08 UTC
Size:
3.99 KB
patch
obsolete
>From 24321a98640f097d3f44e1e5231047ff51763e97 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Fri, 8 Aug 2025 13:17:50 +0100 >Subject: [PATCH] Bug 40445: Add CASHUP_SURPLUS and CASHUP_DEFICIT account > types > >This patch adds two new system account types to support cashup reconciliation: > >- CASHUP_SURPLUS (credit type): Used when actual cash found exceeds expected amount >- CASHUP_DEFICIT (debit type): Used when actual cash found is less than expected amount > >Both types are system-managed and cannot be manually added by staff. They will be >automatically created during cashup processes when discrepancies are detected. > >Changes include: >- Atomicupdate script for existing installations >- Mandatory YAML files for fresh installations >--- > .../data/mysql/atomicupdate/bug_40445.pl | 37 +++++++++++++++++++ > .../en/mandatory/account_credit_types.yml | 6 +++ > .../en/mandatory/account_debit_types.yml | 8 ++++ > 3 files changed, 51 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_40445.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_40445.pl b/installer/data/mysql/atomicupdate/bug_40445.pl >new file mode 100755 >index 00000000000..f6226eb4512 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_40445.pl >@@ -0,0 +1,37 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "40445", >+ description => "Add cashup reconciliation support with surplus/deficit tracking", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Add CASHUP_SURPLUS credit type >+ $dbh->do( >+ q{ >+ INSERT IGNORE INTO account_credit_types >+ (code, description, can_be_added_manually, credit_number_enabled, is_system, archived) >+ VALUES ('CASHUP_SURPLUS', 'Cash register surplus found during cashup', 0, 0, 1, 0) >+ } >+ ); >+ >+ # Add CASHUP_DEFICIT debit type >+ $dbh->do( >+ q{ >+ INSERT IGNORE INTO account_debit_types >+ (code, description, can_be_invoiced, can_be_sold, default_amount, is_system, archived, restricts_checkouts) >+ VALUES ('CASHUP_DEFICIT', 'Cash register deficit found during cashup', 0, 0, NULL, 1, 0, 0) >+ } >+ ); >+ >+ say $out "Added new account credit type 'CASHUP_SURPLUS'"; >+ say $out "Added new account debit type 'CASHUP_DEFICIT'"; >+ say_success( $out, "Cashup reconciliation account types created successfully" ); >+ say_info( >+ $out, >+ "Staff can now record actual cash amounts during cashup with automatic surplus/deficit tracking" >+ ); >+ }, >+}; >diff --git a/installer/data/mysql/en/mandatory/account_credit_types.yml b/installer/data/mysql/en/mandatory/account_credit_types.yml >index f73ef651765..d98475aeafd 100644 >--- a/installer/data/mysql/en/mandatory/account_credit_types.yml >+++ b/installer/data/mysql/en/mandatory/account_credit_types.yml >@@ -79,3 +79,9 @@ tables: > description: "Lost item processing fee refund" > can_be_added_manually: "0" > is_system: "1" >+ >+ - code: "CASHUP_SURPLUS" >+ description: "Cash register surplus found during cashup" >+ can_be_added_manually: "0" >+ credit_number_enabled: "0" >+ is_system: "1" >diff --git a/installer/data/mysql/en/mandatory/account_debit_types.yml b/installer/data/mysql/en/mandatory/account_debit_types.yml >index e2479faa245..b4d5100dd13 100644 >--- a/installer/data/mysql/en/mandatory/account_debit_types.yml >+++ b/installer/data/mysql/en/mandatory/account_debit_types.yml >@@ -136,3 +136,11 @@ tables: > can_be_sold: "0" > default_amount: ~ > is_system: "1" >+ >+ - code: "CASHUP_DEFICIT" >+ description: "Cash register deficit found during cashup" >+ can_be_invoiced: "0" >+ can_be_sold: "0" >+ default_amount: ~ >+ is_system: "1" >+ restricts_checkouts: "0" >-- >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