1- don't loose bookseller id when closing a basket
authortipaul <tipaul>
Fri, 17 Sep 2004 12:32:29 +0000 (12:32 +0000)
committertipaul <tipaul>
Fri, 17 Sep 2004 12:32:29 +0000 (12:32 +0000)
2- add possibility to view a closed basket (but not modify it)

acqui/basket.pl
koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl
koha-tmpl/intranet-tmpl/default/en/acqui/order.tmpl

index bce4d50..37d1a16 100755 (executable)
@@ -99,11 +99,11 @@ for (my $i=0;$i<$count;$i++){
 my $prefgist =C4::Context->preference("gist");
 $gist=sprintf("%.2f",$sub_total*$prefgist);
 $grand_total=$sub_total+$gist;
-
 $template->param(basketno => $basketno,
                                creationdate => $basket->{creationdate},
                                authorisedby => $basket->{authorisedby},
                                authorisedbyname => $basket->{authorisedbyname},
+                               closedate => format_date($basket->{closedate}),
                                booksellerid=> $booksellers[0]->{'id'},
                                name => $booksellers[0]->{'name'},
                                entrydate => format_date($results[0]->{'entrydate'}),
index 99c6dbe..2f69011 100644 (file)
@@ -2,15 +2,21 @@
 
 <div id="mainbloc">
        <h1 class="acquisition"><!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->shopping Basket <b><!-- TMPL_VAR NAME="basketno" --> </b>for <a href="supplier.pl?id=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="name" --></a></h1><br />
-       <div id="bloc25">
-               <h2 class="acquisition">Basket info</h2>
+       <!-- TMPL_UNLESS name="closedate" -->
+               <div id="bloc25">
+                       <h2 class="acquisition">Basket info</h2>
                        <p><label class="label100">Basket number<label> <!-- TMPL_VAR NAME="basketno" --></p>
                        <p><label class="label100">Managed by<label><!-- TMPL_VAR NAME="authorisedbyname" --></p>
                        <p><label class="label100">open on<label> <!-- TMPL_VAR NAME="creationdate" --></p>
                        <p><label class="label100">for<label> <!-- TMPL_VAR NAME="booksellerid" --></p>
                        <p><label class="label100">Invoice number </label><!-- TMPL_VAR NAME="booksellerinvoicenumber" --></p>
-                       <a href="/cgi-bin/koha/acqui/order.pl?op=close&amp;basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">Close</a>
-       </div>
+                       <!-- TMPL_IF name="closedate" -->
+                               Closed on <!-- TMPL_VAR name="closedate" -->
+                       <!-- TMPL_ELSE -->
+                               <a href="/cgi-bin/koha/acqui/order.pl?op=close&amp;basket=<!-- TMPL_VAR NAME="basketno" -->&supplier=<!-- TMPL_VAR name="booksellerid" -->" class="button acquisition">Close</a>
+                       <!-- /TMPL_IF -->
+               </div>
+       <!-- /TMPL_UNLESS -->
        <div id="bloc100">
        <h2 class="acquisition">Order</h2>
        <!-- TMPL_IF name="books_loop" -->
@@ -61,6 +67,7 @@
                <p>Basket empty</p>
        <!-- /TMPL_IF -->
        </div>
+       <!-- TMPL_UNLESS name="closedate" -->
        <div id="bloc25">
                <h2 class="acquisition">Add order line</h2>
                <form action="/cgi-bin/koha/acqui/newbasket2.pl" method="post">
@@ -77,5 +84,6 @@
                        </p>
                </form>
        </div>
+       <!-- /TMPL_UNLESS -->
 </div>
 <!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->
index d867d56..45b4603 100644 (file)
@@ -44,6 +44,7 @@
                                                        <td>
                                                                <!-- TMPL_IF name="closedate" -->
                                                                        closed on <!-- TMPL_VAR NAME="closedate" -->
+                                                                       <a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
                                                                <!-- TMPL_ELSE -->
                                                                        <a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">modify</a>
                                                                <!-- /TMPL_IF -->