Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt

730 lines
36 KiB
Text
Raw Normal View History

Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% USE KohaDates %]
[% USE TablesSettings %]
Bug 13001: Refactor VAT and price calculation - parcel page Bug 12969 introduces a subroutine to centralize VAT and prices calculation. It should be use in the acqui/parcel.pl script. Test plan: 1/ Create 4 suppliers with the different configurations 2/ Create a basket and create several orders 3/ Go on the parcel page 4/ You should see, on the "pending orders" table, the same prices as before this patch. Note that the prices are now correctly formated. You could see one change for the supplier configuration 3 (1 0): If the cost of the item is 82, discount 10% and vat 5%: The "Order cost" = 140.58 instead of 140.57. Indeed, before this patch, the order cost was wrong, now you should have 70.29*2 = 140.58 ( before: 140.58 + 7.03 = 147.61 now: 140.58 + 7.02 = 147.60 ) 5/ Receive the items and return on the parcel page Now the "Already received" table with the same prices as before this patch. Note some differences too: - There was a td tag missing, the table was badly formated, it's now fixed (column below the "Cancel receipt" link). - The prices are now correctly formated. - For the configuration 2 (1 1), if the cost of the item is 82, discount 10% and vat 5%: ( before: 140.57 + 7.03 = 147.60 now: 140.58 + 7.02 = 147.60 ) Note that 7.03 is the "correct" value, but on all other pages, 7.02 is displayed. To be consistent, we should display the same prices everywhere. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-26 12:46:21 +00:00
[% USE Price %]
Bug 23983: Contextualization of 'Order' (verb) vs 'Order' (noun) This patch adds context (word class, either verb or noun) to the word 'Order' when it is displayed alone in the acquisitions module. The following files have been modified: basket.tt neworderbiblio.tt newordersubscription.tt newordersuggestion.tt ordered.tt parcel.tt spent.tt transferorder.tt uncertainprice.tt z3950_search.tt To test, check all those pages in English to make sure there is no change. 1- Go to Acquisitions 2- Create a basket 3- Add to basket from an existing record (neworderbiblio) 4- Add to basket from a subscription (newordersubscription) 5- Add to basket from a suggestion (newordersuggestion) 6- Add to basket from an external source (z3950_search) 7- In one of the orders, check the uncertain price box 8- Check the basket display table (basket) 9- Click transfer on one of the orders (transferorder) 10- Go to the vendor page and click on 'Uncertain prices' (uncertainprice) 11- Click on 'Receive parcel' (parcel) 12- Go to the Acquisitions home page and click on the amount for 'ordered' (ordered) 13- Go to the Acquisitions home page and click on the amount for 'spent' (spent) Next, install a new language (fr-CA used as example) 1- translate create fr-CA 2- open fr-CA-messages.po and add a translation for Order (verb) and Order (noun) (it doesn't have to be real, just write something different for each) 3- translate install fr-CA 4- in the system preferences, enable the french language in 'language' 5- change interface language to french Redo the tests above to make sure the word you put in the translation for the verb is in the places where 'Order' should be a verb and that the translation you put in for the noun is in the places where 'Order' should be a noun Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-11-06 23:24:13 +00:00
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
2011-03-21 07:02:15 +00:00
[% INCLUDE 'doc-head-open.inc' %]
<title>[% FILTER collapse %]
Bug 17458: Remove use of datereceived from order receive page Before this patch the order receive page (parcel.pl) would show ... Received by: <current user> On: <current date> This is not really helpful. Whenever you viewed an invoice, it would tell you it was _you_ who received that _today_. As we don't store a creator of an invoice and the order lines in an invoice could have been received by different people (which we also don't know about), the "Received by" is removed by this patch. Instead of today's date, we can show the shipment date entered for the invoice. Again: different order lines could have been received on different dates for this shipment. So only the shipment date makes sense as it's on invoice level. This also makes changes to the page title, breadcrumby and page heading: When the invoice is closed, they will read: Receipt summary for [vendor] ... When the invoice is not closed, they wil read: Receive orders from [vendor] ... To test: - Create a basket with some orders in acq - Close the basket - Receive shipment and create an invoice - Make sure shipment date is not set to today - Verify the information shown on top of parcel.pl is you and today - Change staff users - Go to your invoice, it's now this user and today - Apply patch - Received by: should be gone and the On: replaced by Shipment date: with the date you selected - Check the page title, breadcrumbs and headings read all the same 'Receive orders...' - Finish receiving and close the invoice - "Go to receipt page" - Verify they now read "Receipt summary.." If you have older invoices in your system, it would work even better with these as you'd see that always today's date is displaying without the patch. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-04-14 11:42:22 +00:00
[% IF ( invoiceclosedate ) %]
[% IF ( invoice ) %]
[% tx("Receipt summary for {vendor}, invoice {invoice_number}", { vendor = name, invoice_number = invoice }) | html %]
[% ELSE %]
[% tx("Receipt summary for {vendor}", { vendor = name }) | html %]
[% END %]
Bug 17458: Remove use of datereceived from order receive page Before this patch the order receive page (parcel.pl) would show ... Received by: <current user> On: <current date> This is not really helpful. Whenever you viewed an invoice, it would tell you it was _you_ who received that _today_. As we don't store a creator of an invoice and the order lines in an invoice could have been received by different people (which we also don't know about), the "Received by" is removed by this patch. Instead of today's date, we can show the shipment date entered for the invoice. Again: different order lines could have been received on different dates for this shipment. So only the shipment date makes sense as it's on invoice level. This also makes changes to the page title, breadcrumby and page heading: When the invoice is closed, they will read: Receipt summary for [vendor] ... When the invoice is not closed, they wil read: Receive orders from [vendor] ... To test: - Create a basket with some orders in acq - Close the basket - Receive shipment and create an invoice - Make sure shipment date is not set to today - Verify the information shown on top of parcel.pl is you and today - Change staff users - Go to your invoice, it's now this user and today - Apply patch - Received by: should be gone and the On: replaced by Shipment date: with the date you selected - Check the page title, breadcrumbs and headings read all the same 'Receive orders...' - Finish receiving and close the invoice - "Go to receipt page" - Verify they now read "Receipt summary.." If you have older invoices in your system, it would work even better with these as you'd see that always today's date is displaying without the patch. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-04-14 11:42:22 +00:00
[% ELSE %]
[% tx("Receive orders from {vendor}", { vendor = name }) | html %]
[% END %] &rsaquo;
[% t("Acquisitions") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
2011-03-21 07:02:15 +00:00
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="acq_parcel" class="acq">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
[% END %]
2011-03-21 07:02:15 +00:00
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
[% END %]
[% IF invoiceclosedate %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF ( invoice ) %]
<span>Receipt summary for <em>[% name | html %] [ [% invoice | html %] ]</em></span>
[% ELSE %]
<span>Receipt summary for <em>[% name | html %]</em></span>
[% END %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Receive orders from [% name | html %]</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
2011-03-21 07:02:15 +00:00
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 order-md-2 order-sm-2">
<main>
[% INCLUDE 'messages.inc' %]
[% IF ( receive_error ) %]
<div class="alert alert-warning">
<h3>Error adding items:</h3>
<ul>
[% FOREACH error_loo IN error_loop %]
<li>[% error_loo.error_param | html %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate barcode[% END %] <!-- todo: other error conditions come here. --></li>
[% END %]
</ul>
</div>
[% END %]
2011-03-21 07:02:15 +00:00
<h1>
Bug 17458: Remove use of datereceived from order receive page Before this patch the order receive page (parcel.pl) would show ... Received by: <current user> On: <current date> This is not really helpful. Whenever you viewed an invoice, it would tell you it was _you_ who received that _today_. As we don't store a creator of an invoice and the order lines in an invoice could have been received by different people (which we also don't know about), the "Received by" is removed by this patch. Instead of today's date, we can show the shipment date entered for the invoice. Again: different order lines could have been received on different dates for this shipment. So only the shipment date makes sense as it's on invoice level. This also makes changes to the page title, breadcrumby and page heading: When the invoice is closed, they will read: Receipt summary for [vendor] ... When the invoice is not closed, they wil read: Receive orders from [vendor] ... To test: - Create a basket with some orders in acq - Close the basket - Receive shipment and create an invoice - Make sure shipment date is not set to today - Verify the information shown on top of parcel.pl is you and today - Change staff users - Go to your invoice, it's now this user and today - Apply patch - Received by: should be gone and the On: replaced by Shipment date: with the date you selected - Check the page title, breadcrumbs and headings read all the same 'Receive orders...' - Finish receiving and close the invoice - "Go to receipt page" - Verify they now read "Receipt summary.." If you have older invoices in your system, it would work even better with these as you'd see that always today's date is displaying without the patch. Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-04-14 11:42:22 +00:00
[% IF ( invoiceclosedate ) %]
<span>Receipt summary for <em>[% name | html %]</em></span> [% IF ( invoice ) %] <em> [ [% invoice | html %] ] </em>[% END %]
2011-03-21 07:02:15 +00:00
[% ELSE %]
<span>Receive orders from [% name | html %]</span>
2011-03-21 07:02:15 +00:00
[% END %]
</h1>
[% IF ( success_delorder ) %]
<div class="alert alert-info">The order has been successfully canceled.</div>
2011-03-21 07:02:15 +00:00
[% ELSE %]
[% IF ( error_delitem ) %]
<div class="alert alert-warning">The order has been canceled, although one or more items could not have been deleted.</div>
[% END %]
[% IF ( error_delbiblio ) %]
<div class="alert alert-warning">The order has been canceled, although the record has not been deleted.</div>
[% END %]
2011-03-21 07:02:15 +00:00
[% END %]
[% IF (error_cancelling_receipt) %]
<div class="alert alert-warning">
<span>Cannot cancel receipt. Possible reasons:</span>
<ul>
<li>
The order line you are trying to cancel was created from a partial receipt
of another order line which is already received. Try to cancel this
one first and retry.
</li>
<li>
The order line you are trying to cancel was created from a partial receipt
of another order line which has been deleted. Cancellation is not
possible.
</li>
</ul>
</div>
[% END %]
[% IF error_invoice_not_known %]
<div class="alert alert-warning">
The invoice referenced by this invoiceid does not exist.
</div>
[% END %]
[% UNLESS no_orders_to_display %]
2011-03-21 07:02:15 +00:00
<div id="acqui_receive_summary">
<p><strong>Invoice number:</strong> <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | uri %]">[% invoice | html %]</a> <strong>Shipment date:</strong> [% shipmentdate | $KohaDates %]</p>
2011-03-21 07:02:15 +00:00
</div>
[% UNLESS (invoiceclosedate) %]
<div id="acqui_receive_search" class="page-section">
<h3>Pending orders</h3>
<table id="pending_orders" class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>Basket</th>
<th>Basket group</th>
<th>Order line</th>
<th>Summary</th>
<th>View</th>
<th>Replacement price</th>
<th>Quantity</th>
<th>Unit cost</th>
<th>Order cost</th>
<th>Fund</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
</table>
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>
2020-10-09 20:15:31 +00:00
<fieldset class="action">
<button id="select_multiple" class="btn btn-primary"></button>
</fieldset>
</div>
[% ELSE %]
<p>
<span>Invoice is closed, so you can't receive orders anymore.</span>
[% IF CAN_user_acquisition_reopen_closed_invoices %]
<a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid | uri %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]">Reopen it</a>.
[% END %]
</p>
[% END %]
<div id="acqui_receive_receivelist" class="page-section">
<h3>Already received</h3>
2011-03-21 07:02:15 +00:00
[% IF ( loop_received ) %]
<form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
<table id="receivedt">
<thead>
<tr>
<th>Basket</th>
<th>Basket group</th>
<th>Order line</th>
<th title="Item holds / Total holds">Holds</th>
<th>Summary</th>
<th>More</th>
<th>Replacement price</th>
<th>Quantity</th>
<th>Fund</th>
<th>Est cost</th>
<th>Actual cost</th>
<th>TOTAL</th>
<th></th>
</tr>
</thead>
<tfoot>
[% FOREACH key IN subtotal_for_funds.keys.sort %]
<tr>
[% IF invoiceincgst %]
<td colspan="6" class="total">(Tax inc.)</td>
[% ELSE %]
<td colspan="6" class="total">(Tax exc.)</td>
[% END %]
<td colspan="3"><em>Subtotal for</em> [% key | html %]</td>
<td>[% subtotal_for_funds.$key.ecost | $Price %]</td>
<td>[% subtotal_for_funds.$key.unitprice | $Price %]</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
[% END %]
<tr>
<th colspan="11" class="total">Total tax exc.</th>
<th>[% total_tax_excluded | $Price %]</th>
<th></th>
</tr>
[% FOREACH book_foot IN book_foot_loop %]
<tr>
<th colspan="11">Total (GST [% book_foot.tax_rate * 100 | html %]%)</th>
<th>[% book_foot.tax_value | $Price %]</th>
<th></th>
</tr>
[% END %]
<tr>
<th colspan="11" class="total">Total tax inc.</th>
<th>[% total_tax_included | $Price %]</th>
<th></th>
</tr>
2011-03-21 07:02:15 +00:00
</tfoot>
<tbody class="filterclass">
[% FOREACH order IN loop_received %]
2011-03-21 07:02:15 +00:00
<tr>
<td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno | uri %]"> [% order.basketname | html %] ([% order.basketno | html %])</a></td>
<td>
[% IF order.basketgroupid %]
<a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% booksellerid | uri %]">[% order.basketgroupname | html %] ([% order.basketgroupid | html %])</a>
[% ELSE %]
No basket group
[% END %]
</td>
<td>
<a href="neworderempty.pl?ordernumber=[% order.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]">[% order.ordernumber | html %]</a>
[% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
(<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]" title="Original order line">[% order.parent_ordernumber | html %]</a>)
[% END %]
</td>
<td>
[% IF order.total_holds > 0 %]
[% IF order.item_holds > 0 %]
<span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | uri %]">[% order.item_holds | html %]</a></span>
[% ELSE %]
0
[% END %]
/
<span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | uri %]">[% order.total_holds | html %]</a></span>
[% ELSE %]
0
[% END %]
</td>
<td>
[% INCLUDE 'biblio-title.inc' biblio=order link = 1 %]
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
[% IF ( order.author ) %] / [% order.author | html %][% END %]
[% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
Bug 11122 - publisher code and publication year not fetched in acq orders In acquisition, several templates try to display publisher code and publication year : invoice.tt, parcel.tt, transferorder.tt. Thoses pages use C4::Acquisition methods GetPendingOrders or GetInvoiceDetails. The bug is that in the SQL query of those methods, biblioitems.publishercode and biblioitems.publicationyear. In uncertainprice.pl those datas are fetch using GetBiblioData. It whould be better to fetch them in GetPendingOrders and GetInvoiceDetails. This patch changes SQL queries to fetch wanted datas : aqorders.*,biblio.title,biblio.author,biblioitems.isbn,biblioitems.publishercode,biblioitems.publicationyear. GetInvoiceDetails also needs : biblio.seriestitle,biblioitems.volume. This patch also unifies the way biblio datas are displayed : <a href="link to catalog using biblionumber">[title]</a> <em>by</em> [author] &ndash; [isbn] <em>Publisher:</em> [publishercode], [publicationyear] Test plan : - Choose a biblio record containing a data in : biblio.title, biblio.author, biblioitems.isbn, biblioitems.publishercode, biblioitems.publicationyear, biblio.seriestitle, biblioitems.volume. - Create an order using this biblio. - Look at this order in pages : parcel.pl, transferorder.pl, uncertainprice.pl => You see publisher code and publication year - Look at this order in page : invoice.pl => You see publisher code, publication year, series title and volume Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2013-10-23 10:05:23 +00:00
[% IF ( order.publishercode ) %]
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
<br />Publisher: [% order.publishercode | html %]
[%- IF ( order.publicationyear > 0) -%], [% order.publicationyear | html %]
[%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate | html %]
[% END %]
Bug 11122 - publisher code and publication year not fetched in acq orders In acquisition, several templates try to display publisher code and publication year : invoice.tt, parcel.tt, transferorder.tt. Thoses pages use C4::Acquisition methods GetPendingOrders or GetInvoiceDetails. The bug is that in the SQL query of those methods, biblioitems.publishercode and biblioitems.publicationyear. In uncertainprice.pl those datas are fetch using GetBiblioData. It whould be better to fetch them in GetPendingOrders and GetInvoiceDetails. This patch changes SQL queries to fetch wanted datas : aqorders.*,biblio.title,biblio.author,biblioitems.isbn,biblioitems.publishercode,biblioitems.publicationyear. GetInvoiceDetails also needs : biblio.seriestitle,biblioitems.volume. This patch also unifies the way biblio datas are displayed : <a href="link to catalog using biblionumber">[title]</a> <em>by</em> [author] &ndash; [isbn] <em>Publisher:</em> [publishercode], [publicationyear] Test plan : - Choose a biblio record containing a data in : biblio.title, biblio.author, biblioitems.isbn, biblioitems.publishercode, biblioitems.publicationyear, biblio.seriestitle, biblioitems.volume. - Create an order using this biblio. - Look at this order in pages : parcel.pl, transferorder.pl, uncertainprice.pl => You see publisher code and publication year - Look at this order in page : invoice.pl => You see publisher code, publication year, series title and volume Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2013-10-23 10:05:23 +00:00
[% END %]
[% IF ( order.suggestionid ) %]
<br/>
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
Suggested by: [% order.surnamesuggestedby | html %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby | html %] [% END %]
(<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid | uri %]&amp;op=show">suggestion #[% order.suggestionid | html %]</a>)
[% END %]
<br />
[% IF ( order.order_internalnote ) %]
<p class="ordernote"><strong>Internal note: </strong>[% order.order_internalnote | html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% order.ordernumber | uri %]&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=internal">Change internal note</a>]</p>
[% ELSE %]
[<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% order.ordernumber | uri %]&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=internal">Add internal note</a>]
[% END %]
[% IF ( order.order_vendornote ) %]
<p class="ordernote"><strong>Vendor note: </strong>[% order.order_vendornote | html %]</p>
[% ELSE %]
[<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% order.ordernumber | uri %]&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=vendor">Add vendor note</a>]
[% END %]
2011-03-21 07:02:15 +00:00
</td>
<td>
Bug 23983: Contextualization of 'Order' (verb) vs 'Order' (noun) This patch adds context (word class, either verb or noun) to the word 'Order' when it is displayed alone in the acquisitions module. The following files have been modified: basket.tt neworderbiblio.tt newordersubscription.tt newordersuggestion.tt ordered.tt parcel.tt spent.tt transferorder.tt uncertainprice.tt z3950_search.tt To test, check all those pages in English to make sure there is no change. 1- Go to Acquisitions 2- Create a basket 3- Add to basket from an existing record (neworderbiblio) 4- Add to basket from a subscription (newordersubscription) 5- Add to basket from a suggestion (newordersuggestion) 6- Add to basket from an external source (z3950_search) 7- In one of the orders, check the uncertain price box 8- Check the basket display table (basket) 9- Click transfer on one of the orders (transferorder) 10- Go to the vendor page and click on 'Uncertain prices' (uncertainprice) 11- Click on 'Receive parcel' (parcel) 12- Go to the Acquisitions home page and click on the amount for 'ordered' (ordered) 13- Go to the Acquisitions home page and click on the amount for 'spent' (spent) Next, install a new language (fr-CA used as example) 1- translate create fr-CA 2- open fr-CA-messages.po and add a translation for Order (verb) and Order (noun) (it doesn't have to be real, just write something different for each) 3- translate install fr-CA 4- in the system preferences, enable the french language in 'language' 5- change interface language to french Redo the tests above to make sure the word you put in the translation for the verb is in the places where 'Order' should be a verb and that the translation you put in for the noun is in the places where 'Order' should be a noun Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-11-06 23:24:13 +00:00
<a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% order.ordernumber | uri %]" class="previewData">[% tp('noun', 'Order') | html %]</a><br>
<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber | uri %]" class="previewData">MARC</a><br>
<a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% order.biblionumber | uri %]" class="previewData">Card</a>
</td>
<td>[% order.replacementprice | $Price %]</td>
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
<td>[% order.quantityreceived | html %]</td>
<td>[% order.budget.budget_name | html %]</td>
<td>[% order.ecost | $Price %]</td>
<td>[% order.unitprice | $Price %]</td>
<td>[% order.total | $Price %]</td>
<td>
[% IF loop_receive.cannot_cancel or ( order.basket.effective_create_items == "receiving" and loop_receive.holds > 0 ) %]
[% IF loop_receive.cannot_cancel %]
[% span_title = BLOCK %]
<span>Cannot cancel receipt of this order line because it
was created from a partial receipt of order line no.
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
[% order.parent_ordernumber | html %], which is
already received. Try cancelling this one first and
retry.</span>
[% END %]
[% ELSE %]
[%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
[%# Some additional checks should be added in the pl file %]
[% span_title = BLOCK %]
<span>Cannot cancel receipt of this order line because at least one hold exists on the records.</span>
[% END %]
[% END %]
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
<span title="[% span_title | collapse | html %]">
Can't cancel receipt
</span>
[% ELSE %]
<a href="#" class="cancel_receipt" data-ordernumber="[% order.ordernumber | html %]">Cancel receipt</a>
[% END %]
</td>
2011-03-21 07:02:15 +00:00
</tr>
[% END %]
</tbody>
2011-03-21 07:02:15 +00:00
</table>
</form>
<form id="cancel_receipt" method="post" action="/cgi-bin/koha/acqui/parcel.pl">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="op" value="cud-cancelreceipt" />
<input type="hidden" name="ordernumber" id="cancel_ordernumber" value="" />
<input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
</form>
[% ELSE %]There are no received orders.[% END %]
2011-03-21 07:02:15 +00:00
</div>
<div class="modal" id="dataPreview" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="dataPreviewLabel">MARC previews</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
</div>
<div class="modal-footer">
<button class="btn btn-default" data-bs-dismiss="modal">Close</button>
</div>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div> <!-- /.modal -->
[% IF (invoiceclosedate) %]
<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | uri %]">View invoice</a>
[% ELSE %]
<form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
<input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Finish receiving" />
</fieldset>
</form>
[% END %]
[% END %]
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
2011-03-21 07:02:15 +00:00
[% INCLUDE 'acquisitions-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
Bug 13618: Add html filters to all the variables Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2015-01-23 12:18:54 +00:00
[% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
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>
2020-10-09 20:15:31 +00:00
<style>fieldset.action { margin-bottom: 20px }</style>
<script>
dt_overwrite_html_sorting_localeCompare();
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>
2020-10-09 20:15:31 +00:00
var PENDING_MULTI_SELECTION = _("Receive selected (%s)");
var columns_filter = {};
$(document).ready(function(){
$(".cancel_receipt").on( 'click', function(e){
e.preventDefault();
$('#cancel_ordernumber').val( $(this).data('ordernumber') );
$('#cancel_receipt').submit();
});
if ( $("#receivedt").length ) {
var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
"stateSave": true, // We do not have table settings on this table
"pageLength": 10,
"lengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
"columnDefs": [
{ "targets": [ 5, -1 ], "orderable": false, "searchable": false },
],
"columns": [
{ "type": "html" },
{ "type": "html" },
{ "type": "html" },
{ "type": "num-html" },
{ "type": "anti-the" },
null,
null,
null,
null,
null,
null,
null,
null
],
"pagingType": "full"
}));
}
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>
2020-10-09 20:15:31 +00:00
var options = {
"ajax": {
"url": '/api/v1/acquisitions/orders?only_active=1'
},
"embed": [
"basket.basket_group",
"biblio.uncancelled_orders+count",
"biblio.holds+count",
"biblio.items+count",
"biblio.suggestions.suggester",
"fund",
"current_item_level_holds+count",
"items"
],
"columns": [
{ "data": "basket.name",
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>
2020-10-09 20:15:31 +00:00
"searchable": true,
"orderable": true,
"render": function(data, type, row, meta) {
if (type != 'display') return escape_str(data);
return "<a href=\"/cgi-bin/koha/acqui/basket.pl?basketno=" + encodeURIComponent(row.basket.basket_id) + "\">" + escape_str(data) + " (" + escape_str(row.basket.basket_id) + ")</a>";
}
},
{ "data": "basket.basket_group.name",
"orderable": true,
"render": function(data, type, row, meta) {
if ( type != 'display' ) {
return escape_str(data);
}
if ( row.basket.basket_group_id == null ) {
return _("No basket group");
}
else {
return "<a href=\"/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid="
+ encodeURIComponent(row.basket.vendor_id) + "&amp;basketgroupid="
+ encodeURIComponent(row.basket.basket_group_id) + "\">"
+ escape_str(row.basket.basket_group.name) + " (" + escape_str(row.basket.basket_group_id) + ")</a>";
}
}
},
{
"data": "order_id",
"render": function(data, type, row, meta) {
if (type != 'display') return escape_str(data);
return "<a href=\"neworderempty.pl?ordernumber="+encodeURIComponent(data)+"&amp;booksellerid="+encodeURIComponent(row.basket.vendor_id)+"\">"+escape_str(data)+"</a>";
}
},
{
[% SET summary_fields = "biblio.title:biblio.author:biblio.isbn:biblio.publisher:me.internal_note:me.vendor_note" %]
[% IF Koha.Preference('marcflavour')=='UNIMARC' %][% SET summary_fields = summary_fields _ ":biblio.ean" %][% END %]
"data": "[% summary_fields | html %]",
"render": function(data, type, row, meta) {
var result = '';
if ( row && row.biblio_id != null ) {
result = "<p><a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber="+encodeURIComponent(row.biblio_id)+"\">"+escape_str(row.biblio.title)+"</a>";
if ( row.biblio.author != null )
result += _(" by ") + escape_str(row.biblio.author);
if ( row.biblio.isbn != null )
result += " &ndash; " + escape_str(row.biblio.isbn);
[% IF Koha.Preference('marcflavour')=='UNIMARC' %]
if ( row.biblio.ean != null )
result += " &ndash; EAN:" + escape_str(row.biblio.ean);
[% END %]
if ( row.biblio.publisher != null ) {
result += "<br/>" + _("Publisher: ") + escape_str(row.biblio.publisher);
if ( row.biblio.publication_year != null ) {
result += ", " + escape_str(row.biblio.publication_year);
}
else if ( row.biblio.copyright_date != null ) {
result += escape_str(row.biblio.copyright_date);
}
}
var suggestions = row.biblio.suggestions;
if ( suggestions != null && suggestions.length > 0 ) {
var suggestion = suggestions[0];
if ( suggestion.suggester != null ) {
var suggester = suggestion.suggester;
var suggested_by = [];
if ( suggester.surname != null ) {
suggested_by.push(escape_str(suggester.surname));
}
if ( suggester.firstname != null ) {
suggested_by.push(escape_str(suggester.firstname));
}
result += "<br/>" + _("Suggested by: ") +
'<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid='
+ encodeURIComponent(suggestion.suggestionid)
+ '&amp;op=show">'
+ suggested_by.join(", ")
+ " (#" + escape_str(suggestions[0].suggestionid) + ")</a>"; // FIXME: could be changed if we allow matching multiple suggestions
}
}
result += '</p>';
}
var internal_note = row.internal_note;
if ( internal_note != null && internal_note != '' ) {
result += '<p class="ordernote"><strong>'
+ _("Internal note: ")
+ '</strong>' + escape_str(internal_note)
+ ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
+ encodeURIComponent(row.order_id) + '&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
+ '&type=internal">' + _("Change internal note") + '</a>]</p>';
}
else {
result += ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
+ encodeURIComponent(row.order_id) + '&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
+ '&type=internal">' + _("Add internal note") + '</a>]';
}
var vendor_note = row.vendor_note;
if ( vendor_note != null && vendor_note != '' ) {
result += '<p class="ordernote"><strong>'
+ _("Vendor note: ")
+ '</strong>' + escape_str(vendor_note) + '</p>';
}
else {
result += ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
+ encodeURIComponent(row.order_id) + '&amp;referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
+ '&type=vendor">' + _("Add vendor note") + '</a>]';
}
return result;
},
"orderable": true,
},
{
"data": "",
"render": function(data, type, row, meta) {
var result = '<div class="btn-group dropup">';
result += '<button id="view' + row.order_id + '" type="button" class="btn btn-default btn-xs">' + _("View") + '</button>';
result += '<button type="button" class="btn btn-default btn-xs dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"><span class="visually-hidden">Toggle dropdown</span></button>';
result += '<ul class="dropdown-menu" aria-labelledby="view' + row.order_id + '">';
result += '<li><a class="dropdown-item previewData" href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '">[% tp("noun", "Order") | html %]</a></li>';
result += '<li><a class="dropdown-item previewData" href="/cgi-bin/koha/catalogue/showmarc.pl?id=' + encodeURIComponent(row.biblio_id) + '">' + _("MARC") + '</a></li>';
result += '<li><a class="dropdown-item previewData" href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=' + encodeURIComponent(row.biblio_id) + '">' + _("Card") + '</a></li>';
result += '</ul>';
result += '</div>';
return result;
},
"orderable": false,
"searchable": false
},
{
"data": "replacement_price",
"render": function(data, type, row, meta) {
return escape_price(row.replacement_price);
},
},
{
"data": "quantity",
"orderable": true
},
{
"data": "ecost",
"render": function(data, type, row, meta) {
return escape_price(row.ecost);
},
},
{
"data": "",
"render": function(data, type, row, meta) {
return escape_price(row.quantity * row.ecost);
},
"orderable": false, // FIXME: How can we do it in DBIC?
"searchable": false
},
{
"data": "fund.name",
"render": function(data, type, row, meta) {
if (type != 'display') return escape_str(data);
return escape_str(row.fund.name);
}
},
{
"data": "",
"render": function(data, type, row, meta) {
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>
2020-10-09 20:15:31 +00:00
return '<a href="orderreceive.pl?multiple_orders='
+ encodeURIComponent(row.order_id) + '&amp;invoiceid=[% invoiceid | uri %]' + '">'
+ _("Receive") + '</a><br/>'
+ '<a href="#" onclick="transfer_order_popup(' + escape_str(row.order_id) + '); return false;">'
+ _("Transfer") + '</a>';
},
"orderable": false,
"searchable": false
},
{
"data": "",
"render": function(data, type, row, meta) {
var result = "";
if ( row.current_holds_count > 0 ) {
result += '<span class="button" title="'
+ _("Can't cancel order, (%s) holds are linked with this order. Cancel holds first").format( escape_str(row.holds_count) ) + '">'
+ _("Can't cancel order") + '</span><br/>';
}
else {
result += '<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber='
+ encodeURIComponent(row.order_id)
+ '&biblionumber=' + encodeURIComponent(row.biblio_id)
+ '&referrer=/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | uri %]">'
+ _("Cancel order") + '</a><br/>';
}
if ( row.biblio != null ) {
if ( row.biblio.items_count - row.items.length > 0 ||
row.biblio.uncancelled_orders_count > 1 ||
row.biblio.subscriptions_count > 0 ||
row.biblio.holds_count > 0 ) { // biblio can be deleted
result += '<span class="button" title="'
+ _("Can't delete catalog record, see constraints below") + '">'
+ _("Can't cancel order and delete catalog record") + '</span><br>';
}
else {
result += '<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber='
+ encodeURIComponent(row.order_id) + '&biblionumber=' + encodeURIComponent(row.biblio_id)
+ '&del_biblio=1&referrer="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[$ invoiceid | uri ]">'
+ _("Cancel order and catalog record") + '</a><br/>';
}
if ( row.biblio.items_count - row.items.length > 0 ) {
result += '<strong title="'
+ _("Can't delete catalog record, because of %s existing item(s)").format(row.items.length)
+'">' + (row.biblio.items_count - row.items.length) + _(" item(s) left") + '</strong><br/>';
}
if ( row.biblio.uncancelled_orders_count > 1 ) {
result += '<strong title="'
+ _("Can't delete catalog record, delete other orders linked to it first") + '">'
+ (row.biblio.uncancelled_orders_count - 1) + _(" order(s) left") + '</strong><br/>';
}
if ( row.biblio.subscriptions_count > 0 ) {
result += '<strong title="' + _("Can't delete catalog record, delete subscriptions first") + '">'
+ _("%s subscription(s) left").format(row.biblio.subscriptions_count)
+ '</strong><br>';
}
if ( row.biblio.holds_count > 0 ) {
result += '<strong title="' + _("Can't delete catalog record or order, cancel holds first") + '">'
+ _("%s hold(s) left").format(row.biblio.holds_count) + '</strong>';
}
}
return result;
},
"orderable": false,
"searchable": false
}
]
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>
2020-10-09 20:15:31 +00:00
};
var selected_rows = {};
$('#select_multiple').click(function () {
var ids = Object.keys(selected_rows);
if (!ids.length) return;
location.href = 'orderreceive.pl?multiple_orders=' + ids.join(',') + '&invoiceid=[% invoiceid | uri %]';
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>
2020-10-09 20:15:31 +00:00
}).html(PENDING_MULTI_SELECTION.format('0'))
options.order = [[1, 'asc']];
options.columns.unshift({
"data": function (row, type, val, meta) {
return '<input type="checkbox" class="selOrder" />';
},
"searchable": false,
"orderable": false
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>
2020-10-09 20:15:31 +00:00
});
let table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'parcel', 'pending_orders', 'json' ) | $raw %];
var pending_orders_table = $("#pending_orders").kohaTable(options, table_settings, 1, { "basket.vendor_id": [% booksellerid | html %] });
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>
2020-10-09 20:15:31 +00:00
var api = pending_orders_table.api();
api.on('draw', function () {
api.rows().every(function () {
var row = this;
var data = row.data();
$('.selOrder', row.node()).on('click', function (event) {
if ($(this).prop('checked')) {
selected_rows[data.order_id] = data;
} else {
delete selected_rows[data.order_id];
}
$('#select_multiple').html(PENDING_MULTI_SELECTION.format(Object.keys(selected_rows).length));
});
if (selected_rows[data.order_id]) {
$('.selOrder', row.node()).prop('checked', true);
}
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>
2020-10-09 20:15:31 +00:00
});
});
$("#dataPreview").on("hidden.bs.modal", function(){
$("#dataPreviewLabel").html("");
$("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
});
$("body").on("click", ".previewData", function(e){
e.preventDefault();
var ltitle = $(this).text();
var page = $(this).attr("href");
$("#dataPreviewLabel").text(ltitle);
$("#dataPreview .modal-body").load(page + " div");
$('#dataPreview').modal("show");
});
});
// Case-insensitive version of jquery's contains function
jQuery.extend(jQuery.expr[':'], {
icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
});
// Contains exactly function
jQuery.extend(jQuery.expr[':'], {
containsExactly: "$(a).text() == m[3]"
});
function transfer_order_popup(ordernumber) {
var url = "/cgi-bin/koha/acqui/transferorder.pl?"
+ "ordernumber=" + ordernumber
window.open(url, 'TransferOrder');
}
</script>
[% END %]
2011-03-21 07:02:15 +00:00
[% INCLUDE 'intranet-bottom.inc' %]