Bugzilla – Attachment 189476 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), 4.04 KB, created by
Martin Renvoize (ashimema)
on 2025-11-11 07:39:53 UTC
(
hide
)
Description:
Bug 40445: Add CASHUP_SURPLUS and CASHUP_DEFICIT account types
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-11-11 07:39:53 UTC
Size:
4.04 KB
patch
obsolete
>From 0e36a16f846035b105bdac0a007bdd168fb636dd 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 > >Sponsored-by: OpenFifth <https://openfifth.co.uk/> >--- > .../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 d1664e00f9f..994761c0a02 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 749d962d112..08b4fe4b901 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.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