Bug 5339: ergonomic changes

- "Finish receive" on parcel.pl now redirect to acqui/invoice.pl,
  allowing the librarian to modify invoice informations (freight,
  billing date, ...) and close invoice.
- The librarian can now close (or reopen) the invoice and modify invoice
  informations in 1 operation (instead of 2)

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Julian Maurice 2012-09-19 14:08:28 +02:00 committed by Paul Poulain
parent 766e2b0106
commit 8cf9f78702
3 changed files with 45 additions and 39 deletions

View File

@ -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 );
}

View File

@ -42,46 +42,48 @@
<p>Supplier: [% suppliername %]</p>
<form action="" method="post">
<label for="shipmentdate">Shipment date:</label>
<input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" readonly="readonly" class="datepicker" />
<p></p>
<label for="billingdate">Billing date:</label>
<input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" readonly="readonly" class="datepicker" />
<p></p>
<label for="shipmentcost">Shipment cost:</label>
<input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" />
<label for="shipment_budget_id">Budget:</label>
<select id="shipment_budget_id" name="shipment_budget_id">
<option value="">No budget</option>
[% FOREACH budget IN budgets_loop %]
[% IF ( budget.selected ) %]
<option selected="selected" value="[% budget.budget_id %]">
[% ELSE %]
<option value="[% budget.budget_id %]">
<fieldset>
<label for="shipmentdate">Shipment date:</label>
<input type="text" size="10" id="shipmentdate" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" readonly="readonly" class="datepicker" />
<p></p>
<label for="billingdate">Billing date:</label>
<input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" readonly="readonly" class="datepicker" />
<p></p>
<label for="shipmentcost">Shipment cost:</label>
<input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost %]" />
<label for="shipment_budget_id">Budget:</label>
<select id="shipment_budget_id" name="shipment_budget_id">
<option value="">No budget</option>
[% FOREACH budget IN budgets_loop %]
[% IF ( budget.selected ) %]
<option selected="selected" value="[% budget.budget_id %]">
[% ELSE %]
<option value="[% budget.budget_id %]">
[% END %]
[% budget.budget_name %]
</option>
[% END %]
[% budget.budget_name %]
</option>
</select>
<p></p>
<label>Status:</label>
[% IF ( invoiceclosedate ) %]
Closed on [% invoiceclosedate | $KohaDates %].
<p></p>
<input type="checkbox" name="reopen" id="reopen" />
<label for="reopen">Reopen</label>
[% ELSE %]
Open.
<p></p>
<input type="checkbox" name="close" id="close" />
<label for="close">Close</label>
[% END %]
</select>
<input type="hidden" name="op" value="mod" />
<input type="hidden" name="invoiceid" value="[% invoiceid %]" />
<fieldset class="action">
<input type="submit" value="Save">
<input type="hidden" name="op" value="mod" />
<input type="hidden" name="invoiceid" value="[% invoiceid %]" />
<fieldset class="action">
<input type="submit" value="Save">
</fieldset>
</fieldset>
</form>
<p>Status:
[% IF ( invoiceclosedate ) %]
Closed on [% invoiceclosedate | $KohaDates %].
<a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid %]">
Reopen
</a>
[% ELSE %]
Open.
<a href="/cgi-bin/koha/acqui/invoice.pl?op=close&invoiceid=[% invoiceid %]">
Close
</a>
[% END %]
</p>
<p>
<a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Go to receipt page</a>
</p>

View File

@ -192,7 +192,6 @@
<div id="acqui_receive_summary">
<p><strong>Invoice number:</strong> [% invoice %] <strong>Received by:</strong> [% loggedinusername %] <strong>On:</strong> [% formatteddatereceived %]</p>
<p><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">Go to invoice details</a></p>
</div>
[% UNLESS (invoiceclosedate) %]
<div id="acqui_receive_search">
@ -405,8 +404,8 @@
</div>
<!--<form action="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]" method="post">-->
<form action="parcels.pl?booksellerid=[% booksellerid %]" method="post">
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
<input type="hidden" name="invoiceid" value="[% invoiceid %]" />
<fieldset class="action">
<input type="submit" value="Finish receiving" />
</fieldset>