All account handling should go via the Koha::Account class.
Created attachment 81889 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem
Test plan: Prior to applying patch, both db_dependent/Circulation/Chargelostitem.t and db_dependent/Accounts.t tests should pass. After applying patch the above two tests should still pass.
Created attachment 83164 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem This patch updates C4::Accounts::chargelostitem to use the newly available add_debit method from Koha::Account. Known Side Effects: If the FinesLog is enabled then the 'action' recorded will change from the generic `create_fee` (for both the lost charge and any associated processing charge) to the more descriptive terms `create_processing` and `create_list_item`.
Created attachment 83172 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem This patch updates C4::Accounts::chargelostitem to use the newly available add_debit method from Koha::Account. Known Side Effects: If the FinesLog is enabled then the 'action' recorded will change from the generic `create_fee` (for both the lost charge and any associated processing charge) to the more descriptive terms `create_processing` and `create_list_item`.
I will add tests for the new/altered behaviour here.. the existing tests do not cover the effect of the FinesLog at all right now.
Created attachment 83181 [details] [review] Bug 21722: Tidy up tests and increase coverage This patch moved the chargelostitem 'branchcode' test to within the 'chargelostitem' subtest block and adds tests for additional accountline fields that should be getting set by this method. Sponsored-by: PTFS Europe
Created attachment 83182 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem This patch updates C4::Accounts::chargelostitem to use the newly available add_debit method from Koha::Account. Known Side Effects: If the FinesLog is enabled then the 'action' recorded will change from the generic `create_fee` (for both the lost charge and any associated processing charge) to the more descriptive terms `create_processing` and `create_list_item`. Sponsored-by: PTFS Europe
Created attachment 83186 [details] [review] Bug 21722: Tidy up tests and increase coverage This patch moves the chargelostitem 'branchcode' test to within the 'chargelostitem' subtest block in t/db_dependent/Accounts.t. It also adds tests for additional accountline fields that should be getting set by this method and adds tests for ProcessingFeeNote before removing t/db_dependent/Circulation/Chargelostitem.t which covered this previously. Sponsored-by: PTFS Europe
Created attachment 83187 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem This patch updates C4::Accounts::chargelostitem to use the newly available add_debit method from Koha::Account. Known Side Effects: If the FinesLog is enabled then the 'action' recorded will change from the generic `create_fee` (for both the lost charge and any associated processing charge) to the more descriptive terms `create_processing` and `create_list_item`. Sponsored-by: PTFS Europe
Test Plan 1) Confirm t/db_dependant/Account.t and t/db_dependant/Circulation/Chargelostitem.t test pass before applying any patches. 2) Confirm that one test fails in t/db_dependant/Account.t after applying the first patch which cleans up the tests and adds additional coverage (The test that's expected to fail is one that tests the value of the 'note' field is empty and it fails due to the difference between q{} and undef) 3) Apply the final patch and note the tests now pass.
Created attachment 83189 [details] [review] Bug 21722: Tidy up tests and increase coverage This patch moves the chargelostitem 'branchcode' test to within the 'chargelostitem' subtest block in t/db_dependent/Accounts.t. It also adds tests for additional accountline fields that should be getting set by this method and adds tests for ProcessingFeeNote before removing t/db_dependent/Circulation/Chargelostitem.t which covered this previously. Sponsored-by: PTFS Europe
Created attachment 83190 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem This patch updates C4::Accounts::chargelostitem to use the newly available add_debit method from Koha::Account. Known Side Effects: If the FinesLog is enabled then the 'action' recorded will change from the generic `create_fee` (for both the lost charge and any associated processing charge) to the more descriptive terms `create_processing` and `create_list_item`. Sponsored-by: PTFS Europe
Created attachment 83197 [details] [review] Bug 21722: Tidy up tests and increase coverage This patch moves the chargelostitem 'branchcode' test to within the 'chargelostitem' subtest block in t/db_dependent/Accounts.t. It also adds tests for additional accountline fields that should be getting set by this method and adds tests for ProcessingFeeNote before removing t/db_dependent/Circulation/Chargelostitem.t which covered this previously. Sponsored-by: PTFS Europe
Created attachment 83198 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem This patch updates C4::Accounts::chargelostitem to use the newly available add_debit method from Koha::Account. Known Side Effects: If the FinesLog is enabled then the 'action' recorded will change from the generic `create_fee` (for both the lost charge and any associated processing charge) to the more descriptive terms `create_processing` and `create_lost_item`. Sponsored-by: PTFS Europe
Created attachment 84276 [details] [review] Bug 21722: Tidy up tests and increase coverage This patch moves the chargelostitem 'branchcode' test to within the 'chargelostitem' subtest block in t/db_dependent/Accounts.t. It also adds tests for additional accountline fields that should be getting set by this method and adds tests for ProcessingFeeNote before removing t/db_dependent/Circulation/Chargelostitem.t which covered this previously. Sponsored-by: PTFS Europe Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 84277 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem This patch updates C4::Accounts::chargelostitem to use the newly available add_debit method from Koha::Account. Known Side Effects: If the FinesLog is enabled then the 'action' recorded will change from the generic `create_fee` (for both the lost charge and any associated processing charge) to the more descriptive terms `create_processing` and `create_lost_item`. Sponsored-by: PTFS Europe Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 85173 [details] [review] Bug 21722: Tidy up tests and increase coverage This patch moves the chargelostitem 'branchcode' test to within the 'chargelostitem' subtest block in t/db_dependent/Accounts.t. It also adds tests for additional accountline fields that should be getting set by this method and adds tests for ProcessingFeeNote before removing t/db_dependent/Circulation/Chargelostitem.t which covered this previously. Sponsored-by: PTFS Europe Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 85174 [details] [review] Bug 21722: Use Koha::Account->add_debit in chargelostitem This patch updates C4::Accounts::chargelostitem to use the newly available add_debit method from Koha::Account. Known Side Effects: If the FinesLog is enabled then the 'action' recorded will change from the generic `create_fee` (for both the lost charge and any associated processing charge) to the more descriptive terms `create_processing` and `create_lost_item`. Sponsored-by: PTFS Europe Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Awesome work all! Pushed to master for 19.05
Enhancement will not be backported to stable branch.