Bugzilla – Attachment 158647 Details for
Bug 31041
Cashup summary modal printing issue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31041: DO NOT PUSH - Testing Only
Bug-31041-DO-NOT-PUSH---Testing-Only.patch (text/plain), 2.64 KB, created by
Martin Renvoize (ashimema)
on 2023-11-08 07:32:31 UTC
(
hide
)
Description:
Bug 31041: DO NOT PUSH - Testing Only
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-11-08 07:32:31 UTC
Size:
2.64 KB
patch
obsolete
>From 08df7a82653baa16b5205ec747558ff1b6e78041 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 7 Nov 2023 11:41:00 +0000 >Subject: [PATCH] Bug 31041: DO NOT PUSH - Testing Only > >This patch adds a script to allow easy population of a cashup using KTD. > >To use it >1) Start up a KTD >2) Enable UseCashRegisters system preference >3) Add a cash register with the name 'TEST' >4) Run this script from the command line >5) Navigate to the register you created to look at the cashups >6) Click on the summary link and print at the bottom of the modal and > confirm that the modal prints as expected accross multiple pages > without duplications or data lose. >7) Back on the register page, select to view the past months 'Older > transactions'. This will lengthen the page significantly >8) Click on the summary link again and print.. Confirm that again the > correct number of pages is printed and contain the correct content. > >This tests both scenarios.. where the background page spans multiple >pages and where the modal content requires a scroll. >--- > populate_cashups.pl | 46 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 46 insertions(+) > create mode 100755 populate_cashups.pl > >diff --git a/populate_cashups.pl b/populate_cashups.pl >new file mode 100755 >index 00000000000..68085537229 >--- /dev/null >+++ b/populate_cashups.pl >@@ -0,0 +1,46 @@ >+#!/usr/bin/perl >+ >+use Modern::Perl; >+ >+use Koha::Database; >+use t::lib::TestBuilder; >+ >+my $builder = t::lib::TestBuilder->new; >+my $manager = $builder->build_object( { class => 'Koha::Patrons' } ); >+my $register = Koha::Cash::Registers->find({ name => 'TEST' }); >+for ( 1..10 ) { >+ my $patron = $builder->build_object({ class => 'Koha::Patrons' }); >+ my $account = $patron->account; >+ for ( 1..10 ) { >+ my $debit_type = $builder->build_object( >+ { >+ class => 'Koha::Account::DebitTypes' >+ } >+ ); >+ my $debit = $account->add_debit( >+ { >+ amount => 1 + int(rand(100 - 1)), >+ type => $debit_type->code, >+ interface => 'cron' >+ } >+ ); >+ $debit->date( \'NOW() - INTERVAL FLOOR(1 + RAND() * 60) MINUTE' )->store; >+ my $payment = $account->pay( >+ { >+ cash_register => $register->id, >+ amount => $debit->amount, >+ credit_type => 'PAYMENT', >+ lines => [$debit] >+ } >+ ); >+ } >+} >+ >+my $cashup = $register->add_cashup( >+ { >+ manager_id => $manager->id, >+ amount => 0 + int(rand(1000 - 1)) >+ } >+); >+ >+print "Cashups added\n" >-- >2.41.0
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 31041
:
158283
|
158342
|
158589
|
158590
|
158591
|
158592
|
158636
|
158644
|
158645
|
158646
| 158647