[Koha-bugs] [Bug 12969] VAT and price calculation should be done in a subroutine

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 26 15:32:14 CEST 2014


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

--- Comment #13 from Jonathan Druart <jonathan.druart at biblibre.com> ---
(In reply to Paola Rossi from comment #11)
> 1) Reading the file Prices.t of the patch, the "$order_x->rrpgste" always
> has "rrpgsti" as the corresponding "field", instead of "rrpgste".
> 
> For example this is the compare of the first configuration 0-0:
> +        compare(
> +            {
> +                got      => $order_0_0->{rrpgste},
> +                expected => 82.00,
> +                conf     => '0 0',
> +                field    => 'rrpgsti'
> +            }
> +        );
> 
> In all the 4 Conf this compare has the same "field" rrpgsti. 
> Is it an error?

It's a typo. It is not important, this is only used to display the test
description.

Fixed in the followup.

> 2) Comparing the two files, in Conf III 1 0 I have some doubts:
> 
> A) unitprice is 73.804500, whilst the 12964's file-doc says 73.80;
> B) rrp is 82.01, instead of 82.00 (in the 12964's file-doc)
> C) so, in the following:
> +        compare(
> +            {
> +                got      => $order_1_0->{rrpgsti},
> +                expected => 82.01,
> 
> the "expected" should be 82.00 instead.
> 
> Anyway soon after B) you wrote:
> +        # Note that this configuration is *not* correct!
> +        # rrp gsti should be 82 (what we inserted!)
> +        # gstvalue should be 7.03 instead of 7.02
> 
> so 2) could be right.
> 
> The 2) note is the only difference I've seen between the patch and the
> 12964's file-doc.

Actually, I thought it was always 82.01 (what you found this morning on bug
12964.
In master, if you didn't receive the order yet, the displayed value is 82.00
BUT it the order is received, the value becomes 82.01 (...)
The tests consider that the orders have already been received (the datereceived
and quantityreceived are set).
The 82.01 is correct here.

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


More information about the Koha-bugs mailing list