Merge branch 'bug_9824' into 3.14-master
[koha.git] / acqui / invoice.pl
index 1dc97ee..1b6d97c 100755 (executable)
@@ -79,6 +79,11 @@ elsif ( $op && $op eq 'mod' ) {
         shipmentcost          => $shipmentcost,
         shipmentcost_budgetid => $shipment_budget_id
     );
+    if ($input->param('reopen')) {
+        ReopenInvoice($invoiceid);
+    } elsif ($input->param('close')) {
+        CloseInvoice($invoiceid);
+    }
     $template->param( modified => 1 );
 }
 
@@ -180,7 +185,7 @@ $template->param(
     invoiceid        => $details->{'invoiceid'},
     invoicenumber    => $details->{'invoicenumber'},
     suppliername     => $details->{'suppliername'},
-    supplierid       => $details->{'booksellerid'},
+    booksellerid       => $details->{'booksellerid'},
     datereceived     => $details->{'datereceived'},
     shipmentdate     => $details->{'shipmentdate'},
     billingdate      => $details->{'billingdate'},
@@ -190,7 +195,6 @@ $template->param(
     total_quantity   => $total_quantity,
     invoiceincgst    => $bookseller->{invoiceincgst},
     currency         => $bookseller->{listprice},
-    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
     budgets_loop             => \@budgets_loop,
 );