Bug 4833: Show acq information when selecting suggestion for order
When adding an order line to a basket using the 'from a suggestion' feature, the list of accepted suggestions doesn't show any information from the acquisition are of the suggestions. This patch adds new columns to the list for: - library - fund - price - quantity - total To test: - Create several suggestions with - Empty acq values - A specific library, any library - Set acq values (fund, price, quantity) - Accept your suggestions - Create a new basket/order - Add an order line from accepted suggestions - Verify the list displays nicely with the new columns - Verify filters etc. still work ok Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
71018d4cca
commit
3d3944cba3
|
|
@ -95,6 +95,7 @@ use C4::Auth; # get_template_and_user
|
|||
use C4::Output;
|
||||
use C4::Suggestions;
|
||||
use C4::Biblio;
|
||||
use C4::Budgets;
|
||||
|
||||
use Koha::Acquisition::Booksellers;
|
||||
|
||||
|
|
@ -136,6 +137,14 @@ my $suggestions_loop = SearchSuggestion(
|
|||
STATUS => 'ACCEPTED'
|
||||
}
|
||||
);
|
||||
|
||||
foreach my $suggestion (@$suggestions_loop) {
|
||||
if ($suggestion->{budgetid}){
|
||||
my $bud = GetBudget( $suggestion->{budgetid} );
|
||||
$suggestion->{budget_name} = $bud->{budget_name} if $bud;
|
||||
}
|
||||
}
|
||||
|
||||
my $vendor = Koha::Acquisition::Booksellers->find( $booksellerid );
|
||||
$template->param(
|
||||
suggestions_loop => $suggestions_loop,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
[% USE raw %]
|
||||
[% USE Branches %]
|
||||
[% USE Price %]
|
||||
[% USE Asset %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
|
|
@ -27,6 +29,11 @@
|
|||
<th>Suggestion</th>
|
||||
<th>Suggested by</th>
|
||||
<th>Accepted by</th>
|
||||
<th>Library</th>
|
||||
<th>Fund</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th>Total</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -52,6 +59,23 @@
|
|||
<td>
|
||||
[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby | html %]
|
||||
</td>
|
||||
<td>
|
||||
[% Branches.GetName(suggestions_loo.branchcode) | html %]
|
||||
</td>
|
||||
<td>
|
||||
[% suggestions_loo.budget_name | html %]
|
||||
</td>
|
||||
<td>
|
||||
[% suggestions_loo.price | $Price %]
|
||||
</td>
|
||||
<td>
|
||||
[% IF (suggestions_loo.quantity > 0) %]
|
||||
[% suggestions_loo.quantity | html %]
|
||||
[% END %]
|
||||
</td>
|
||||
<td>
|
||||
[% suggestions_loo.total | $Price %]
|
||||
</td>
|
||||
<td class="actions">
|
||||
[% IF ( suggestions_loo.biblionumber ) %]
|
||||
<a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&suggestionid=[% suggestions_loo.suggestionid | uri %]&biblio=[% suggestions_loo.biblionumber | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue