[Koha-bugs] [Bug 9593] Prices not imported correctly from a staged file

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun May 26 01:36:15 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9593

--- Comment #32 from mathieu saby <mathieu.saby at univ-rennes2.fr> ---
Olivier,
With your 2d patch, I made 4 tests, with a batch of 19 records (I join them)
tva: 0
discount : 5%

test A : Euro as active currency, all currency rates = 1 ; selecting "Euro"
currency in addorderiso2709.pl (in Accounting details)
test B : Euro as active currency ; rates : 1 € = 10 $ = 4 £ ; selecting "Euro"
currency in addorderiso2709.pl (in Accounting details)
test C : GB Pound as active currency ; rates : 1 £ = 10 $ = 5 € ; selecting
"Pound" currency in addorderiso2709.pl (in Accounting details)
test D : GB Pound as active currency ; rates : 1 £ = 10 $ = 5 € ; selecting
"Euro" currency in addorderiso2709.pl (in Accounting details)

A, B, C are OK
D seems not OK, but I am not sure to understand how the currency you can choose
when importing the record is supposed to interact with the currency stored of
the record.
What Koha is supposed to do if there is a price with £ symbol in the record,
but if we select "euro" while importing?
Maybe the currency choosen when importing is made to be used if the prices have
no currency symbol in the record??
I did not test this point without your patch. Perhaps it is broken... If it is
the case, I would agree to sign it off, as as the problem it fixes has been
noticed in january. And we can fix it in an other patch.
Could you give me your analysis?
If you are as lost as myself, you can ask the koha-devel list ;-)

Titre01
75.40 EUR, 93.5 USD, 20 250 GBP
test A and test B : OK
- should be : 75.40
- result : 75.40
test C : OK
- should be : RRP = 20250.00 ; Total tax inc = 19237.50
- result : RRP : 20250.00 ; Total tax inc. (POUND) : 19237.50
test D : KO 
- should be : don't know
- result : RRP : 4050.00 ; Total tax inc. (POUND) : 19237.50
=> it means Koha knows £ is the active currency, takes the 20250 pounds price,
BUT after that, the system considers it is 20250 euros, so it divides it by 5
(according to currency rate), to establish a RRP price of 4050£
AND rather strangely, the Total tax inc. price is calculated according to the
raw value in the record (20250) and not to the wrongly calculated price of
4050£.

Titre02
75.40 EUR, 93.5 USD, 20,250 GBP
test A and test B : OK
- should be : 75.40
- result : 75.40
test C : OK
- should be : RRP = 20250.00 ; Total tax inc = 19237.50
- result : RRP : 20250.00 ; Total tax inc. (POUND) : 19237.50
test D : KO 
- should be : don't know
- result : RRP : 4050.00 ; Total tax inc. (POUND) : 19237.50

Titre03
75.40 EUR, 93.5 USD, 20,250.10 GBP
test A and test B : OK
- should be : 75.40
- result : 75.40
test C : OK
- should be : RRP = 20250.10 ; Total tax inc = 19237.60
- result : RRP : 20250.10 ; Total tax inc. (POUND) : 19237.60
test D : KO 
- should be : don't know
- result : RRP : 4050.02 ; Total tax inc. (POUND) : 19237.60

Titre04
€75.40, $93.5, £20,250.10
test A and test B : OK
- should be : 75.40
- result : 75.40
test C : OK
- should be : RRP = 20250.10 ; Total tax inc = 19237.60
- result : RRP : 20250.10 ; Total tax inc. (POUND) : 19237.60
test D : KO 
- should be : don't know
- result : RRP : 4050.02 ; Total tax inc. (POUND) : 19237.60

Titre10
32,10 EUR, 45,12 USD
test A and test B : OK
- should be : 32.10
- result : 32.10
test C : OK
- should be : RRP = 6.42 (= 32.10/5) ; Total tax inc = 6.10
- result : = 6.42 (= 32.10/5) ; Total tax inc = 6.10
test D : KO
- should be : don't know
- result : RRP : 1.28 ; Total tax inc. (POUND) : 6.10
=> not good : Koha took the first price (32.10), and considered it is euro. I
don't know how, but for RRP price, it divided it by 5, and then again by 5
(32.10/5/5 = 1.28). For Total tax inc, it only took 32.10 /5 (minus the
discount), that is correct.

Titre11
32,10 €, 45,12 $
test A and test B : OK
- should be : 32.10
- result : 32.10
test C : OK
- should be : RRP = 6.42 (= 32.10/5) ; Total tax inc = 6.10
- result : = 6.42 (= 32.10/5) ; Total tax inc = 6.10
test D : KO
- should be : don't know
- result : RRP : 1.28 ; Total tax inc. (POUND) : 6.10

Titre12
32.10, USD 45.12
test A and test B : OK
- should be : 32.10
- result : 32.10
test C : OK
- should be : RRP = 6.42 (= 32.10/5) ; Total tax inc = 6.10
- result : = 6.42 (= 32.10/5) ; Total tax inc = 6.10
test D : KO
- should be : don't know
- result : RRP : 1.28 ; Total tax inc. (POUND) : 6.10

Titre13
€32.10, $45.12
test A and test B : OK
- should be : 32.10
- result : 32.10
test C : OK
- should be : RRP = 6.42 (= 32.10/5) ; Total tax inc = 6.10
- result : = 6.42 (= 32.10/5) ; Total tax inc = 6.10
test D : KO
- should be : don't know
- result : RRP : 1.28 ; Total tax inc. (POUND) : 6.10

Titre20
300 ¥, 62.20 $
test A : OK
- should be : 62.20
- result : 62.20
test B : OK
- should be : 6.22
- result : 6.22
test C : OK
- should be : RRP = 6.22 (= 62.20/10) ; Total tax inc = 5.91
- result : RRP = 6.22 ; Total tax inc = 5.91
test D : KO
- should be : don't know
- result : RRP : 1.24 ; Total tax inc. (POUND) : 5.91
=> same as before : RRP = raw price / 25 ; total tax inc. = raw price / 5 minus
discount

Titre22
¥300, $62.20
test A :
- should be : 62.20
- result : 62.20
test B : 
- should be : 6.22 (as 10 $ = 1 €)
- result : 6.22
test C : OK
- should be : RRP = 6.22 (= 62.20/10) ; Total tax inc = 5.91
- result : RRP = 6.22 ; Total tax inc = 5.91
test D : KO
- should be : don't know
- result : RRP : 1.24 ; Total tax inc. (POUND) : 5.91

Titre23
300 YEN, 62.20 USD
test A :
- should be : 62.20
- result : 62.20 => OK
test B : OK
- should be : 6.22
- result : 6.22
test C : OK
- should be : RRP = 6.22 (= 62.20/10) ; Total tax inc = 5.91
- result : RRP = 6.22 ; Total tax inc = 5.91
test D : KO
- should be : don't know
- result : RRP : 1.24 ; Total tax inc. (POUND) : 5.91

Titre24
YEN 300, USD 62.20
test A :
- should be : 62.20
- result : 62.20
test B : OK
- should be : 6.22
- result : 6.22
test D : OK
- should be : RRP = 6.22 (= 62.20/10) ; Total tax inc = 5.91
- result : RRP = 6.22 ; Total tax inc = 5.91
test D : KO
- should be : don't know
- result : RRP : 1.24 ; Total tax inc. (POUND) : 5.91

Titre30
75 EUR
test A and B : OK
- should be : 75.00
- result : 75.00
test C : OK
- should be : RRP = 15£ (=75€/5) ; Total tax inc. : 14.25£
- result : RRP : 15 ; Total tax inc. (POUND) : 14.25
test D :
- should be : don't know
- result : RRP : 3 ; Total tax inc. (POUND) : 14.25
=> same as before : RRP = raw price / 25 ; total tax inc. = raw price / 5 minus
discount

Titre31
€75
test A and B : OK
- should be : 75.00
- result : 75.00
test C : OK
- should be : RRP = 15£ (=75€/5) ; Total tax inc. : 14.25£
- result : RRP : 15 ; Total tax inc. (POUND) : 14.25
test D :
- should be : don't know
- result : RRP : 3 ; Total tax inc. (POUND) : 14.25

Titre32
EUR 75
test A and B : OK
- should be : 75.00
- result : 75.00
test C : OK
- should be : RRP = 15£ (=75€/5) ; Total tax inc. : 14.25£
- result : RRP : 15 ; Total tax inc. (POUND) : 14.25
test D : KO
- should be : don't know
- result : RRP : 3 ; Total tax inc. (POUND) : 14.25

Titre33
75 €
test A and B : OK
- should be : 75.00
- result : 75.00 => OK
test C : OK
- should be : RRP = 15£ (=75€/5) ; Total tax inc. : 14.25£
- result : RRP : 15 ; Total tax inc. (POUND) : 14.25
test D : KO
- should be : don't know
- result : RRP : 3 ; Total tax inc. (POUND) : 14.25

Titre34
¥300
all tests : OK
- should be : 0
- result : 0 => OK

Titre35
300 YEN
all tests : OK
- should be : 0
- result : 0 => OK

Titre36
300 ¥
all tests : OK
- should be : 0
- result : 0 => OK


Mathieu

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list