From 52e1a15e5ada589f211f5a95ab46c799fe24738d Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Tue, 1 Jan 2008 18:39:47 -0600 Subject: [PATCH] Specify datereceived when receiving a new parcel. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Acquisition.pm | 2 +- acqui/finishreceive.pl | 1 + acqui/parcel.pl | 4 +++- acqui/parcels.pl | 3 ++- .../prog/en/modules/acqui/parcels.tmpl | 22 +++++++++++++++---- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index b4b2655ad1..26c2578098 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -865,7 +865,7 @@ sub GetParcel { } $strsth .= " ORDER BY aqbasket.basketno"; ### parcelinformation : $strsth - warn "STH : $strsth"; + # warn "STH : $strsth"; my $sth = $dbh->prepare($strsth); $sth->execute($supplierid); while ( my $data = $sth->fetchrow_hashref ) { diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index bba6e51e0c..e39f77945c 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -22,6 +22,7 @@ # Suite 330, Boston, MA 02111-1307 USA use strict; +use C4::Context; use C4::Output; use C4::Acquisition; use C4::Biblio; diff --git a/acqui/parcel.pl b/acqui/parcel.pl index e92814310a..fb95c55e64 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -72,7 +72,9 @@ my $count = scalar @booksellers; my $invoice=$input->param('invoice') || ''; my $freight=$input->param('freight'); my $gst=$input->param('gst'); -my $datereceived=C4::Dates->new($input->param('datereceived'),'iso') || C4::Dates->new(); +my $datereceived = ($input->param('op') eq 'new') ? C4::Dates->new($input->param('datereceived')) + : C4::Dates->new($input->param('datereceived'), 'iso') ; +$datereceived = C4::Dates->new() unless $datereceived; my $code=$input->param('code'); my ($template, $loggedinuser, $cookie) diff --git a/acqui/parcels.pl b/acqui/parcels.pl index a137bc818b..213ba23f37 100755 --- a/acqui/parcels.pl +++ b/acqui/parcels.pl @@ -160,7 +160,8 @@ $template->param(searchresults=>\@loopres, count=>$count) if ($count); $template->param(orderby=>$order, filter=>$code, datefrom=>$datefrom,dateto=>$dateto, resultsperpage=>$resultsperpage); $template->param( name => $booksellers[0]->{'name'}, - supplierid => $supplierid, + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + supplierid => $supplierid, GST => C4::Context->preference("gist"), ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl index f7d8e36676..7da22f868b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl @@ -1,6 +1,7 @@ Koha › Acquisitions › Receive parcel from supplier <!-- TMPL_VAR NAME="name" --> + @@ -102,11 +103,12 @@
- Receive a new Parcel + Receive a new parcel
  1. - + " /> - + +
  2. @@ -117,7 +119,19 @@
  3. -
+ +
  • + " /> + /lib/calendar/cal.gif" id="datereceived_button" alt="Show Calendar" /> +
  • +
    ">Cancel
    -- 2.39.5