}
$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 ) {
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)
$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"),
);
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha › Acquisitions › Receive parcel from supplier <!-- TMPL_VAR NAME="name" --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="calendar.inc" -->
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<div id="parcels_new_parcel">
<form method="get" action="parcel.pl">
<fieldset class="rows">
- <legend>Receive a new Parcel</legend>
+ <legend>Receive a new parcel</legend>
<ol> <li>
- <label for="invoice">Supplier Invoice / Parcel Code</label>
+ <label for="invoice">Supplier Invoice </label>
<input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->" />
- <input type="text" size="20" id="invoice" name="invoice" />
+ <input type="hidden" name="op" value="new" />
+ <input type="text" size="20" id="invoice" name="invoice" />
</li>
<!-- TMPL_IF NAME="gst" -->
<li>
<li>
<label for="freight">Freight:</label>
<input type="text" size="20" id="freight" name="freight" />
- </li></ol>
+ </li>
+ <li><label for="datereceived">Shipment date: </label>
+ <input type="text" id="datereceived" name="datereceived" maxlength="10" size="10" value="<!-- TMPL_VAR NAME="datereceived" -->" />
+ <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="datereceived_button" alt="Show Calendar" />
+ <script language="JavaScript" type="text/javascript">
+ Calendar.setup(
+ {
+ inputField : "datereceived",
+ ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
+ button : "datereceived_button" }
+ );
+ </script> </li>
+ </ol>
</fieldset>
<fieldset class="action"><input type="submit" class="button" value="Save" /> <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->">Cancel</a></fieldset>
</form>