[Koha-bugs] [Bug 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-10-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Thibaud Guillot  changed:

   What|Removed |Added

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

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-09-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Lucas Gass  changed:

   What|Removed |Added

 CC||lu...@bywatersolutions.com

--- Comment #109 from Lucas Gass  ---
If this is needed in 22.05.x the patchset will need a rebase for that version.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-08-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #108 from Katrin Fischer  ---
Thank you, everyone and Pedro :)

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-08-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #107 from Pedro Amorim  ---
Nice work everyone!

Pushed to 22.11.x for next release

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-08-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Pedro Amorim  changed:

   What|Removed |Added

 Status|Pushed to stable|Pushed to oldstable
 Version(s)|23.11.00,23.05.03   |23.11.00,23.05.03,22.11.09
released in||

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-08-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Fridolin Somers  changed:

   What|Removed |Added

 CC||fridolin.som...@biblibre.co
   ||m
 Status|Pushed to master|Pushed to stable
 Version(s)|23.11.00|23.11.00,23.05.03
released in||

--- Comment #106 from Fridolin Somers  ---
Pushed to 23.05.x for 23.05.03

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #105 from Katrin Fischer  ---
This requires backporting down to 22.11 please.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Fridolin Somers  changed:

   What|Removed |Added

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

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #104 from Tomás Cohen Arazi  ---
Created attachment 153677
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153677&action=edit
Bug 33028: (follow-up) Lower the two digits requirement

This patch makes the code not require two decimal digits, as the main
intention here is to forbid (locale) formatted strings to reach the DB.

The number of digits we support needs to be discussed on its own bug,
and a centralized check implemented.

This patch fixes tests:

prove t/db_dependent/Circulation.t
t/db_dependent/Circulation.t .. 1/67 Exception
'Koha::Exceptions::CirculationRule::NotDecimal' thrown 'The circulation rule
expected a decimal value' with name => fine, value => 0.1
t/db_dependent/Circulation.t .. Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 53/67 subtests

Signed-off-by: Tomas Cohen Arazi 

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #103 from Tomás Cohen Arazi  ---
Pushed to master for 23.11.

Nice work everyone, thanks!

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Tomás Cohen Arazi  changed:

   What|Removed |Added

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

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Status|Failed QA   |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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #153634|0   |1
is obsolete||

--- Comment #102 from Martin Renvoize  ---
Created attachment 153636
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153636&action=edit
Bug 33028: (follow-up) Add POD to new Exception

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #153633|0   |1
is obsolete||

--- Comment #101 from Martin Renvoize  ---
Created attachment 153635
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153635&action=edit
Bug 33028: Unit tests

Add unit tests for is_monetary functionality introduced in the
CirculationRules module.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Status|Passed QA   |Failed 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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Status|Failed QA   |Passed QA

--- Comment #100 from Martin Renvoize  ---
Short of tidying the whole CirculationRule module I couldn't get the perltidy
QA complaint to go away (I'd love to tidy the whole file.. there's isn't all
that many changes to be honest so I don't think it would really hurt for future
conflicts much)

Unit tests corrected and additional one's added.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #99 from Martin Renvoize  ---
Created attachment 153634
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153634&action=edit
Bug 33028: (follow-up) Add POD to new Exception

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #153632|0   |1
is obsolete||

--- Comment #98 from Martin Renvoize  ---
Created attachment 153633
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153633&action=edit
Bug 33028: Unit tests

Add unit tests for is_monetary functionality introduced in the
CirculationRules module.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #97 from Martin Renvoize  ---
Created attachment 153632
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153632&action=edit
Bug 33028: Unit tests

Add unit tests for is_monetary functionality introduced in the
CirculationRules module.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

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

--- Comment #96 from Katrin Fischer  ---
(In reply to Tomás Cohen Arazi from comment #95)
> This is almost done, and already on my branch. But...
> 
> prove t/db_dependent/Koha/CirculationRules.t
> t/db_dependent/Koha/CirculationRules.t .. 1/7
> #   Failed test 'setting fine with branch/category/itemtype succeeds'
> #   at t/db_dependent/Koha/CirculationRules.t line 211.
> # died: Koha::Exceptions::CirculationRule::NotDecimal (Exception
> 'Koha::Exceptions::CirculationRule::NotDecimal' thrown 'The circulation rule
> expected a decimal value' with name => fine, value =>
> # )
> # Looks like you failed 1 test of 5.
> 
> 
> Please fix ASAP so I can push tomorrow morning.

Martin, do you have a moment to 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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

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

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA
 CC||tomasco...@gmail.com

--- Comment #95 from Tomás Cohen Arazi  ---
This is almost done, and already on my branch. But...

prove t/db_dependent/Koha/CirculationRules.t
t/db_dependent/Koha/CirculationRules.t .. 1/7
#   Failed test 'setting fine with branch/category/itemtype succeeds'
#   at t/db_dependent/Koha/CirculationRules.t line 211.
# died: Koha::Exceptions::CirculationRule::NotDecimal (Exception
'Koha::Exceptions::CirculationRule::NotDecimal' thrown 'The circulation rule
expected a decimal value' with name => fine, value =>
# )
# Looks like you failed 1 test of 5.


Please fix ASAP so I can push tomorrow morning.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

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

--- Comment #94 from Tomás Cohen Arazi  ---
Created attachment 153620
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153620&action=edit
Bug 33028: Make exception less generic

While testing this bug I found Circulation.t was failing, but the
exception doesn't actually display anything useful in terms of helping
debug what's going on.

This patch makes it add the rule_name and rule_value to the message.

Signed-off-by: Tomas Cohen Arazi 

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

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

--- Comment #93 from Tomás Cohen Arazi  ---
Created attachment 153619
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153619&action=edit
Bug 33028: (QA follow-up) Tidy introduced code

Signed-off-by: Tomas Cohen Arazi 

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #92 from Katrin Fischer  ---
(In reply to Nick Clemens from comment #91)
> (In reply to Katrin Fischer from comment #79)
> > Testing here again... back and forth we go!
> 
> Heh, tested as well, Katrin beat me by about 5 minutes,  but adding my
> support too :-)

I think another set of eyes definitely won't hurt for sure! 

I'd love to see a fix for bug 32271 as next step, so we hopefully get in a
state again where editing rules doesn't create unwanted side effects.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #91 from Nick Clemens  ---
(In reply to Katrin Fischer from comment #79)
> Testing here again... back and forth we go!

Heh, tested as well, Katrin beat me by about 5 minutes,  but adding my support
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #90 from Katrin Fischer  ---
Created attachment 153323
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153323&action=edit
Bug 33028: Perltidy database update script

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152936|0   |1
is obsolete||

--- Comment #89 from Katrin Fischer  ---
Created attachment 153322
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153322&action=edit
Bug 33028: Throw exception if not passed a decimal number

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152935|0   |1
is obsolete||

--- Comment #88 from Katrin Fischer  ---
Created attachment 153321
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153321&action=edit
Bug 33028: (follow-up) Apply unformat_price to decimal fields

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152934|0   |1
is obsolete||

--- Comment #87 from Katrin Fischer  ---
Created attachment 153320
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153320&action=edit
Bug 33028: (follow-up) Add unformat_price js function

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152933|0   |1
is obsolete||

--- Comment #86 from Katrin Fischer  ---
Created attachment 153319
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153319&action=edit
Bug 33028: (follow-up) Rewrite database update

This rewrite the database update with some things in mind:

* We now use a positive value list of allowed characters to check
  This makes sure that all of those are recognized:
  1,00
  1.00€
  abc
* Instead of dying after finding one wrong value, we loop through
  all values first, building up an error string
* When we have errors... we die and print the full list of things
  that need fixing.

Signed-off-by: Katrin Fischer 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152932|0   |1
is obsolete||

--- Comment #85 from Katrin Fischer  ---
Created attachment 153318
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153318&action=edit
Bug 33028: Add TT filters for Price and pattern checks to input fields

With this patch, all monetary values in the table will be displayed
formatted.

Also, the input will be checked against our agreed pattern to make
sure no false values can be entered.

Missing: When editing a rule, we need to unformat the value, so that
instead of the display format we have the input format available
for editing.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152931|0   |1
is obsolete||

--- Comment #84 from Katrin Fischer  ---
Created attachment 153317
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153317&action=edit
Bug 33028: Add is_monetary to recall_overdue_fine and article_request_fee

This patch marks the 2 missing monetary values for recal over due fines
and article request fees as monetary.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152930|0   |1
is obsolete||

--- Comment #83 from Katrin Fischer  ---
Created attachment 153316
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153316&action=edit
Bug 33028: (follow-up) Fix trailing 0 decimals

We want to recognise the truthyness of a number vs string so we drop
trailing decimals if they're just 0.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152929|0   |1
is obsolete||

--- Comment #82 from Katrin Fischer  ---
Created attachment 153315
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153315&action=edit
Bug 33028: (follow-up) Move monetary definition into hash

This patch moves the defintion of monetary rule type into the rule kinds
hash.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #153313|0   |1
is obsolete||

--- Comment #81 from Katrin Fischer  ---
Created attachment 153314
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153314&action=edit
Bug 33028: Fix calculations around cronjob fines.pl

When currency format is set on FR commas are decimals separators
but when cron like fines.pl try to calculate fines it's fails due to
this format.

I changed this behavior by targetted 'fine' and 'overduefinescap' in
circulation_rules.rule_name to unformat them when we save them.

This also fix the display in smart_rules table (before with commas price
was not good displayed - without decimals)

Test Plan :
1) Set your currency format on 'FR' and 'fine' OR/AND 'overduefinescap'
with commas
2) Be sure to have some patron overdues
3) Run ~/misc/cronjobs/fines.pl with args to find overdues
4) See an error like 'isn't numeric in substraction[..] or gt > [...]'
5) Run updatedatabase script (it will replace commas in your rules
changed in step 1) )
6) Repeat step 3 and see that everything was going "fine" (:tada:)

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152928|0   |1
is obsolete||

--- Comment #80 from Katrin Fischer  ---
Created attachment 153313
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153313&action=edit
Bug 33028: Fix calculations around cronjob fines.pl

When currency format is set on FR commas are decimals separators
but when cron like fines.pl try to calculate fines it's fails due to
this format.

I changed this behavior by targetted 'fine' and 'overduefinescap' in
circulation_rules.rule_name to unformat them when we save them.

This also fix the display in smart_rules table (before with commas price
was not good displayed - without decimals)

Test Plan :
1) Set your currency format on 'FR' and 'fine' OR/AND 'overduefinescap'
with commas
2) Be sure to have some patron overdues
3) Run ~/misc/cronjobs/fines.pl with args to find overdues
4) See an error like 'isn't numeric in substraction[..] or gt > [...]'
5) Run updatedatabase script (it will replace commas in your rules
changed in step 1) )
6) Repeat step 3 and see that everything was going "fine" (:tada:)

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #79 from Katrin Fischer  ---
Testing here again... back and forth we go!

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

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

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #78 from Martin Renvoize  ---
OK.. I believe this now works as Katrin intended as a whole...

* Displays are in localised format
* Inputs are in US Decimal Dot with decimal input and a pattern match

I prefer the patchset prior to this one, where both display and inputs followed
currency format (though I do prefer the exception this raises if passed a bad
format and would like to have moved the unformat into the controller level
instead of where it was)

This is, however, more consistent with the rest of the UI where we appear to
expect non-localised decimal inputs regardless of how we then display them.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152829|0   |1
is obsolete||

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152804|0   |1
is obsolete||

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152761|0   |1
is obsolete||

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #77 from Martin Renvoize  ---
Created attachment 152936
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152936&action=edit
Bug 33028: Throw exception if not passed a decimal number

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152805|0   |1
is obsolete||

--- Comment #76 from Martin Renvoize  ---
Created attachment 152935
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152935&action=edit
Bug 33028: (follow-up) Apply unformat_price to decimal fields

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152803|0   |1
is obsolete||

--- Comment #75 from Martin Renvoize  ---
Created attachment 152934
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152934&action=edit
Bug 33028: (follow-up) Add unformat_price js function

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152760|0   |1
is obsolete||

--- Comment #74 from Martin Renvoize  ---
Created attachment 152933
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152933&action=edit
Bug 33028: (follow-up) Rewrite database update

This rewrite the database update with some things in mind:

* We now use a positive value list of allowed characters to check
  This makes sure that all of those are recognized:
  1,00
  1.00€
  abc
* Instead of dying after finding one wrong value, we loop through
  all values first, building up an error string
* When we have errors... we die and print the full list of things
  that need fixing.

Signed-off-by: Katrin Fischer 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152759|0   |1
is obsolete||

--- Comment #73 from Martin Renvoize  ---
Created attachment 152932
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152932&action=edit
Bug 33028: Add TT filters for Price and pattern checks to input fields

With this patch, all monetary values in the table will be displayed
formatted.

Also, the input will be checked against our agreed pattern to make
sure no false values can be entered.

Missing: When editing a rule, we need to unformat the value, so that
instead of the display format we have the input format available
for editing.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152758|0   |1
is obsolete||

--- Comment #72 from Martin Renvoize  ---
Created attachment 152931
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152931&action=edit
Bug 33028: Add is_monetary to recall_overdue_fine and article_request_fee

This patch marks the 2 missing monetary values for recal over due fines
and article request fees as monetary.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152757|0   |1
is obsolete||

--- Comment #71 from Martin Renvoize  ---
Created attachment 152930
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152930&action=edit
Bug 33028: (follow-up) Fix trailing 0 decimals

We want to recognise the truthyness of a number vs string so we drop
trailing decimals if they're just 0.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152756|0   |1
is obsolete||

--- Comment #70 from Martin Renvoize  ---
Created attachment 152929
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152929&action=edit
Bug 33028: (follow-up) Move monetary definition into hash

This patch moves the defintion of monetary rule type into the rule kinds
hash.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152755|0   |1
is obsolete||

--- Comment #69 from Martin Renvoize  ---
Created attachment 152928
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152928&action=edit
Bug 33028: Fix calculations around cronjob fines.pl

When currency format is set on FR commas are decimals separators
but when cron like fines.pl try to calculate fines it's fails due to
this format.

I changed this behavior by targetted 'fine' and 'overduefinescap' in
circulation_rules.rule_name to unformat them when we save them.

This also fix the display in smart_rules table (before with commas price
was not good displayed - without decimals)

Test Plan :
1) Set your currency format on 'FR' and 'fine' OR/AND 'overduefinescap'
with commas
2) Be sure to have some patron overdues
3) Run ~/misc/cronjobs/fines.pl with args to find overdues
4) See an error like 'isn't numeric in substraction[..] or gt > [...]'
5) Run updatedatabase script (it will replace commas in your rules
changed in step 1) )
6) Repeat step 3 and see that everything was going "fine" (:tada:)

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #68 from Martin Renvoize  ---
OK, well that may be the case.. but you'll need to also undo the first patch
here as that make it expect bon decimal dot

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #67 from Katrin Fischer  ---
I feel like we moved into contrary directions:

I tried to restore the former behaviour. Koha expects us to enter monetary
amounts with decimal dot everywhere, so I was trying to get back to this here.
I'd like to see input formats fixed, but I feel that a bugfix that needs to go
back into stables is the wrong place. I used the same pattern that we agreed on
and use in patron accounting and removed the Price TT filters to make sure we
get back to decimal dot everywhere, giving up the display in favor of having
the input fixed.

I believe Martin tried to allow entering with decimal comma with his patches,
which appears more risky to me. Also: how to communicate that this page expects
different input than anywhere else?

I might be mistaken - I need to take a closer look for sure.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

--- Comment #66 from Martin Renvoize  ---
OK... with that last patch I think we should be working correctly in all
cases..

Please follow the test plan in comment 25 to confirm this.

We can drop/squash half the patches here.. the bug has become a real mess with
things getting added then reverted, then added and finally reverted again.

I'm not sure we need the js unformat function I created at all at this point..
it's no longer used here.. but might be helpful migrated to another bug in case
anyone needs it elsewhere.  I'm also not sure about the location of the
unformat call deep down in Circulation rules.. it feels like we should perhaps
be calling this higher up in the controller rather than the module expecting
different input types based on configuration.

Anyway.. I'd love to see this move forward.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #65 from Martin Renvoize  ---
Created attachment 152829
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152829&action=edit
Bug 33028: (follow-up) Remove inputmode and pattern

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #64 from Martin Renvoize  ---
OK.. I should have read Katrins patches in more depth before continuing here.. 

Bug 33028: Add TT filters for Price and pattern checks to input fields

This actually takes us backwards and breaks input more.. We are expecting
currency format to be correctly passed to us in system currency format.. NOT
always US decimal.. as such by adding the pattern and setting the input types
to decimal only we are forcing US decimal input which means the unformat call
on the serverside is breaking the inputs.

I think we should go all the way back to `Bug 33028: Add is_monetary to
recall_overdue_fine and article_request_fee` and we had a working system at
that point following Katrins test plan.. at least it was working for me for all
cases at that point.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #63 from Martin Renvoize  ---
I resolved this: Editing a rule with 1.50 shows 1.5
But I can't replicate this: Entering 1.50 and saving, i see: 150,00 in the
matrix and 150 in the DB

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152764|0   |1
is obsolete||

--- Comment #62 from Martin Renvoize  ---
Created attachment 152805
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152805&action=edit
Bug 33028: (follow-up) Apply unformat_price to decimal fields

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152763|0   |1
is obsolete||

--- Comment #61 from Martin Renvoize  ---
Created attachment 152804
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152804&action=edit
Revert "Bug 33028: Remove Price formatting as we are missing JS unformat"

This reverts commit c10aa96e4f1fac0f34e02caade3aa259d7233c71.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152762|0   |1
is obsolete||

--- Comment #60 from Martin Renvoize  ---
Created attachment 152803
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152803&action=edit
Bug 33028: (follow-up) Add unformat_price js function

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Nick Clemens  changed:

   What|Removed |Added

 CC||n...@bywatersolutions.com
 Status|Needs Signoff   |Failed QA

--- Comment #59 from Nick Clemens  ---
Editing a rule with 1.50 shows 1.5 - and tells me to 'please match the
requested format' - but doesn't say what that format is
Entering 1.50 and saving, i see: 150,00 in the matrix and 150 in the DB

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #58 from Martin Renvoize  ---
Added my signoff line to all patches.. I'm pretty happy with is solid now.. but
given all the challenges we've had with it I'd love a final QA run from an
independance party.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152754|0   |1
is obsolete||

--- Comment #57 from Martin Renvoize  ---
Created attachment 152764
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152764&action=edit
Bug 33028: (follow-up) Apply unformat_price to decimal fields

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152753|0   |1
is obsolete||

--- Comment #56 from Martin Renvoize  ---
Created attachment 152763
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152763&action=edit
Revert "Bug 33028: Remove Price formatting as we are missing JS unformat"

This reverts commit c10aa96e4f1fac0f34e02caade3aa259d7233c71.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152752|0   |1
is obsolete||

--- Comment #55 from Martin Renvoize  ---
Created attachment 152762
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152762&action=edit
Bug 33028: (follow-up) Add unformat_price js function

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152515|0   |1
is obsolete||

--- Comment #54 from Martin Renvoize  ---
Created attachment 152761
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152761&action=edit
Bug 33028: Remove Price formatting as we are missing JS unformat

Taking a step back with the formatting as we don't have an implementation
of unformat in JS yet. It could be readded later on a separate
report.

With this we will avoid the problem that editing a rule copies
falsely formatted values into the input fields that trigger
the pattern check on saving and require manual changing (or
without the check would be falsely saved to the db)

Signed-off-by: Katrin Fischer 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152514|0   |1
is obsolete||

--- Comment #53 from Martin Renvoize  ---
Created attachment 152760
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152760&action=edit
Bug 33028: (follow-up) Rewrite database update

This rewrite the database update with some things in mind:

* We now use a positive value list of allowed characters to check
  This makes sure that all of those are recognized:
  1,00
  1.00€
  abc
* Instead of dying after finding one wrong value, we loop through
  all values first, building up an error string
* When we have errors... we die and print the full list of things
  that need fixing.

Signed-off-by: Katrin Fischer 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152513|0   |1
is obsolete||

--- Comment #52 from Martin Renvoize  ---
Created attachment 152759
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152759&action=edit
Bug 33028: Add TT filters for Price and pattern checks to input fields

With this patch, all monetary values in the table will be displayed
formatted.

Also, the input will be checked against our agreed pattern to make
sure no false values can be entered.

Missing: When editing a rule, we need to unformat the value, so that
instead of the display format we have the input format available
for editing.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152512|0   |1
is obsolete||

--- Comment #51 from Martin Renvoize  ---
Created attachment 152758
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152758&action=edit
Bug 33028: Add is_monetary to recall_overdue_fine and article_request_fee

This patch marks the 2 missing monetary values for recal over due fines
and article request fees as monetary.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152511|0   |1
is obsolete||

--- Comment #50 from Martin Renvoize  ---
Created attachment 152757
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152757&action=edit
Bug 33028: (follow-up) Fix trailing 0 decimals

We want to recognise the truthyness of a number vs string so we drop
trailing decimals if they're just 0.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152510|0   |1
is obsolete||

--- Comment #49 from Martin Renvoize  ---
Created attachment 152756
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152756&action=edit
Bug 33028: (follow-up) Move monetary definition into hash

This patch moves the defintion of monetary rule type into the rule kinds
hash.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #152509|0   |1
is obsolete||

--- Comment #48 from Martin Renvoize  ---
Created attachment 152755
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152755&action=edit
Bug 33028: Fix calculations around cronjob fines.pl

When currency format is set on FR commas are decimals separators
but when cron like fines.pl try to calculate fines it's fails due to
this format.

I changed this behavior by targetted 'fine' and 'overduefinescap' in
circulation_rules.rule_name to unformat them when we save them.

This also fix the display in smart_rules table (before with commas price
was not good displayed - without decimals)

Test Plan :
1) Set your currency format on 'FR' and 'fine' OR/AND 'overduefinescap'
with commas
2) Be sure to have some patron overdues
3) Run ~/misc/cronjobs/fines.pl with args to find overdues
4) See an error like 'isn't numeric in substraction[..] or gt > [...]'
5) Run updatedatabase script (it will replace commas in your rules
changed in step 1) )
6) Repeat step 3 and see that everything was going "fine" (:tada:)

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #47 from Martin Renvoize  ---
OK.. I found the 5 minutes!

Please 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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #46 from Martin Renvoize  ---
Created attachment 152754
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152754&action=edit
Bug 33028: (follow-up) Apply unformat_price to decimal fields

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #45 from Martin Renvoize  ---
I ran out of tuits here I'm afraid.. passing back to Katrin.. I created an
'unformat_price' function for String and exported it for you.. I'll come back
and try to apply it to the right editing fields here when I can.. 

Adding the patches as is for now in case you have a moment before me.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #44 from Martin Renvoize  ---
Created attachment 152753
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152753&action=edit
Revert "Bug 33028: Remove Price formatting as we are missing JS unformat"

This reverts commit c10aa96e4f1fac0f34e02caade3aa259d7233c71.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #43 from Martin Renvoize  ---
Created attachment 152752
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152752&action=edit
Bug 33028: (follow-up) Add unformat_price js function

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #42 from Katrin Fischer  ---
Adjusted test plan:

* Set CurrencyFormat to FR
* Enable UseRecalls
* Enable ArticleRequests
* Administration > circulation and fine rules
* Add a new rule:
* Fine amount: 0.10
* Fine charging interval: 1  
* Overdue fines cap: 1.50
* Recall overdue fine amount: 1.10
* Save rule
* Verify that both Overdue fines cap and recall overdue fine amount show 
formatted with comma as: 1,50, 1,10
* Edit rule
* Fine amount: 0.10 - OK!
* Fine charging interval: 1  
* Overdue fines cap: 1,50 - NOT OK!
* Recall overdue fine amount: 1,10 - NOT OK!
* Save rule
* With SQL:

select * from circulation_rules where rule_name in
("fine","overduefinescap","recall_overdue_fine","article_request_fee");

You should see the false values in the database:
+++--+--+-+--
--+
| id | branchcode | categorycode | itemtype | rule_name   |
rule_value |
+++--+--+-+--
--+
|  9 | NULL   | NULL | NULL | fine| 0.10
|
| 11 | NULL   | NULL | NULL | overduefinescap | 1,50
|
| 32 | NULL   | NULL | NULL | recall_overdue_fine | 1,10
|
+++--+--+-+--
--+

* Edit rule for Article request fee 
* Fee: 1,0
* Verify it's also wrong in the database with above SQL.

* Apply patch
* Run database update
* Verify your wrong values cause the update to stop
* Fix them (one or all at once)
* Verify the update now continues
* Repeat editing and adding rules actions from before, a pattern check will
prevent you now from saving false values.


--

Missing bits and pieces:

>Have to:
>* When a rule is edited, the input field will be set to the display value
>(1,00). I didn't find an "unformat" equivalent for JS. This now triggers the
>pattern check, so you need to edit all values before being able to save
>them. We could use the inputmode="decimal" on the input fields to select for
>unformatting.

I have decided that this could be a separate bug. The JS used for
editing/cloning the rules is quite complex and it's easier to make a step back
first to get this moving and into old versions. 

--> I have removed the Price formatting from the circulation rules table in the
last follow-up.

> * Edit rule for Article request fee 
>   * Fee: 1,0
> * Verify it's also wrong in the database with above SQL.
> --> This is already fixed by the patch set now, as we don't allow to edit
> the rules and the pattern check works.
>   
> Missing bits and pieces:
> 
> Have to:
> * When a rule is edited, the input field will be set to the display value
> (1,00). I didn't find an "unformat" equivalent for JS. This now triggers the
> pattern check, so you need to edit all values before being able to save
> them. We could use the inputmode="decimal" on the input fields to select for
> unformatting.

I have now fixed this by removing the Price formatting from all fields. I think
this can be filed separately but is the quickest fix now that can also be 
backported.


> * Should we be able to deactivate overduefinescap by leaving it empty?
> (Unlimited?)

Yes, definitely. But there is already a separate bug (and a duplicate) for
that:
Bug 32271 - Overdue fines cap (amount) set to 0.00 when editing rule

So I decided to split this issue out in hope to be able to move this forward
and
get help with the other issue.

> Would be nice:
> * It would be nice to provide more help in fixing wrong values or
> automatically fixing obvious ones like xx,xx.

I think we don't need that to move on 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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Blocks||32271


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32271
[Bug 32271] Overdue fines cap (amount) set to 0.00 when editing rule
-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #41 from Katrin Fischer  ---
Created attachment 152515
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152515&action=edit
Bug 33028: Remove Price formatting as we are missing JS unformat

Taking a step back with the formatting as we don't have an implementation
of unformat in JS yet. It could be readded later on a separate
report.

With this we will avoid the problem that editing a rule copies
falsely formatted values into the input fields that trigger
the pattern check on saving and require manual changing (or
without the check would be falsely saved to the db)

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152446|0   |1
is obsolete||

--- Comment #40 from Katrin Fischer  ---
Created attachment 152514
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152514&action=edit
Bug 33028: (follow-up) Rewrite database update

This rewrite the database update with some things in mind:

* We now use a positive value list of allowed characters to check
  This makes sure that all of those are recognized:
  1,00
  1.00€
  abc
* Instead of dying after finding one wrong value, we loop through
  all values first, building up an error string
* When we have errors... we die and print the full list of things
  that need fixing.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152445|0   |1
is obsolete||

--- Comment #39 from Katrin Fischer  ---
Created attachment 152513
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152513&action=edit
Bug 33028: Add TT filters for Price and pattern checks to input fields

With this patch, all monetary values in the table will be displayed
formatted.

Also, the input will be checked against our agreed pattern to make
sure no false values can be entered.

Missing: When editing a rule, we need to unformat the value, so that
instead of the display format we have the input format available
for editing.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152444|0   |1
is obsolete||

--- Comment #38 from Katrin Fischer  ---
Created attachment 152512
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152512&action=edit
Bug 33028: Add is_monetary to recall_overdue_fine and article_request_fee

This patch marks the 2 missing monetary values for recal over due fines
and article request fees as monetary.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152443|0   |1
is obsolete||

--- Comment #37 from Katrin Fischer  ---
Created attachment 152511
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152511&action=edit
Bug 33028: (follow-up) Fix trailing 0 decimals

We want to recognise the truthyness of a number vs string so we drop
trailing decimals if they're just 0.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152442|0   |1
is obsolete||

--- Comment #36 from Katrin Fischer  ---
Created attachment 152510
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152510&action=edit
Bug 33028: (follow-up) Move monetary definition into hash

This patch moves the defintion of monetary rule type into the rule kinds
hash.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #152441|0   |1
is obsolete||

--- Comment #35 from Katrin Fischer  ---
Created attachment 152509
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152509&action=edit
Bug 33028: Fix calculations around cronjob fines.pl

When currency format is set on FR commas are decimals separators
but when cron like fines.pl try to calculate fines it's fails due to
this format.

I changed this behavior by targetted 'fine' and 'overduefinescap' in
circulation_rules.rule_name to unformat them when we save them.

This also fix the display in smart_rules table (before with commas price
was not good displayed - without decimals)

Test Plan :
1) Set your currency format on 'FR' and 'fine' OR/AND 'overduefinescap'
with commas
2) Be sure to have some patron overdues
3) Run ~/misc/cronjobs/fines.pl with args to find overdues
4) See an error like 'isn't numeric in substraction[..] or gt > [...]'
5) Run updatedatabase script (it will replace commas in your rules
changed in step 1) )
6) Repeat step 3 and see that everything was going "fine" (:tada:)

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff
   Patch complexity|--- |Small patch

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 CC||ke...@bywatersolutions.com

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

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #33 from Katrin Fischer  ---
Updated test plan:

* Set CurrencyFormat to FR
* Enable UseRecalls
* Enable ArticleRequests
* Administration > circulation and fine rules
* Add a new rule:
  * Fine amount: 0.10
  * Fine charging interval: 1  
  * Overdue fines cap: 1.50
  * Recall overdue fine amount: 1.10
* Save rule
* Verify that both Overdue fines cap and recall overdue fine amount show 
  formatted with comma as: 1,50, 1,10
* Edit rule
  * Fine amount: 0.10 - OK!
  * Fine charging interval: 1  
  * Overdue fines cap: 1,50 - NOT OK!
  * Recall overdue fine amount: 1,10 - NOT OK!
* Save rule
* With SQL:

select * from circulation_rules where rule_name in
("fine","overduefinescap","recall_overdue_fine","article_request_fee");

+++--+--+-++
| id | branchcode | categorycode | itemtype | rule_name   | rule_value
|
+++--+--+-++
|  9 | NULL   | NULL | NULL | fine| 0.10  
|
| 11 | NULL   | NULL | NULL | overduefinescap | 1,50  
|
| 32 | NULL   | NULL | NULL | recall_overdue_fine | 1,10  
|
+++--+--+-++

* Edit rule for Article request fee 
  * Fee: 1,0
* Verify it's also wrong in the database with above SQL.
--> This is already fixed by the patch set now, as we don't allow to edit the
rules and the pattern check works.

Missing bits and pieces:

Have to:
* When a rule is edited, the input field will be set to the display value
(1,00). I didn't find an "unformat" equivalent for JS. This now triggers the
pattern check, so you need to edit all values before being able to save them.
We could use the inputmode="decimal" on the input fields to select for
unformatting.
* Should we be able to deactivate overduefinescap by leaving it empty?
(Unlimited?)

Would be nice:
* It would be nice to provide more help in fixing wrong values or automatically
fixing obvious ones like xx,xx.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #32 from Katrin Fischer  ---
Created attachment 152446
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152446&action=edit
Bug 33028: (follow-up) Rewrite database update

This rewrite the database update with some things in mind:

* We now use a positive value list of allowed characters to check
  This makes sure that all of those are recognized:
  1,00
  1.00€
  abc
* Instead of dying after finding one wrong value, we loop through
  all values first, building up an error string
* When we have errors... we die and print the full list of things
  that need fixing.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #31 from Katrin Fischer  ---
Created attachment 152445
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152445&action=edit
Bug 33028: Add TT filters for Price and pattern checks to input fields

With this patch, all monetary values in the table will be displayed
formatted.

Also, the input will be checked against our agreed pattern to make
sure no false values can be entered.

Missing: When editing a rule, we need to unformat the value, so that
instead of the display format we have the input format available
for editing.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #30 from Katrin Fischer  ---
Created attachment 152444
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152444&action=edit
Bug 33028: Add is_monetary to recall_overdue_fine and article_request_fee

This patch marks the 2 missing monetary values for recal over due fines
and article request fees as monetary.

-- 
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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #147688|0   |1
is obsolete||

--- Comment #29 from Katrin Fischer  ---
Created attachment 152443
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152443&action=edit
Bug 33028: (follow-up) Fix trailing 0 decimals

We want to recognise the truthyness of a number vs string so we drop
trailing decimals if they're just 0.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #147687|0   |1
is obsolete||

--- Comment #28 from Katrin Fischer  ---
Created attachment 152442
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152442&action=edit
Bug 33028: (follow-up) Move monetary definition into hash

This patch moves the defintion of monetary rule type into the rule kinds
hash.

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

 Attachment #147686|0   |1
is obsolete||

--- Comment #27 from Katrin Fischer  ---
Created attachment 152441
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152441&action=edit
Bug 33028: Fix calculations around cronjob fines.pl

When currency format is set on FR commas are decimals separators
but when cron like fines.pl try to calculate fines it's fails due to
this format.

I changed this behavior by targetted 'fine' and 'overduefinescap' in
circulation_rules.rule_name to unformat them when we save them.

This also fix the display in smart_rules table (before with commas price
was not good displayed - without decimals)

Test Plan :
1) Set your currency format on 'FR' and 'fine' OR/AND 'overduefinescap'
with commas
2) Be sure to have some patron overdues
3) Run ~/misc/cronjobs/fines.pl with args to find overdues
4) See an error like 'isn't numeric in substraction[..] or gt > [...]'
5) Run updatedatabase script (it will replace commas in your rules
changed in step 1) )
6) Repeat step 3 and see that everything was going "fine" (:tada:)

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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

--- Comment #26 from Katrin Fischer  ---
I am working on a few follow-ups 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 33028] Wrongly formatted monetary amounts in circulation rules break scripts and calculations

2023-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33028

Katrin Fischer  changed:

   What|Removed |Added

Summary|The decimal separator   |Wrongly formatted monetary
   |'comma' and its |amounts in circulation
   |consequences on the |rules break scripts and
   |calculation of fines|calculations
   |(crons) |

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