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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 30 09:44:53 CET 2013


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

Jonathan Druart <jonathan.druart at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #21462|0                           |1
        is obsolete|                            |
  Attachment #21463|0                           |1
        is obsolete|                            |
  Attachment #21464|0                           |1
        is obsolete|                            |
  Attachment #21465|0                           |1
        is obsolete|                            |
  Attachment #21466|0                           |1
        is obsolete|                            |
  Attachment #21467|0                           |1
        is obsolete|                            |
  Attachment #21468|0                           |1
        is obsolete|                            |
  Attachment #21469|0                           |1
        is obsolete|                            |
  Attachment #21470|0                           |1
        is obsolete|                            |
  Attachment #21471|0                           |1
        is obsolete|                            |
  Attachment #21472|0                           |1
        is obsolete|                            |
  Attachment #21473|0                           |1
        is obsolete|                            |
  Attachment #21474|0                           |1
        is obsolete|                            |
  Attachment #21514|0                           |1
        is obsolete|                            |

--- Comment #126 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 22546
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22546&action=edit
Bug 7180: Order from staged file improvements

This patch adds:
- 1 syspref MarcFieldsToOrder
- 1 ajax script acqui/ajax-getauthvaluedropbox.pl
- 1 routine C4::Budgets::GetBudgetByCode

Before this patch you were not able to order 1 or all the records from
your staged file. You were allowed to specify some information ("Import All"
and "Accounting details" areas) for the order.

With this patch, the previous behaviours still exist.
But now you can *select* which records you want to ordered.
For these ones you can specify independently informations (Quantity,
price, budget, sort1 and sort2).
The cherry on the cake is that you can pre-fill these information with
values

Test plan:
1. Fill the new syspref MarcFieldsToOrder with something like:
==BEGIN==
price: 947$c
quantity: 969$h
budget_code: 922$a
rrp: 010$d
discount: 969$d
sort1: 923$a
sort2: 924$a

==END==
The empty line at the end is mandatory!
The budget (corresponding to your budget_code) can be filled with
authorized value categories (statistic 1 and 2).
The sort1 and sort2 values can be filled with the an authorized value
(of the category previously selected)

2. Choose randomly one or more biblio(s) and fill fields with what is relevant.

3. Export the biblio and import it (with the "Stage MARC records for
import" tool).

4. Go on a basket and add an order from a staged file. Select your
staged file.

5. Well. Now you can see your biblio (or biblios if your had exported
more than one). For each one, informations should be pre-filled with the
biblio values. The budget should be selected on the budget corresponding
to the budget_code (in the field 922$a) and the "planning values" too
(with fields 923$a and 924$a).
You can modify these values (or not) and choose a default value for
budget and planning values (in the "Accounting details" area).

6. Save and check the prices values. Modify the order and check that
budget and sort* are good

Prices are calculated following some parameters:
if there is no price => listprice = 0
else =>
  - the gstrate value for your order is the gstrate value of the bookseller
  - discount = if filled : the discount value / 100
               else: the discount value of the bookseller
  - if the bookseller includes tax( List item price includes tax: Yes )
        if a discount exists:
            ecost = price
            rrp   = ecost / ( 1 - discount )
        else: # a discount does not exist
            ecost = price * ( 1 - discount )
            rrp   = price
    else # the bookseller does not include tax
        if a discount exists:
            ecost = price / ( 1 + gstrate )
            rrp   = ecost / ( 1 - discount )
        else: # a discount does not exist
            rrp   = price / ( 1 + gstrate )
            ecost = rrp * ( 1 - discount )
  - in all cases:
        listprice = rrp / currency rate
        unitprice = ecost
        total = ecost * quantity

7. Retry with different parameters

8. Check the 'Import all' action still works

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


More information about the Koha-bugs mailing list