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

Martin Renvoize <martin.renvo...@ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #125513|0                           |1
        is obsolete|                            |

--- Comment #23 from Martin Renvoize <martin.renvo...@ptfs-europe.com> ---
Created attachment 125596
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125596&action=edit
Bug 29139: Only pass the offsets for lines the credit was applied to

On writing the regression tests, I noticed the CREATE offset was added
to the template. The idea behind passing the offsets is that we can
print information about the lines that got the credit applied. Having
the CREATE offset is meaningless, and (worse) would require users to add
logic to skip it. And all the payment information is already passed in
the 'credit' variable anyway.

This patch filters the credit_offsets by type, leaving the APPLY ones
only.

To test:
1. Apply up to the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Account.t
=> FAIL: 3 offsets, including the CREATE one, boo!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Only the two APPLY offsets are returned!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomasco...@theke.io>
Signed-off-by: Andrew Fuerste-Henry <and...@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvo...@ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to