[Koha-bugs] [Bug 7180] Order from staged file improvements

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 29 11:57:48 CET 2013


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

--- Comment #142 from mathieu saby <mathieu.saby at univ-rennes2.fr> ---
Hello
I did not test, but made comments on your algorithm.
I still have reserves on some points.

Mathieu


> 
> The value in 947$c *includes* the tax.
> The rrp and ecost values are calculated depending on the supplier
> configuration.
I did not realize that... So if you have a RRP in 010$d and a price in 947$c,
you recalculate RRP from the value of 947$c? Maybe it is useful for old books
where the value of 010 is obsolete or written in Francs and not Euros?

> 
> I rewrite the algorithm:
> 
> So, the imported file always contains:

Not always ;-) Only records from some vendors will contains price and discount.
If those data are not provided, I suppose the behavior should be the same as
before (ecost calculated from the value of the field containing RRP : 010$b and
345$d)?

By the way, could you tell me if there will be a way to define the syspref to
take a type of price (RRP or "price") from 2 fields, like "010 or 345" or "347
or 345".
It is important, as DVD prices are only stored in 345 field, which is not
important for books. So, currently, DVD are correctly taken into account by
Koha, and it must still be the case with your patch.

> price = include tax with the discount
> discount = the discount
> ecost : unit price with discount
> RRP : unit price
> 

> If the supplier includes tax:
> ecost = unit price with discount, tax include
> RRP = unit price, tax include
> 

> If a discount exists in the file:
> ecost = price
> RRP = ecost/(1-discount)

Just "translating" it with numeric values, to be sure I understand:

price (in 347 field for ex.) : 94.95 € incl. tax.
discount (in some field): 10
ecost : calculated from price : 94.95 € incl. tax.
RRP : calculated from price : 105.5 € (=94.95 / (1-0.10)) incl. tax.

> 
> If no discount in the file:
> RRP = price
> ecost = price*(1-discount [from supplier])
> 

So when you say "no discount", you mean "no value of discount stored in some
field" AND "no discount taken into account in the calculation of price asked by
vendor".
So you suppose that if, for ex. 969$h is void, 947 will contain a RRP price.
Are we sure it should be an absolute rule? Maybe for some vendors, but we can
probably imagine a vendor just giving us the discounted price in some field,
without giving us the rate of the discount.


> 
> If the supplier does not include tax:
> ecost = unit price with discount, tax exclude
> RRP = unit price, tax exclude


> 
> If a discount exists in the file:
> ecost = price/(1+tax)
> RRP = ecost/1-discount


price (in 347 field for ex.) : 90 € excl. tax.
discount (in some field): 10
ecost : calculated from price : 90 € excl. tax.
RRP : calculated from price : 100 € (=94.95 / (1-0.10)) excl. tax.

So, your RRP will be an excl. tax. RRP.
But in 010$d the record may contain a incl. tax. RRP, which is used currenty by
Koha.
So you are changing Koha's behavior regarding RRP. That is what surprises me in
my tests. And I still don't agree.

I think we must be clear on *what* is exactly a RRP in Koha. Could RRP be with
or without tax depending on the preferences?
I don't like this idea, as RRP means "the price in any bookseller, outside the
libraries". So RRP should not be with/without tax depending on library's
preferences.
I would prefer a rule saying "RRP is always with tax", so if it is calculated
from a "vendor price" without tax, tax must be added.
And if needed (to avoid rounding errors for ex), we can calcule and store an
second version of RRP, without tax, that we may call "RRPe"

> 
> If no discount in the file:
> RRP = price/(1+tax)
> ecost = RRP(1-discount [from supplier])

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


More information about the Koha-bugs mailing list