[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2021-11-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|Pushed to master|RESOLVED

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2021-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

David Nind  changed:

   What|Removed |Added

   Keywords||Manual
  Text to go in the||This new feature lets you
  release notes||sequentially number number
   ||payment slips/receipts when
   ||using cash registers (it
   ||replaces the internal
   ||'accountlines_id' used as
   ||the transaction identifier
   ||on the cash register
   ||summary page).
   ||
   ||This
   ||feature is disabled by
   ||default for all credit
   ||types.
   ||
   ||Enable it by:
   ||1.
   ||Setting the new system
   ||preference AutoCreditNumber
   ||to one of the available
   ||options.
   ||2. Enabling for
   ||each credit type.
   ||
   ||Available options are:
   ||- Do
   ||not automatically generate
   ||credit numbers
   ||-
   ||Automatically generate
   ||credit numbers in the form
   ||-0001
   ||- Automatically
   ||generate credit numbers in
   ||the form
   ||mm0001
   ||-
   ||Automatically generate
   ||credit numbers in the form
   ||1, 2, 3'

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks||28318


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28318
[Bug 28318] accounlintes.credit_number missing on the API
-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2021-02-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Jonathan Druart  changed:

   What|Removed |Added

   Keywords|release-notes-needed|

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-11-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Jonathan Druart  changed:

   What|Removed |Added

   Keywords||release-notes-needed

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-11-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Jonathan Druart  changed:

   What|Removed |Added

   Keywords|additional_work_needed  |

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

   Severity|enhancement |new feature

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-09-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #62 from Lucas Gass  ---
enhancement will not be backported to 20.05.x

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-09-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Lucas Gass  changed:

   What|Removed |Added

 CC||lu...@bywatersolutions.com

--- Comment #61 from Lucas Gass  ---
enhancement will not be backported to 20.05.x

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #60 from Jonathan Druart  
---
Follow-up pushed to master!

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #59 from Martin Renvoize  ---
The attached followup should fix the related failing test on master.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

   Keywords||additional_work_needed

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #58 from Martin Renvoize  ---
Created attachment 108733
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108733=edit
Bug 19036: (follow-up) Test credits should be credits

A series of accountlines added to mock credits were being added with a
debit_type_code instead of a valid credit_type_code and so were being
mis-identified by the new credit numbering code trigger in the store
routine.

This patch updates the test to correctly identify the credits as credits

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Jonathan Druart  changed:

   What|Removed |Added

 Version(s)||20.11.00
released in||
 Status|Passed QA   |Pushed to master

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #57 from Jonathan Druart  
---
Pushed to master for 20.11, thanks to everybody involved!

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #56 from Martin Renvoize  ---
Fixed the test.. there were two minor issues with the construction meaning that
we would not reach the exception (missing interface and amount params in the
call to new).

I've also added some more verbose output to the prior tests to clarify their
intent at runtime.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #55 from Martin Renvoize  ---
Created attachment 108587
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108587=edit
Bug 19036: (follow-up) Improve test output

This patch adds proper detail to the test output for the newly
introduced AutoCreditNumber feature and fixes the final test by adding
the 'interface' and 'amount' parameters to the Koha::Account::Line being
created so that we reach the Exception we are trying to catch and don't
die early.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #54 from Jonathan Druart  
---
I've added a missing test but it does not pass. Could you have a look?

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #53 from Jonathan Druart  
---
Created attachment 108525
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108525=edit
Bug 19036: Add missing test

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #52 from Katrin Fischer  ---
I a little torn still about the terminology, but not enough to block this. I
have retested the table layout and the added POS functionality.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #107877|0   |1
is obsolete||

--- Comment #51 from Katrin Fischer  ---
Created attachment 108329
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108329=edit
Bug 19036: (QA follow-up) Add credit_number handling to POS

This patch adds the display of 'credit_number' as a replacement for the
internal 'accountlines_id' as the transaction identifier on the
register summary page when using cash registers.

Test plan
1/ Enable 'UseCashRegisters'
2/ Enable 'EnablePointOfSale'
3/ Enable at least one 'Debit type' to allow 'sale'
4/ Add at least one 'Cash register'
5/ Enable 'AutoCreditNumber'
6/ 'Enable automatic generation of credit number' for the 'Purchase'
credit type
7/ Pay for an item via the Point of Sale page
8/ Navigate to the 'register' page to display the purchase details
9/ Confirm that the 'Transaction' is listed with a number of the form
specified in the 'AutoCreditNumber' preference
10/ Refund an item from this screen
11/ Note that the 'accountlines_id' is used for this refund as we did
not specify the 'Refund' credit type to use the 'AutoCreditNumber'
system
12/ Signoff

Signed-off-by: Katrin Fischer 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #107872|0   |1
is obsolete||

--- Comment #50 from Katrin Fischer  ---
Created attachment 108328
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108328=edit
Bug 19036: (QA follow-up) Fix 'out-by-one' error on table

This patch fixes the total row where the column count was out by one.

Signed-off-by: Katrin Fischer 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #106280|0   |1
is obsolete||

--- Comment #47 from Katrin Fischer  ---
Created attachment 108325
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108325=edit
Bug 19036: (QA follow-up) Use Koha::DateUtils

This patch replaced raw DateTime->now calls with dt_from_string from
Koha::DateUtils

Signed-off-by: Katrin Fischer 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #106281|0   |1
is obsolete||

--- Comment #48 from Katrin Fischer  ---
Created attachment 108326
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108326=edit
Bug 19036: DBIC Schema Updates

Dumped schema updates + manual addition of boolean flags

Signed-off-by: Katrin Fischer 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #106279|0   |1
is obsolete||

--- Comment #46 from Katrin Fischer  ---
Created attachment 108324
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108324=edit
Bug 19036: Add ability to enable credit number for only some credit types

This feature is disabled by default for all credit types. To enable it
you have to set the syspref AutoCreditNumber to the value of your choice
and then enable the feature for each credit type you want.
System credit types can be modified too (but only this particular field
can be modified)

Also, throw an exception when the feature is enabled and a value for
credit_number has already been set

Updated test plan:
Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. In Admin » Credit types:
  a. edit the FORGIVEN type and enable credit number generation
  b. create a new type A, check "can be manually added" and "enable
 credit number"
  c. create a new type B, check "can be manually added". Do NOT enable
 credit number
4. Change syspref 'AutoCreditNumber' to 'incremental'
5. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
6. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are 1, 2, 3, ...
7. Change syspref 'AutoCreditNumber' to 'annual'
8. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
9. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are '2020-0001', '2020-0002', ...
10. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
11. Create more manual credits with types CREDIT and B, and verify that
the numbers are not generated
12. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHA2020020001',
'BRANCHA2020020002', ... (assuming you are connected to library
BRANCHA, and it's February 2020)
13. Set library to another one, say BRANCHB
14. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHB2020020001',
'BRANCHB2020020002', ...
15. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
16. prove t/db_dependent/Koha/Account.t

Signed-off-by: Martin Renvoize 

Signed-off-by: Katrin Fischer 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #106767|0   |1
is obsolete||

--- Comment #49 from Katrin Fischer  ---
Created attachment 108327
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108327=edit
Bug 19036: (QA follow-up) Fix test plan

Signed-off-by: Katrin Fischer 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

   Patch complexity|--- |Medium patch
 Status|Signed Off  |Passed QA

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #106278|0   |1
is obsolete||

--- Comment #45 from Katrin Fischer  ---
Created attachment 108323
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108323=edit
Bug 19036: Add ability to auto generate a number for account credits

In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form -0001 (annual)

- Automatically generate credit numbers in the form
  mm0001 (branchmmincr)
  where  is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

Signed-off-by: Michal Denar 
Signed-off-by: Martin Renvoize 

Signed-off-by: Katrin Fischer 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #107875|0   |1
is obsolete||

--- Comment #44 from Martin Renvoize  ---
Created attachment 107877
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107877=edit
Bug 19036: (QA follow-up) Add credit_number handling to POS

This patch adds the display of 'credit_number' as a replacement for the
internal 'accountlines_id' as the transaction identifier on the
register summary page when using cash registers.

Test plan
1/ Enable 'UseCashRegisters'
2/ Enable 'EnablePointOfSale'
3/ Enable at least one 'Debit type' to allow 'sale'
4/ Add at least one 'Cash register'
5/ Enable 'AutoCreditNumber'
6/ 'Enable automatic generation of credit number' for the 'Purchase'
credit type
7/ Pay for an item via the Point of Sale page
8/ Navigate to the 'register' page to display the purchase details
9/ Confirm that the 'Transaction' is listed with a number of the form
specified in the 'AutoCreditNumber' preference
10/ Refund an item from this screen
11/ Note that the 'accountlines_id' is used for this refund as we did
not specify the 'Refund' credit type to use the 'AutoCreditNumber'
system
12/ Signoff

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #43 from Martin Renvoize  ---
(In reply to Jonathan Druart from comment #41)
> (In reply to Martin Renvoize from comment #36)
> > (In reply to Katrin Fischer from comment #33)
> > > Hm, it wasn't the missed db update, because as I wrote... I have the same
> > > output of master - but it claims all tests successful. Are we provoking 
> > > the
> > > db error intentionally?
> > > 
> > > kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ git checkout master
> > > Switched to branch 'master'
> > > Your branch is up-to-date with 'origin/master'.
> > > kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove
> > > t/db_dependent/Koha/Account.t
> > > t/db_dependent/Koha/Account.t .. 3/12
> > > DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
> > > execute failed: Cannot add or update a child row: a foreign key constraint
> > > fails (`koha_kohadev`.`accountlines`, CONSTRAINT
> > > `accountlines_ibfk_debit_type` FOREIGN KEY (`debit_type_code`) REFERENCES
> > > `account_debit_types` (`code`) ON UPDATE CASCADE) [for Statement "INSERT
> > > INTO `accountlines` ( `amount`, `amountoutstanding`, `borrowernumber`,
> > > `branchcode`, `date`, `debit_type_code`, `description`, `interface`,
> > > `issue_id`, `itemnumber`, `manager_id`, `note`, `payment_type`, 
> > > `timestamp`)
> > > VALUES ( ?, ?, ?, ?, NOW(), ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp )"
> > > with ParamValues: 0=5, 1=5, 2=93, 3='Ro3LQ1AIV', 4='failure', 5='type
> > > validation failure', 6='commandline', 7=undef, 8=undef, 9=93, 10='this
> > > should fail anyway', 11=undef] at /home/vagrant/kohaclone/Koha/Object.pm
> > > line 166
> > > t/db_dependent/Koha/Account.t .. ok 
> > > All tests successful.
> > 
> > That is NOT a failure.. it's an expected case.. we are testing for the DB
> > constraint.. there's isn't an easy way to hide this noise and it's already
> > there on lots of tests.
> 
> I will deal with that on bug 26157.

Awesome!  Thanks Jonathan

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 CC||sally.healey@cheshireshared
   ||services.gov.uk

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #42 from Martin Renvoize  ---
Created attachment 107875
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107875=edit
Bug 19036: (QA follow-up) Add credit_number handling to POS

This patch adds the display of 'credit_number' as a replacement for the
internal 'accountlines_id' as the transaction identifier on the
register summary page when using cash registers.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #41 from Jonathan Druart  
---
(In reply to Martin Renvoize from comment #36)
> (In reply to Katrin Fischer from comment #33)
> > Hm, it wasn't the missed db update, because as I wrote... I have the same
> > output of master - but it claims all tests successful. Are we provoking the
> > db error intentionally?
> > 
> > kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ git checkout master
> > Switched to branch 'master'
> > Your branch is up-to-date with 'origin/master'.
> > kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove
> > t/db_dependent/Koha/Account.t
> > t/db_dependent/Koha/Account.t .. 3/12
> > DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
> > execute failed: Cannot add or update a child row: a foreign key constraint
> > fails (`koha_kohadev`.`accountlines`, CONSTRAINT
> > `accountlines_ibfk_debit_type` FOREIGN KEY (`debit_type_code`) REFERENCES
> > `account_debit_types` (`code`) ON UPDATE CASCADE) [for Statement "INSERT
> > INTO `accountlines` ( `amount`, `amountoutstanding`, `borrowernumber`,
> > `branchcode`, `date`, `debit_type_code`, `description`, `interface`,
> > `issue_id`, `itemnumber`, `manager_id`, `note`, `payment_type`, `timestamp`)
> > VALUES ( ?, ?, ?, ?, NOW(), ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp )"
> > with ParamValues: 0=5, 1=5, 2=93, 3='Ro3LQ1AIV', 4='failure', 5='type
> > validation failure', 6='commandline', 7=undef, 8=undef, 9=93, 10='this
> > should fail anyway', 11=undef] at /home/vagrant/kohaclone/Koha/Object.pm
> > line 166
> > t/db_dependent/Koha/Account.t .. ok 
> > All tests successful.
> 
> That is NOT a failure.. it's an expected case.. we are testing for the DB
> constraint.. there's isn't an easy way to hide this noise and it's already
> there on lots of tests.

I will deal with that on bug 26157.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #40 from Martin Renvoize  ---
I also think the credit number should be added to the 'register details' page
that lists transactions too.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #39 from Martin Renvoize  ---
Should we be hiding the 'credit number' column by default in fact... we don't
enable the feature by default so why expose the empty field in the table?

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #38 from Martin Renvoize  ---
Fixed the table issue in the attached followup.

As for terminology.. this identifier is only added to 'credits' to the 'debits'
terminology discussion it mute at this time.  As for the terminology of 'credit
number'.. I think it's fine at the DB level as is.. I'm less sure about how it
displays in the UI.  Currently, we're only allowing one 'style' of incrementing
number for a set of credit types.. I could imagine there being two distinct
sets of running numbers.. one for 'payment reciepts' and a second for 'credit
notes', but we don't allow for that here. 

As such, I'd be tempted to go much more generic and just call the column
'Identifier' or 'Unique identifier' or something like that in the UI?

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #37 from Martin Renvoize  ---
Created attachment 107872
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107872=edit
Bug 19036: (QA follow-up) Fix 'out-by-one' error on table

This patch fixes the total row where the column count was out by one.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #36 from Martin Renvoize  ---
(In reply to Katrin Fischer from comment #33)
> Hm, it wasn't the missed db update, because as I wrote... I have the same
> output of master - but it claims all tests successful. Are we provoking the
> db error intentionally?
> 
> kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ git checkout master
> Switched to branch 'master'
> Your branch is up-to-date with 'origin/master'.
> kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove
> t/db_dependent/Koha/Account.t
> t/db_dependent/Koha/Account.t .. 3/12
> DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
> execute failed: Cannot add or update a child row: a foreign key constraint
> fails (`koha_kohadev`.`accountlines`, CONSTRAINT
> `accountlines_ibfk_debit_type` FOREIGN KEY (`debit_type_code`) REFERENCES
> `account_debit_types` (`code`) ON UPDATE CASCADE) [for Statement "INSERT
> INTO `accountlines` ( `amount`, `amountoutstanding`, `borrowernumber`,
> `branchcode`, `date`, `debit_type_code`, `description`, `interface`,
> `issue_id`, `itemnumber`, `manager_id`, `note`, `payment_type`, `timestamp`)
> VALUES ( ?, ?, ?, ?, NOW(), ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp )"
> with ParamValues: 0=5, 1=5, 2=93, 3='Ro3LQ1AIV', 4='failure', 5='type
> validation failure', 6='commandline', 7=undef, 8=undef, 9=93, 10='this
> should fail anyway', 11=undef] at /home/vagrant/kohaclone/Koha/Object.pm
> line 166
> t/db_dependent/Koha/Account.t .. ok 
> All tests successful.

That is NOT a failure.. it's an expected case.. we are testing for the DB
constraint.. there's isn't an easy way to hide this noise and it's already
there on lots of tests.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-07-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

David Nind  changed:

   What|Removed |Added

 CC||da...@davidnind.com

--- Comment #35 from David Nind  ---
My thoughts on terminology, not having worked through the test plan (from an
accounting perspective):

- A debit transaction: invoice number for charges and purchases
- A credit transaction: receipt number for payments, credit note for return of
goods

For the purposes of having an auto incremented number in a sequence for
auditing, then perhaps calling it a transaction number may be better.

This could be used for different debit and credit types. 

On statements or transaction records, having some way to use the preferred term
depending on your country, accounting rules or preferences for the transaction
type may be useful.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-07-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA
 CC||and...@bywatersolutions.com
   ||, oleon...@myacpl.org

--- Comment #34 from Katrin Fischer  ---
1) Transactions table

http://localhost:8081/cgi-bin/koha/members/boraccount.pl?borrowernumber=51
Tab: Transactions

The last table row with the total is off by one (display issue).

2) Terminology: credit number versus receipt number versus ?

I wonder if "credit number" is the right term. 
I think for debits we'd probably use invoice number... and for debits I am
thinking of receipt number. 

What do the native speakers say?


Everything else works as expected as far as I can tell - I like!

1) should be an easy fix, 2 is a bit more difficult. CC'ing some other
librarians in hope for help :)

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-07-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #33 from Katrin Fischer  ---
Hm, it wasn't the missed db update, because as I wrote... I have the same
output of master - but it claims all tests successful. Are we provoking the db
error intentionally?

kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove
t/db_dependent/Koha/Account.t
t/db_dependent/Koha/Account.t .. 3/12
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Cannot add or update a child row: a foreign key constraint
fails (`koha_kohadev`.`accountlines`, CONSTRAINT `accountlines_ibfk_debit_type`
FOREIGN KEY (`debit_type_code`) REFERENCES `account_debit_types` (`code`) ON
UPDATE CASCADE) [for Statement "INSERT INTO `accountlines` ( `amount`,
`amountoutstanding`, `borrowernumber`, `branchcode`, `date`, `debit_type_code`,
`description`, `interface`, `issue_id`, `itemnumber`, `manager_id`, `note`,
`payment_type`, `timestamp`) VALUES ( ?, ?, ?, ?, NOW(), ?, ?, ?, ?, ?, ?, ?,
?, current_timestamp )" with ParamValues: 0=5, 1=5, 2=93, 3='Ro3LQ1AIV',
4='failure', 5='type validation failure', 6='commandline', 7=undef, 8=undef,
9=93, 10='this should fail anyway', 11=undef] at
/home/vagrant/kohaclone/Koha/Object.pm line 166
t/db_dependent/Koha/Account.t .. ok 
All tests successful.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-07-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Status|BLOCKED |Signed Off

--- Comment #32 from Martin Renvoize  ---
(In reply to Katrin Fischer from comment #30)
> The test file this also changes is currently failing for me on master:
> 
> kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove
> t/db_dependent/Koha/Account.t
> t/db_dependent/Koha/Account.t .. 1/12 Use of uninitialized value in numeric
> lt (<) at /home/vagrant/kohaclone/Koha/Account/Line.pm line 745.
> t/db_dependent/Koha/Account.t .. 3/12
> DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
> execute failed: Cannot add or update a child row: a foreign key constraint
> fails (`koha_kohadev`.`accountlines`, CONSTRAINT
> `accountlines_ibfk_debit_type` FOREIGN KEY (`debit_type_code`) REFERENCES
> `account_debit_types` (`code`) ON UPDATE CASCADE) [for Statement "INSERT
> INTO `accountlines` ( `amount`, `amountoutstanding`, `borrowernumber`,
> `branchcode`, `date`, `debit_type_code`, `description`, `interface`,
> `issue_id`, `itemnumber`, `manager_id`, `note`, `payment_type`, `timestamp`)
> VALUES ( ?, ?, ?, ?, NOW(), ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp )"
> with ParamValues: 0=5, 1=5, 2=199, 3='dgj1I5', 4='failure', 5='type
> validation failure', 6='commandline', 7=undef, 8=undef, 9=199, 10='this
> should fail anyway', 11=undef] at /home/vagrant/kohaclone/Koha/Object.pm
> line 166
> t/db_dependent/Koha/Account.t .. 13/12 # Looks like you planned 12 tests but
> ran 13.
> t/db_dependent/Koha/Account.t .. Dubious, test returned 255 (wstat 65280,
> 0xff00)
> All 12 subtests passed 
> 
> Test Summary Report
> ---
> t/db_dependent/Koha/Account.t (Wstat: 65280 Tests: 13 Failed: 1)
>   Failed test:  13
>   Non-zero exit status: 255
>   Parse errors: Bad plan.  You planned 12 tests but ran 13.
> Files=1, Tests=13,  8 wallclock secs ( 0.05 usr  0.02 sys +  6.85 cusr  0.92
> csys =  7.84 CPU)
> Result: FAIL
> 
> Moving this to BLOCKED until this is resolved to then continue here.

I think you missed the DB update... The test passes both on master and with
this bug for me (though the test plan was out by one, which I've corrected with
a follow-up).

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-07-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #31 from Martin Renvoize  ---
Created attachment 106767
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106767=edit
Bug 19036: (QA follow-up) Fix test plan

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-07-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |BLOCKED

--- Comment #30 from Katrin Fischer  ---
The test file this also changes is currently failing for me on master:

kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove
t/db_dependent/Koha/Account.t
t/db_dependent/Koha/Account.t .. 1/12 Use of uninitialized value in numeric lt
(<) at /home/vagrant/kohaclone/Koha/Account/Line.pm line 745.
t/db_dependent/Koha/Account.t .. 3/12
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Cannot add or update a child row: a foreign key constraint
fails (`koha_kohadev`.`accountlines`, CONSTRAINT `accountlines_ibfk_debit_type`
FOREIGN KEY (`debit_type_code`) REFERENCES `account_debit_types` (`code`) ON
UPDATE CASCADE) [for Statement "INSERT INTO `accountlines` ( `amount`,
`amountoutstanding`, `borrowernumber`, `branchcode`, `date`, `debit_type_code`,
`description`, `interface`, `issue_id`, `itemnumber`, `manager_id`, `note`,
`payment_type`, `timestamp`) VALUES ( ?, ?, ?, ?, NOW(), ?, ?, ?, ?, ?, ?, ?,
?, current_timestamp )" with ParamValues: 0=5, 1=5, 2=199, 3='dgj1I5',
4='failure', 5='type validation failure', 6='commandline', 7=undef, 8=undef,
9=199, 10='this should fail anyway', 11=undef] at
/home/vagrant/kohaclone/Koha/Object.pm line 166
t/db_dependent/Koha/Account.t .. 13/12 # Looks like you planned 12 tests but
ran 13.
t/db_dependent/Koha/Account.t .. Dubious, test returned 255 (wstat 65280,
0xff00)
All 12 subtests passed 

Test Summary Report
---
t/db_dependent/Koha/Account.t (Wstat: 65280 Tests: 13 Failed: 1)
  Failed test:  13
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 12 tests but ran 13.
Files=1, Tests=13,  8 wallclock secs ( 0.05 usr  0.02 sys +  6.85 cusr  0.92
csys =  7.84 CPU)
Result: FAIL

Moving this to BLOCKED until this is resolved to then continue here.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-06-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 QA Contact|martin.renvoize@ptfs-europe |testo...@bugs.koha-communit
   |.com|y.org

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-06-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #28 from Martin Renvoize  ---
Created attachment 106281
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106281=edit
Bug 19036: DBIC Schema Updates

Dumped schema updates + manual addition of boolean flags

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-06-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

--- Comment #29 from Martin Renvoize  ---
Patchset rescued.. I've added the required QA followups and rebased on master
:)

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-06-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #27 from Martin Renvoize  ---
Created attachment 106280
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106280=edit
Bug 19036: (QA follow-up) Use Koha::DateUtils

This patch replaced raw DateTime->now calls with dt_from_string from
Koha::DateUtils

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-06-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #101897|0   |1
is obsolete||

--- Comment #26 from Martin Renvoize  ---
Created attachment 106279
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106279=edit
Bug 19036: Add ability to enable credit number for only some credit types

This feature is disabled by default for all credit types. To enable it
you have to set the syspref AutoCreditNumber to the value of your choice
and then enable the feature for each credit type you want.
System credit types can be modified too (but only this particular field
can be modified)

Also, throw an exception when the feature is enabled and a value for
credit_number has already been set

Updated test plan:
Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. In Admin » Credit types:
  a. edit the FORGIVEN type and enable credit number generation
  b. create a new type A, check "can be manually added" and "enable
 credit number"
  c. create a new type B, check "can be manually added". Do NOT enable
 credit number
4. Change syspref 'AutoCreditNumber' to 'incremental'
5. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
6. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are 1, 2, 3, ...
7. Change syspref 'AutoCreditNumber' to 'annual'
8. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
9. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are '2020-0001', '2020-0002', ...
10. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
11. Create more manual credits with types CREDIT and B, and verify that
the numbers are not generated
12. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHA2020020001',
'BRANCHA2020020002', ... (assuming you are connected to library
BRANCHA, and it's February 2020)
13. Set library to another one, say BRANCHB
14. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHB2020020001',
'BRANCHB2020020002', ...
15. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
16. prove t/db_dependent/Koha/Account.t

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-06-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #101896|0   |1
is obsolete||

--- Comment #25 from Martin Renvoize  ---
Created attachment 106278
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106278=edit
Bug 19036: Add ability to auto generate a number for account credits

In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form -0001 (annual)

- Automatically generate credit numbers in the form
  mm0001 (branchmmincr)
  where  is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

Signed-off-by: Michal Denar 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-06-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #24 from Katrin Fischer  ---
There are some failures in QA tools that need to be taken care of. I will try
to come back to this for more testing after they are fixed:

 FAIL   t/db_dependent/Koha/Account.t
   FAIL   forbidden patterns
forbidden pattern: Use of DateTime->now should certainly be
replaced with dt_from_string (bug 24840) (line 1068)

 FAIL   installer/data/mysql/kohastructure.sql
   FAIL   tinyint_has_boolean_flag
The new column account_credit_types.credit_number_enabled is
using TINYINT(1) as type but is not defined as boolean in the schema file
(Koha/Schema/Result/AccountCreditType.pm), see the SQL12 coding guideline

 FAIL   Koha/Account/Line.pm
   FAIL   forbidden patterns
forbidden pattern: Use of DateTime->now should certainly be
replaced with dt_from_string (bug 24840) (line 895)
forbidden pattern: Use of DateTime->now should certainly be
replaced with dt_from_string (bug 24840) (line 910)

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Jonathan Druart  changed:

   What|Removed |Added

   Keywords|rel_20_11_target|
 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-05-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

   Keywords|rel_20_05_candidate,|rel_20_11_target
   |RM_priority |

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

   Keywords||rel_20_05_target

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

   Keywords||RM_priority

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #23 from Martin Renvoize  ---
This works really nicely, thanks Julian!

Signing off

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #101549|0   |1
is obsolete||

--- Comment #21 from Martin Renvoize  ---
Created attachment 101896
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101896=edit
Bug 19036: Add ability to auto generate a number for account credits

In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form -0001 (annual)

- Automatically generate credit numbers in the form
  mm0001 (branchmmincr)
  where  is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

Signed-off-by: Michal Denar 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #101550|0   |1
is obsolete||

--- Comment #22 from Martin Renvoize  ---
Created attachment 101897
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101897=edit
Bug 19036: Add ability to enable credit number for only some credit types

This feature is disabled by default for all credit types. To enable it
you have to set the syspref AutoCreditNumber to the value of your choice
and then enable the feature for each credit type you want.
System credit types can be modified too (but only this particular field
can be modified)

Also, throw an exception when the feature is enabled and a value for
credit_number has already been set

Updated test plan:
Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. In Admin » Credit types:
  a. edit the FORGIVEN type and enable credit number generation
  b. create a new type A, check "can be manually added" and "enable
 credit number"
  c. create a new type B, check "can be manually added". Do NOT enable
 credit number
4. Change syspref 'AutoCreditNumber' to 'incremental'
5. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
6. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are 1, 2, 3, ...
7. Change syspref 'AutoCreditNumber' to 'annual'
8. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
9. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are '2020-0001', '2020-0002', ...
10. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
11. Create more manual credits with types CREDIT and B, and verify that
the numbers are not generated
12. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHA2020020001',
'BRANCHA2020020002', ... (assuming you are connected to library
BRANCHA, and it's February 2020)
13. Set library to another one, say BRANCHB
14. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHB2020020001',
'BRANCHB2020020002', ...
15. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
16. prove t/db_dependent/Koha/Account.t

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Julian Maurice  changed:

   What|Removed |Added

 Status|In Discussion   |Needs Signoff

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #20 from Julian Maurice  ---
Created attachment 101550
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101550=edit
Bug 19036: Add ability to enable credit number for only some credit types

This feature is disabled by default for all credit types. To enable it
you have to set the syspref AutoCreditNumber to the value of your choice
and then enable the feature for each credit type you want.
System credit types can be modified too (but only this particular field
can be modified)

Also, throw an exception when the feature is enabled and a value for
credit_number has already been set

Updated test plan:
Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. In Admin » Credit types:
  a. edit the FORGIVEN type and enable credit number generation
  b. create a new type A, check "can be manually added" and "enable
 credit number"
  c. create a new type B, check "can be manually added". Do NOT enable
 credit number
4. Change syspref 'AutoCreditNumber' to 'incremental'
5. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
6. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are 1, 2, 3, ...
7. Change syspref 'AutoCreditNumber' to 'annual'
8. Create more manual credits with types CREDIT and B, and verify that
   the numbers are not generated
9. Create more manual credits with types FORGIVEN and A, and verify that
   the numbers generated are '2020-0001', '2020-0002', ...
10. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
11. Create more manual credits with types CREDIT and B, and verify that
the numbers are not generated
12. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHA2020020001',
'BRANCHA2020020002', ... (assuming you are connected to library
BRANCHA, and it's February 2020)
13. Set library to another one, say BRANCHB
14. Create more manual credits with types FORGIVEN and A, and verify
that the numbers generated are 'BRANCHB2020020001',
'BRANCHB2020020002', ...
15. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
16. prove t/db_dependent/Koha/Account.t

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Julian Maurice  changed:

   What|Removed |Added

  Attachment #99676|0   |1
is obsolete||

--- Comment #19 from Julian Maurice  ---
Created attachment 101549
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101549=edit
Bug 19036: Add ability to auto generate a number for account credits

In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form -0001 (annual)

- Automatically generate credit numbers in the form
  mm0001 (branchmmincr)
  where  is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

Signed-off-by: Michal Denar 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Julian Maurice  changed:

   What|Removed |Added

 Status|ASSIGNED|In Discussion

--- Comment #18 from Julian Maurice  ---
(In reply to Julian Maurice from comment #17)
> I will add the "Auto generate credit number" parameter

In fact, it's not that simple. "system" credit types cannot be modified :/
Should I add the possibility to edit them but only allow this parameter to be
modifiable ? Or should I find another way (another syspref for example) ?

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Julian Maurice  changed:

   What|Removed |Added

 Status|Failed QA   |ASSIGNED

--- Comment #17 from Julian Maurice  ---
I will add the "Auto generate credit number" parameter, and the exception
(probably better to have an error rather than a silent overwrite).
Changing status to ASSIGNED

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #16 from Martin Renvoize  ---
Failing QA until the above is responded to.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #15 from Martin Renvoize  ---
(In reply to Julian Maurice from comment #14)
> > Hmm, I slightly wonder if it's a good idea to allow passing
> > credit_number and allowing it to override the AudoCreditNumber
> > setting.. to me if it's set then we should throw an Exception if
> > someone is trying to pass in their own?
> 
> Since credit_number can only be automatically generated, it does not make
> sense to check if it's defined or not, so I can remove this check and always
> autogenerate a value.
> I can also throw an exception.
> To me, both solutions are acceptable.
> 
> I'll let you pick the one you prefer ;)

I like throwing exceptions as it highlights errors when future devs make
mistakes.. but at the same time they have a tiny performance impact by calling
additional checks so I'm happy without if you'd rather just stop checking for
it and add a note in the POD of the store method to highlight we will be
ignoring it if passed. Your call, I'll accept either :)

> 
> > The second question here.. should this apply to ALL credit types, or
> > just a subset of those that actually deal with taking money as apposed
> > to write-offs and other types of giving credit (like LOST_ITEM_RETURN)?
> 
> I don't know, but the answer is probably... it depends :)
> Should I add a "Auto generate credit number" parameter in credit types ?

That's not a bad idea at all, and is probably reasonably trivial to add if
you're happy to do so, and will keep everbody happy :)

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-03-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #14 from Julian Maurice  ---
> Hmm, I slightly wonder if it's a good idea to allow passing
> credit_number and allowing it to override the AudoCreditNumber
> setting.. to me if it's set then we should throw an Exception if
> someone is trying to pass in their own?

Since credit_number can only be automatically generated, it does not make sense
to check if it's defined or not, so I can remove this check and always
autogenerate a value.
I can also throw an exception.
To me, both solutions are acceptable.

I'll let you pick the one you prefer ;)

> The second question here.. should this apply to ALL credit types, or
> just a subset of those that actually deal with taking money as apposed
> to writeoffs and other types of giving credit (like LOST_ITEM_RETURN)?

I don't know, but the answer is probably... it depends :)
Should I add a "Auto generate credit number" parameter in credit types ?

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #13 from Martin Renvoize  ---
Note to self.. I'd like to add support for cash_register_id + timstamp as an
option for numbering.. I'll post that as a followup once we've worked through
my other comments ;)

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |martin.renvoize@ptfs-europe
   |y.org   |.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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #12 from Martin Renvoize  ---
Comment on attachment 99676
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99676
Bug 19036: Add ability to auto generate a number for account credits

Review of attachment 99676:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=19036=99676)
-

Great work Julian, I really wasn't sure what the criteria were for this yet so
I'm really pleased to see you've taken it on.

Just a few comments and questions as outlined:

::: Koha/Account/Line.pm
@@ +771,5 @@
> +sub store {
> +my ($self) = @_;
> +
> +my $AutoCreditNumber = C4::Context->preference('AutoCreditNumber');
> +if ($AutoCreditNumber && !$self->in_storage && $self->is_credit && 
> !$self->credit_number) {

Hmm, I slightly wonder if it's a good idea to allow passing credit_number and
allowing it to override the AudoCreditNumber setting.. to me if it's set then
we should throw an Exception if someone is trying to pass in their own?

Not a failing case, but wanted to raise as a question.

The second question here.. should this apply to ALL credit types, or just a
subset of those that actually deal with taking money as apposed to writeoffs
and other types of giving credit (like LOST_ITEM_RETURN)?

@@ +773,5 @@
> +
> +my $AutoCreditNumber = C4::Context->preference('AutoCreditNumber');
> +if ($AutoCreditNumber && !$self->in_storage && $self->is_credit && 
> !$self->credit_number) {
> +my $rs = Koha::Database->new->schema->resultset($self->_type);
> +

It feels like this whole block should be inside a transaction.. you're doing a
lookup followed by a store using calculated data.. what if another db
connection adds a payment line at the same time?

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Michal Denar  changed:

   What|Removed |Added

  Attachment #99303|0   |1
is obsolete||

--- Comment #11 from Michal Denar  ---
Created attachment 99676
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99676=edit
Bug 19036: Add ability to auto generate a number for account credits

In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form -0001 (annual)

- Automatically generate credit numbers in the form
  mm0001 (branchmmincr)
  where  is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

Signed-off-by: Michal Denar 

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Michal Denar  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #10 from Michal Denar  ---
Hi Julian,
it's clear. I'll try to test it again soon.
Thank You.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #9 from Julian Maurice  ---
(In reply to Michal Denar from comment #8)
> Hi Julian,
> I've tested bug. All works great, but I'm not able to add account credit
> number on print slip. It generate just empty space. But maybe it's my
> mistake. Can you double-check this part?
> 
> Thank you.

Hi Michal,

You need to edit the ACCOUNT_CREDIT letter ("Print" message type), search for a
FOREACH loop like this:

  [% FOREACH account IN accounts %]

And add [% account.credit_number %] inside that loop

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #8 from Michal Denar  ---
Hi Julian,
I've tested bug. All works great, but I'm not able to add account credit number
on print slip. It generate just empty space. But maybe it's my mistake. Can you
double-check this part?

Thank you.

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Julian Maurice  changed:

   What|Removed |Added

  Attachment #99302|0   |1
is obsolete||

--- Comment #7 from Julian Maurice  ---
Created attachment 99303
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99303=edit
Bug 19036: Add ability to auto generate a number for account credits

In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form -0001 (annual)

- Automatically generate credit numbers in the form
  mm0001 (branchmmincr)
  where  is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Julian Maurice  changed:

   What|Removed |Added

  Attachment #99301|0   |1
is obsolete||

--- Comment #6 from Julian Maurice  ---
Created attachment 99302
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99302=edit
Bug 19036: Add ability to auto generate a number for account credits

In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form -0001 (annual)

- Automatically generate credit numbers in the form
  mm0001 (branchmmincr)
  where  is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

-- 
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #5 from Julian Maurice  ---
Created attachment 99301
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99301=edit
Bug 19036: Add ability to auto generate a number for account credits

In some areas it's required to sequentially number payment slips /
receipts.

This patch adds a database column accountlines.credit_number and a
system preference AutoCreditNumber to control how this number will be
generated.  The following options are available:

- Do not automatically generate credit numbers.
  This is the current behaviour and the default syspref value.

- Automatically generate credit numbers in the form -0001 (annual)

- Automatically generate credit numbers in the form
  mm0001 (branchmmincr)
  where  is the branch where the user (staff member) is
  logged in

- Automatically generate credit numbers in the form 1, 2, 3
  (incremental)

It also adds a column (hidden by default) in the table under
Transactions tab to display this number.

Test plan:
0. Apply patch, run updatedatabase and update_dbix_class_files
1. Go to Admin » Column settings, and uncheck the 'hidden' box for
   column credit_number in table account-fines. It will be easier for
   testing
2. Create a manual credit for a borrower. Verify in Transactions tab
   that this credit has no number generated
3. Change syspref 'AutoCreditNumber' to 'incremental'
4. Create more manual credits, and verify that the numbers generated are
   1, 2, 3, ...
5. Change syspref 'AutoCreditNumber' to 'annual'
6. Create more manual credits, and verify that the numbers generated are
   '2020-0001', '2020-0002', ...
7. Change syspref to 'AutoCreditNumber' to 'branchmmincr'
8. Create more manual credits, and verify that the numbers generated are
   'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are
   connected to library BRANCHA, and it's February 2020)
9. Set library to another one, say BRANCHB
10. Create more manual credits, and verify that the numbers generated are
'BRANCHB2020020001', 'BRANCHB2020020002', ...
11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %]
somewhere. Go back to Transactions tab and click on 'Print' for one
line that has a credit number. Make sure the number is there.
12. prove t/db_dependent/Koha/Account.t

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Julian Maurice  changed:

   What|Removed |Added

 CC||julian.maur...@biblibre.com
 Status|NEW |Needs Signoff
   Assignee|koha-b...@lists.koha-commun |julian.maur...@biblibre.com
   |ity.org |

-- 
You are receiving this mail because:
You are the assignee for the bug.
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2020-01-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

  Component|Patrons |Fines and fees

-- 
You are receiving this mail because:
You are the assignee for the bug.
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2019-10-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #4 from Katrin Fischer  ---
Ah, also accountlines_id is on the wrong level I think - we want to number the
payments - a payment might include changes to multiple accountlines.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2019-10-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #3 from Katrin Fischer  ---
As I understood this is a legal requirement in some countries, possibly
relating to anti-corruption laws, where they have to keep a tight track of all
the monetary transactions. I believe the number has to be sequential to avoid
problems (like getting asked about missing receipts for missing numbers).

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2019-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Michal Denar  changed:

   What|Removed |Added

 CC||blac...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2019-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #2 from Martin Renvoize  ---
Do these actually need to be sequential?

At this point we could use the accountlineid for the 'payment' type accountline
that's associated with the slip.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2019-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Martin Renvoize  changed:

   What|Removed |Added

 Blocks||13985
 CC||martin.renvoize@ptfs-europe
   ||.com


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13985
[Bug 13985] Cash Management - Koha as 'Point of Sale'
-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2018-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Indranil Das Gupta  changed:

   What|Removed |Added

 CC||indr...@l2c2.co.in

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2018-02-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

 CC||sujan@gmail.com

--- Comment #1 from Katrin Fischer  ---
*** Bug 20309 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2017-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=10708

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/


[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

2017-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

Katrin Fischer  changed:

   What|Removed |Added

Summary|Numer payment receipts /|Number payment receipts /
   |payment slips   |payment slips

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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/