[Bug 20997] New: Add Koha::Account::Line::apply
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Bug ID: 20997 Summary: Add Koha::Account::Line::apply Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org There should be a method to apply a credit to a debit. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20944 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20944 [Bug 20944] Add routes to add credits and debits to a patron's account -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76451 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76451&action=edit Bug 20997: Add unit tests for Koha::Account::Line::apply This patch adds unit tests for the mentioned method. To test: - Apply this patch - Run: $ khell k$ prove t/db_dependent/Koha/Account/Lines.t => FAIL: The method is not already implemented! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76452 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76452&action=edit Bug 20997: Add Koha::Account::Line::apply method This patch implements the ->apply() method for account lines. It will only work on credit lines, and raise an exception otherwise. It implements ->is_credit() as well. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Koha/Account/Lines.t => SUCCESS: Tests pass! - Check all use cases are covered by the tests - Sign off :-D -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20978 CC| |josef.moravec@gmail.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20978 [Bug 20978] Add Koha::Account::add_credit -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76451|0 |1 is obsolete| | Attachment #76452|0 |1 is obsolete| | --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 76459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76459&action=edit Bug 20997: Add unit tests for Koha::Account::Line::apply This patch adds unit tests for the mentioned method. To test: - Apply this patch - Run: $ khell k$ prove t/db_dependent/Koha/Account/Lines.t => FAIL: The method is not already implemented! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 76460 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76460&action=edit Bug 20997: Add Koha::Account::Line::apply method This patch implements the ->apply() method for account lines. It will only work on credit lines, and raise an exception otherwise. It implements ->is_credit() as well. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Koha/Account/Lines.t => SUCCESS: Tests pass! - Check all use cases are covered by the tests - Sign off :-D Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 76461 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76461&action=edit Bug 20997: (follow-up) Add Koha::Account::Line->is_debit method Test plan: 1) Apply this patch 2) prove t/db_dependent/Koha/Account/Lines.t => Test should pass -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76461|0 |1 is obsolete| | --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76462&action=edit Bug 20997: (follow-up) Add Koha::Account::Line->is_debit method Test plan: 1) Apply this patch 2) prove t/db_dependent/Koha/Account/Lines.t => Test should pass Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76459|0 |1 is obsolete| | Attachment #76460|0 |1 is obsolete| | Attachment #76462|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 76463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76463&action=edit Bug 20997: Add unit tests for Koha::Account::Line::apply This patch adds unit tests for the mentioned method. To test: - Apply this patch - Run: $ khell k$ prove t/db_dependent/Koha/Account/Lines.t => FAIL: The method is not already implemented! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 76464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76464&action=edit Bug 20997: Add Koha::Account::Line::apply method This patch implements the ->apply() method for account lines. It will only work on credit lines, and raise an exception otherwise. It implements ->is_credit() as well. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Koha/Account/Lines.t => SUCCESS: Tests pass! - Check all use cases are covered by the tests - Sign off :-D Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 76465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76465&action=edit Bug 20997: (follow-up) Add Koha::Account::Line->is_debit method Test plan: 1) Apply this patch 2) prove t/db_dependent/Koha/Account/Lines.t => Test should pass Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18580 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76549 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76549&action=edit Bug 20997: Add new offset type Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76550 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76550&action=edit Bug 20997: ->apply should be applied to Koha::Account::Lines This patch makes ->apply get passed an object set class instead of single account lines. The change is fully covered by tests. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76551&action=edit Bug 20997: (follow-up) Minor POD fixes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76550|0 |1 is obsolete| | --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76654&action=edit Bug 20997: ->apply should be applied to Koha::Account::Lines This patch makes ->apply get passed an object set class instead of single account lines. The change is fully covered by tests. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76551|0 |1 is obsolete| | --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76655&action=edit Bug 20997: (follow-up) Minor POD fixes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Testers: I've rebased so it applies after some dependencies got changes. I also fixed the Koha::Account::Lines param move and tests. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Bug 20997 depends on bug 20978, which changed state. Bug 20978 Summary: Add Koha::Account::add_credit https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20978 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- CONFLICT (content): Merge conflict in t/db_dependent/Koha/Account/Lines.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76463|0 |1 is obsolete| | --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77194 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77194&action=edit Bug 20997: Add unit tests for Koha::Account::Line::apply This patch adds unit tests for the mentioned method. To test: - Apply this patch - Run: $ khell k$ prove t/db_dependent/Koha/Account/Lines.t => FAIL: The method is not already implemented! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76464|0 |1 is obsolete| | --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77195&action=edit Bug 20997: Add Koha::Account::Line::apply method This patch implements the ->apply() method for account lines. It will only work on credit lines, and raise an exception otherwise. It implements ->is_credit() as well. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Koha/Account/Lines.t => SUCCESS: Tests pass! - Check all use cases are covered by the tests - Sign off :-D Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76465|0 |1 is obsolete| | --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77196&action=edit Bug 20997: (follow-up) Add Koha::Account::Line->is_debit method Test plan: 1) Apply this patch 2) prove t/db_dependent/Koha/Account/Lines.t => Test should pass Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76549|0 |1 is obsolete| | --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77197&action=edit Bug 20997: Add new offset type Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76654|0 |1 is obsolete| | --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77198&action=edit Bug 20997: ->apply should be applied to Koha::Account::Lines This patch makes ->apply get passed an object set class instead of single account lines. The change is fully covered by tests. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76655|0 |1 is obsolete| | --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77199&action=edit Bug 20997: (follow-up) Minor POD fixes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Just minor (not blocker), reading the code: 1. In Koha::Account::Line->apply + my $offset_type = $params->{offset_type} // 'credit_applied'; Should not we raise an exception if the offset_type is not known? I would also list the possible values in the POD (or at list tell it comes from account_offset_types) 2. I think we should follow the pattern "Credit Applied", instead of switching to snake_case "credit_applied" only for this new one. 3. is_debit, is_credit - what about amount == 0? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #23)
Just minor (not blocker), reading the code:
1. In Koha::Account::Line->apply + my $offset_type = $params->{offset_type} // 'credit_applied';
Should not we raise an exception if the offset_type is not known?
This method applies a credit to debits. The idea was to make it simple to use, with documented defaults. There are two use cases in which I'm sure offset_type will not be 'credit_applied': - Payments: if we rewrite ->pay using this, then the offset type would be 'payment' to keep the current behaviour. - Write-offs: if we are writing off a debit, then 'writeoff' should be used. IThe work collecting the existing hardcoded options is already done so should be easy. If you consider it a blocker, I'll do it as a follow-up. Otherwise, I will happily do it on a separate bug.
I would also list the possible values in the POD (or at list tell it comes from account_offset_types)
I agree.
2. I think we should follow the pattern "Credit Applied", instead of switching to snake_case "credit_applied" only for this new one.
Well, I wanted to deal with switching to snake_case all of them on a separate bug, and I expected Katrin to fail this one for this case issue. I can fix it as you like if you're QAing it.
3. is_debit, is_credit - what about amount == 0?
I only added is_credit he, blame Josef. Seriously, an account line with amount = 0 only happens when a credit is void. And void credits are not credits as we handle them. If we need methods for finding void credits specifically we could add them, but that'd be another bug, when there's a use case for that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77310 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77310&action=edit Bug 20997: (QA follow-up) POD fixes and offset type consistency This patch addresses minor issues highlighted by QA. - The POD is enhanced based on the proposal in bug 11983. - The introduced offset type value is made consistent with the rest of them. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77194|0 |1 is obsolete| | Attachment #77195|0 |1 is obsolete| | Attachment #77196|0 |1 is obsolete| | Attachment #77197|0 |1 is obsolete| | Attachment #77198|0 |1 is obsolete| | Attachment #77199|0 |1 is obsolete| | Attachment #77310|0 |1 is obsolete| | --- Comment #26 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77349 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77349&action=edit Bug 20997: Add unit tests for Koha::Account::Line::apply This patch adds unit tests for the mentioned method. To test: - Apply this patch - Run: $ khell k$ prove t/db_dependent/Koha/Account/Lines.t => FAIL: The method is not already implemented! Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #27 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77350&action=edit Bug 20997: Add Koha::Account::Line::apply method This patch implements the ->apply() method for account lines. It will only work on credit lines, and raise an exception otherwise. It implements ->is_credit() as well. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Koha/Account/Lines.t => SUCCESS: Tests pass! - Check all use cases are covered by the tests - Sign off :-D Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #28 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77351 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77351&action=edit Bug 20997: (follow-up) Add Koha::Account::Line->is_debit method Test plan: 1) Apply this patch 2) prove t/db_dependent/Koha/Account/Lines.t => Test should pass Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #29 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77352&action=edit Bug 20997: Add new offset type Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #30 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77353 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77353&action=edit Bug 20997: ->apply should be applied to Koha::Account::Lines This patch makes ->apply get passed an object set class instead of single account lines. The change is fully covered by tests. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #31 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77354 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77354&action=edit Bug 20997: (follow-up) Minor POD fixes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #32 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77355 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77355&action=edit Bug 20997: (QA follow-up) POD fixes and offset type consistency This patch addresses minor issues highlighted by QA. - The POD is enhanced based on the proposal in bug 11983. - The introduced offset type value is made consistent with the rest of them. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 --- Comment #33 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77356&action=edit Bug 20997: Replace missing credit_applied with 'Credit Applied' Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #34 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #35 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm reserving judgement on whether to backport this one until 20944 is pushed. My gut feeling is that its dependency bug contains too internal api change and is not justified by the benefits backporting 20944 would bring. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21607 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21607 [Bug 21607] Koha::Account::Line->apply should store credits as negative amounts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21896 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21896 [Bug 21896] Add Koha::Account::reconcile_balance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@bugs.koha-c |y.org |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22837 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 [Bug 22837] Koha::Account::Line->apply should not require a 'set' of debits -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|22837 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 [Bug 22837] Koha::Account::Line->apply should not require a 'set' of debits -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org