@@ -, +, @@ receiving an order - A new syspref: AcqItemSetDateAccessionedsWhenReceived - A new column on the receive page when items are created on ordering, with a checkbox for choosing if they want the date updated - The checkbox default value honours the global syspref. --- acqui/finishreceive.pl | 5 ++++- .../prog/en/modules/acqui/orderreceive.tt | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) --- a/acqui/finishreceive.pl +++ a/acqui/finishreceive.pl @@ -79,7 +79,8 @@ my $basket = $order_obj->basket; if ($quantityrec > $origquantityrec ) { my @received_items = (); if ($basket->effective_create_items eq 'ordering') { - @received_items = $input->param('items_to_receive'); + @received_items = $input->multi_param('items_to_receive'); + my @items_to_update_dateaccessioned = $input->multi_param('items_to_update_dateaccessioned'); my @affects = split q{\|}, C4::Context->preference("AcqItemSetSubfieldsWhenReceived"); if ( @affects ) { my $frameworkcode = GetFrameworkCode($biblionumber); @@ -93,6 +94,8 @@ if ($quantityrec > $origquantityrec ) { } } C4::Items::ModItemFromMarc( $item, $biblionumber, $in ); + Koha::Items->find($in)->set({ dateaccessioned => \'NOW()' })->store + if any { $in eq $_ } @items_to_update_dateaccessioned; } } } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -193,6 +193,7 @@ Receive? + Update cataloguing date   Barcode Home library @@ -212,7 +213,14 @@ [% FOREACH item IN order.items %] - + + + [% IF Koha.Preference('AcqItemSetDateAccessionedsWhenReceived') == 1 %] + + [% ELSE %] + + [% END %] + Edit [% item.barcode | html %] [% Branches.GetName( item.homebranch ) | html %] @@ -541,6 +549,11 @@ $("#other_reason").hide(); }); + $('.items_to_receive').change(function() { + var val = $(this).val(); + + $('#item_update_date_'+val).prop('disabled', !$(this).prop('checked')); + }); }); [% END %] --