[Koha-bugs] [Bug 19191] Add ability to email receipts for account payments and write-offs

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 23 16:11:47 CEST 2018


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

--- Comment #61 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Jonathan Druart from comment #59)
> (In reply to Kyle M Hall from comment #58)
> > (In reply to Jonathan Druart from comment #56)
> > > 1. There is 'Account Writeoff' vs 'Account writeoff'
> > > 
> > > 2. In Koha::Account->pay, why require C4::Letters; instead of use?
> > > 
> > > 3. Koha/Account.pm:273
> > >   lang    => Koha::Patrons->find( $self->{patron_id} )->lang,
> > > No need to refetch the patron object, you did it already at the beginning of
> > > the method.
> > > 
> > > 4. Koha/Account.pm:280
> > >   offsets => scalar Koha::Account::Offsets->search( { id => { -in => [ map {
> > > $_->id } @account_offsets ] } } ),
> > > 
> > > I do not understand this line, we are refetching what we already have?
> > 
> > Follow addresses everything but 2. I used require instead of use because use
> > is hoisted and it would import it even if the feature is not being used.
> > Basically it's a small efficiency improvement.
> 
> It's usually a bad idea to require instead of use, to catch errors at
> compilation time.
> It's too late for 18.05 so I will let next RM decides.
> 
> Moreover the title of the last patch is not formatted correctly.

We already load C4::Letters in plack.psgi anyway. I agree with Jonathan it is
better to use the lib, to catch problems in compilation time.

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


More information about the Koha-bugs mailing list