Koha/api/v1/swagger/definitions/order.yaml
Agustin Moyano a551cb47ea
Bug 8179: Receive multiple orders
This patch implements the code to allow a patron to receive multiple
orders at the same time in /cgi-bin/koha/acqui/orderreceive.pl page

To test:
1. apply all patches
2. updatedatabase
3. Go to system preferences and allow AcqReceiveMultipleOrderLines
4. In acquisitions module, create a vendor if you don't have one and add
   3 baskets.. one with create items on ordering, one with create items
   on receiving and finally one with create items when cataloguing
5. Fill baskets with orders (There should be at least 15 orders in total). There should be a mix of orders created by suggestions, others by subscriptions and others by neither of those methods.
6. Close all baskets and receive shipment.
CHECK => in /cgi-bin/koha/acqui/parcel.pl page, in top table there is a column with checkboxes, and a button that says "Receive selected"
7. If all orders from all baskets are shown in the table, set the rows per page to 10, so table has more than one page
8. Check some of the checkboxes
CHECK => "Receive selected" button shows how many rows are selected
9. Go to the next page and select some more rows
CHECK => Changing page does not modify how many rows where selected
10. Go back to previous page
CHECK => Previously selected rows are still selected
11. Reload the page to deselect all rows
12. Select only one row and click on "Receive selected" button
CHECK => the page /cgi-bin/koha/acqui/orderreceive.pl behaves just the same as if the "receive" link in the selected row would have been clicked.
13. Click on cancel to go back to parcel.pl page
14. Select all rows (even the ones from the next page of the table) and
    click on "Receive selected"
CHECH => In orderreceive.pl page there is a table with all selected rows
15. Ensure table has more than one page, as in step 7
16. Click on the "edit" link in the last row of the current page
CHECK => A modal window is displayed with 4 tabs within: Info,
Accounting, Receipt history and Items
CHECK => Modal has 4 buttons at the bottom, 'Previous' to go to previos
order, 'Cancel' to close the modal without keeping modifications, 'Save'
to close modal keeping modifications and 'Next' to go to the next order
CHECK => Even that we are at the end of the current page, 'Next' button
is still available
17. Click on 'Next' button
CHECK => The table behind the modal now displays the next page, and the modal was not closed
18. Click on 'Previous'
CHECK => The table behind the modal went back to the first page, and the modal was not closed
19. Click on 'Previous' button till you reach the first row of the first
    page
CHECK => Only when you reach the first row of the first page 'Previous'
button gets disabled
20. Click on 'Next' button till you reach the last row of the last page
CHECK => Only when you reach the last button of the last page 'Next'
button gets disabled
21. Check that behaviour for the different types of order are still the
    same
    a. For orders that where created through suggestion, check that the
suggestion info is present in Info tab. If when suggestion was accepted
you set a reason, a dropdown to change the reason shoul display also.
    b. For orders that where created through subscriptions, check that
the Items tab is disabled, and the Receipt history is enabled. On
accounting tab you should be able to change quantity ordered. If there
were less items received than ordered, the next time you receive this
order the child order generated from this one shoul appear in receipt
history.
    c. For orders that don't come from subscription and creates there items on ordering, Receipt history
should be disabled, and a table with prefilled items shold appear in the
Items tab. You can edit them and the changes should appear in the item's
row.
    d. For orders that don't come from subscription and creates there
items on receiving, Receipt history should be disabled, and a form to
create the items should appear in Items tab. When you add an item a
table should appear.
    e. For orders that don't come from subscription and creates there
ites on cataloguing, Receipt history and Items tabs should be disabled.
    f. Any changes made in quantity (received or ordered) or funds in the modal should be
reflected in the table if you click save from the modal.
22. Once you've done all you checking and verifications click save
23. While saving a progress bar should appear
24. If no error was detected, you should be redirected back to parcel.pl
    page
25. If an error or warning was detected (like there is an order with 0
    items to receive) the save button should be disabled and warnings
are dispayed.
26. prove t/db_dependent/Koha/Acquisition/Fund.t t/db_dependent/Koha/Acquisitoin/Order.t t/db_dependent/Koha/Item.t

Sponsored-by: Virginia Polytechnic Institute and State University
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-15 08:53:47 -03:00

267 lines
5.6 KiB
YAML

---
type: object
properties:
order_id:
type: integer
description: Internally assigned order identifier
biblio_id:
type:
- integer
- "null"
description: Identifier for the linked bibliographic record
deleted_biblio_id:
type:
- integer
- "null"
description: Identifier for the linked deleted bibliographic record
created_by:
type:
- integer
- "null"
description: Interal patron identifier of the order line creator
entry_date:
type:
- string
- "null"
format: date
description: Date the bib was added to the basket
quantity:
type:
- integer
- "null"
description: Ordered quantity
currency:
type:
- string
- "null"
description: Currency used for the purchase
list_price:
type:
- number
- "null"
description: Vendor price for the line item
replacement_price:
type:
- number
- "null"
description: Replacement cost for this item
date_received:
type:
- string
- "null"
format: date
description: Date the order was received
invoice_id:
type:
- integer
- "null"
description: Id of the order invoice
shipping_cost:
type:
- number
- "null"
description: Shipping cost
unit_price:
type:
- number
- "null"
description: The actual cost entered when receiving this line item
unit_price_tax_excluded:
type:
- number
- "null"
description: Unit price excluding tax (on receiving)
unit_price_tax_included:
type:
- number
- "null"
description: Unit price including tax (on receiving)
quantity_received:
type: integer
description: Quantity received so far
cancellation_date:
type:
- string
- "null"
format: date
description: Date the line item was deleted
cancellation_reason:
type:
- string
- "null"
description: Reason of cancellation
internal_note:
type:
- string
- "null"
description: Notes related to this order line, made for staff
vendor_note:
type:
- string
- "null"
description: Notes related to this order line, made for vendor
basket_id:
type:
- integer
- "null"
description: Basket this order is linked to
timestamp:
type: string
format: date-time
description: Date and time this order line was last modified
rrp:
type:
- number
- "null"
description: Retail cost for this item
rrp_tax_excluded:
type:
- number
- "null"
description: Replacement cost for this item (tax excluded)
rrp_tax_included:
type:
- number
- "null"
description: Replacement cost for this item (tax included)
ecost:
type:
- number
- "null"
description: Effective cost
ecost_tax_excluded:
type:
- number
- "null"
description: Effective cost (tax excluded)
ecost_tax_included:
type:
- number
- "null"
description: Effective cost (tax included)
tax_rate_on_ordering:
type:
- number
- "null"
description: Tax rate on ordering (%)
tax_rate_on_receiving:
type:
- number
- "null"
description: Tax rate on receiving (%)
tax_value_on_ordering:
type:
- number
- "null"
description: Tax value on ordering
tax_value_on_receiving:
type:
- number
- "null"
description: Tax value on receiving
discount_rate:
type:
- number
- "null"
description: Discount rate
fund_id:
type: integer
description: Internal identifier for the fund this order goes against
statistics_1:
type:
- string
- "null"
description: Statistical field
statistics_2:
type:
- string
- "null"
description: Statistical field (2)
statistics_1_authcat:
type:
- string
- "null"
description: Statistical category for this order
statistics_2_authcat:
type:
- string
- "null"
description: Statistical category for this order (2)
uncertain_price:
type: boolean
description: If this price was uncertain
claims_count:
type: integer
description: Generated claim letters count
last_claim_date:
type:
- string
- "null"
format: date
description: Last date a claim letter was generated
subscription_id:
type:
- integer
- "null"
description: Subscription ID linking the order to a subscription
parent_order_id:
type:
- integer
- "null"
description: Order ID of parent order line if exists
status:
type: string
enum:
- new
- ordered
- partial
- complete
- cancelled
description: The current order status
basket:
type:
- object
- "null"
biblio:
type:
- object
- "null"
current_item_level_holds_count:
type: integer
description: Current holds count for associated items
estimated_delivery_date:
type:
- string
- "null"
format: date
description: Estimated delivery date
invoice_unit_price:
type:
- number
- "null"
description: The actual cost in the foreign currency used in the invoice
invoice_currency:
type:
- string
- "null"
description: Currency of the actual cost used when receiving
fund:
type:
- object
- "null"
invoice:
type:
- object
- "null"
items:
type: array
subscription:
type:
- object
- "null"
creator:
type:
- object
- "null"
description: Patron that created the order
additionalProperties: false