[Koha-bugs] [Bug 32450] Make it possible to exclude debit types from charges counted for circulation restriction (noissuecharge)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jan 9 12:32:16 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32450

--- Comment #7 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Comment on attachment 145128
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145128
Bug 32450: Update db to add noissuescharge flag and remove sysprefs

Review of attachment 145128:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=32450&attachment=145128)
-----------------------------------------------------------------

::: installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl
@@ +6,5 @@
> +    up => sub {
> +        my ($args) = @_;
> +        my ($dbh, $out) = @$args{qw(dbh out)};
> +
> +        if( !column_exists( 'account_debit_types', 'no_issues_charge' ) ) {

I'd be tempted to name this 'blocks_issue' or 'prevents_issue' or something as
opposed to 'no_issues_charge'.

@@ +15,5 @@
> +          say $out "Added column 'account_debit_types.no_issues_charge'";
> +        }
> +
> +        $dbh->do(q{
> +            DELETE FROM systempreferences WHERE variable = 'ManInvInNoissuesCharge'

We'll need an extra step in here I'm afraid.. We're not accounting for the
current state of the system preference at upgrade time.

You'll want to check the current value of ManInvInNoissuesCharge and set the
boolean flag for the appropriate, prior to this patch hard coded, set of debit
types based on it.

@@ +19,5 @@
> +            DELETE FROM systempreferences WHERE variable = 'ManInvInNoissuesCharge'
> +        });
> +
> +        $dbh->do(q{
> +            DELETE FROM systempreferences WHERE variable = 'RentalsInNoissuesCharge'

As above

@@ +22,5 @@
> +        $dbh->do(q{
> +            DELETE FROM systempreferences WHERE variable = 'RentalsInNoissuesCharge'
> +        });
> +        $dbh->do(q{
> +            DELETE FROM systempreferences WHERE variable = 'HoldsInNoissuesCharge'

As above

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list