[Koha-bugs] [Bug 23049] Replace MANUAL_INV authorised value with a dedicated table

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 24 10:11:03 CEST 2019


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

--- Comment #223 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Marcel de Rooy from comment #221)
> (In reply to Martin Renvoize from comment #220)
> > I managed at least to get this all running under MariaDB 10.2.27 and see the
> > check constraint in action myself.  Turns out one cannot use a ternary the
> > way I tried to inside an execute call.
> 
> I think that you are mistaken. You used the wrong conditions in the ternary:
> 
> -    $sth->execute($borrower->borrowernumber, $data->{amount},
> $data->{days_ago}, $data->{description}, 'commandline', $data->{amount} > 0
> ? 'W' : undef, $data->{amount} >= 0 ? undef : 'OVERDUE' );
> +    $sth->execute($borrower->borrowernumber, $data->{amount},
> $data->{days_ago}, $data->{description}, 'commandline', $data->{amount} < 0
> ? 'W' : undef, $data->{amount} < 0 ? undef : 'OVERDUE' );
> 
> This should work. Note the differences between >0 and <0 but also between
> >=0 and <0. Credit is negative !
> I would suggest to remove patch 34.
> Coming back here soon.

We keep the new code. Only adjust the commit message.

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


More information about the Koha-bugs mailing list