});
my $invoiceid = $input->param('invoiceid');
+my $invoice;
+$invoice = GetInvoiceDetails($invoiceid) if $invoiceid;
+
+unless( $invoiceid and $invoice->{invoiceid} ) {
+ $template->param(
+ error_invoice_not_known => 1,
+ no_orders_to_display => 1
+ );
+ output_html_with_http_headers $input, $cookie, $template->output;
+ exit;
+}
+
my $op = $input->param('op') // '';
if ($op eq 'cancelreceipt') {
}
}
-my $invoice = GetInvoiceDetails($invoiceid);
my $booksellerid = $invoice->{booksellerid};
my $bookseller = GetBookSellerFromId($booksellerid);
my $gst = $bookseller->{gstrate} // C4::Context->preference("gist") // 0;
my $datereceived = C4::Dates->new();
-my $code = $input->param('code');
-my @rcv_err = $input->param('error');
-my @rcv_err_barcode = $input->param('error_bc');
-
-
-
-# If receiving error, report the error (coming from finishrecieve.pl(sic)).
-if( scalar(@rcv_err) ) {
- my $cnt=0;
- my $error_loop;
- for my $err (@rcv_err) {
- push @$error_loop, { "error_$err" => 1 , barcode => $rcv_err_barcode[$cnt] };
- $cnt++;
- }
- $template->param( receive_error => 1 ,
- error_loop => $error_loop,
- );
-}
my $cfstr = "%.2f"; # currency format string -- could get this from currency table.
my @parcelitems = @{ $invoice->{orders} };
dt_overwrite_html_sorting_localeCompare();
$(document).ready(function(){
+ if ( $("#pendingt").length ) {
var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
"bStateSave": true,
"iCookieDuration": 60*60*24*1000, // 1000 days
],
"sPaginationType": "four_button"
} ) );
+ }
+ if ( $("#receivedt").length ) {
var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
"bStateSave": true,
"iCookieDuration": 60*60*24*1000, // 1000 days
],
"sPaginationType": "four_button"
} ) );
-/*
- $("#pendingt").tablesorter({
- headers: { 2: { sorter: 'articles' },3: { sorter: false },8:{sorter:false}}
- });
-*/
+ }
});
[% END %]
[% IF (error_cancelling_receipt) %]
- <div class="error">
+ <div class="dialog error">
Cannot cancel receipt. Possible reasons :
<ul>
<li>
</div>
[% END %]
+ [% IF error_invoice_not_known %]
+ <div class="dialog error">
+ The invoice referenced by this invoiceid does not exist.
+ </div>
+ [% END %]
+
+[% UNLESS no_orders_to_display %]
<div id="acqui_receive_summary">
<p><strong>Invoice number:</strong> [% invoice %] <strong>Received by:</strong> [% loggedinusername %] <strong>On:</strong> [% formatteddatereceived %]</p>
</div>
[% END %]
<br />
[% IF ( loop_order.notes ) %]
- <p class="ordernote"><strong>Note: </strong>[% loop_order.notes|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Fbooksellerid=[% loop_order.booksellerid %]&datereceived=[% loop_order.invoicedatereceived %]&invoice=[% loop_order.invoice %]">Change note</a>]</p>
+ <p class="ordernote"><strong>Note: </strong>[% loop_order.notes|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Change note</a>]</p>
[% ELSE %]
- [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Fbooksellerid=[% loop_order.booksellerid %]&datereceived=[% loop_order.invoicedatereceived %]&invoice=[% loop_order.invoice %]">Add note</a>]
+ [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Add note</a>]
[% END %]
</td>
<td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
[% ELSE %]There are no received orders.[% END %]
</div>
-<!--<form action="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]" method="post">-->
[% IF (invoiceclosedate) %]
<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">View invoice</a>
[% ELSE %]
</form>
[% END %]
+[% END %]
+
</div>
</div>
+
+
<div class="yui-b">
<form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
<fieldset class="brief">