Bugzilla – Attachment 170123 Details for
Bug 27063
Allow changing which record an order is linked to
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement
Bug-27063-Syspref-KeepInvoiceOnOrderRelink-and-imp.patch (text/plain), 6.37 KB, created by
Aleisha Amohia
on 2024-08-07 03:33:55 UTC
(
hide
)
Description:
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-08-07 03:33:55 UTC
Size:
6.37 KB
patch
obsolete
>From f686ab1593b4241cb7c673ededbbfc6e7fe0c89e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleisha@catalyst.net.nz> >Date: Wed, 7 Aug 2024 03:25:55 +0000 >Subject: [PATCH] Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement > >This follow-up patch adds a new system preference KeepInvoiceOnOrderRelink. > >When enabled, relinking a received order will keep the invoice ID of the original order. > >This is useful for standing orders where the record has been deleted and relinked. > >To test: > >1. Enable the system preference KeepInvoiceOnOrderRelink >2. Add an order to a standing basket >3. Receive the order >4. Once received, go to the record and view the Acquisitions details tab. Notice the invoice is linked. >5. Go back to the basket >6. Relink the received order to a different record >7. Go to the record and view the Acquisitions details tab. Notice the invoice has been kept. >8. Repeat the test plan with the system preference KeepInvoiceOnOrderRelink disabled. Notice the invoice is nullified after the order is relinked. > >Sponsored-by: Auckland University of Technology >--- > acqui/neworderempty.pl | 1 + > ...g_27063_-_KeepInvoiceOnOrderRelink_syspref.pl | 16 ++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/modules/acqui/neworderempty.tt | 3 +++ > .../modules/admin/preferences/acquisitions.pref | 7 +++++++ > 5 files changed, 28 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_27063_-_KeepInvoiceOnOrderRelink_syspref.pl > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 29aa586a8bc..c03ea84b081 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -536,6 +536,7 @@ $template->param( > users => \@order_users, > ( uc( C4::Context->preference("marcflavour") ) ) => 1, > estimated_delivery_date => $data->{estimated_delivery_date}, >+ invoiceid => ( C4::Context->preference('KeepInvoiceOnOrderRelink') and $relink ) ? $data->{invoiceid} : undef, > ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/installer/data/mysql/atomicupdate/bug_27063_-_KeepInvoiceOnOrderRelink_syspref.pl b/installer/data/mysql/atomicupdate/bug_27063_-_KeepInvoiceOnOrderRelink_syspref.pl >new file mode 100755 >index 00000000000..0c8ee26ec83 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_27063_-_KeepInvoiceOnOrderRelink_syspref.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "27063", >+ description => "Allow changing which record an order is linked to", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('KeepInvoiceOnOrderRelink', '0', NULL, 'Keep or empty the invoice when an order is relinked in Acquisitions', 'YesNo') } >+ ); >+ >+ say $out "Added system preference 'KeepInvoiceOnOrderRelink'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 1a7cd033e90..c21d22819b6 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -358,6 +358,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('itemBarcodeInputFilter','','whitespace|T-prefix|cuecat|libsuite8|EAN13','If set, allows specification of a item barcode input filter','Choice'), > ('itemcallnumber','',NULL,'The MARC field/subfield that is used to calculate the itemcallnumber (Dewey would be 082ab or 092ab; LOC would be 050ab or 090ab) could be 852hi from an item record','free'), > ('ItemsDeniedRenewal','','','This syspref allows to define custom rules for denying renewal of specific items.','Textarea'), >+('KeepInvoiceOnOrderRelink', '0', NULL, 'Keep or empty the invoice when an order is relinked in Acquisitions', 'YesNo') > ('KohaAdminEmailAddress','root@localhost','','Define the email address where patron modification requests are sent','free'), > ('KohaManualBaseURL','https://koha-community.org/manual/','','Where is the Koha manual/documentation located?','Free'), > ('KohaManualLanguage','en','en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW','What is the language of the online manual you want to use?','Choice'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index a8aa424cfe2..53b81fb9afa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -356,6 +356,9 @@ > <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst | html %]" /> > <input type="hidden" name="suggestionid" value="[% suggestionid | html %]" /> > <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" /> >+ [% IF Koha.Preference('KeepInvoiceOnOrderRelink') %] >+ <input type="hidden" name="invoiceid" id="invoiceid" value="[% invoiceid | html %]" /> >+ [% END %] > > [% FOREACH c IN currencies %] > <input type="hidden" id="currency_rate_[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >index 3584d9d59d5..29cfece8ada 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >@@ -138,6 +138,13 @@ Acquisitions: > class: email > - 'when sending acquisitions order and claim notices.' > - '<br>If left empty, it will fall back to the first defined address in the following list: library reply-to, library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.' >+ - >+ - pref: KeepInvoiceOnOrderRelink >+ default: no >+ choices: >+ 1: "Keep" >+ 0: "Do not keep" >+ - " a link to the invoice when an order is relinked." > Printing: > - > - Use the >-- >2.39.2
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 27063
:
167619
|
167678
|
167679
|
167783
|
167784
|
167818
|
167819
|
168049
|
168050
|
168571
|
168572
|
170123
|
170166
|
170487
|
170488
|
170692
|
170693
|
170694
|
170695
|
170696
|
174648
|
174649