[Koha-cvs] koha acqui/newbiblio.pl koha-tmpl/intranet-tmpl... [rel_2_2]

Henri-Damien LAURENT laurenthdl at alinto.com
Wed Dec 14 11:59:24 CET 2005


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	Henri-Damien LAURENT <hdl at savannah.gnu.org>	05/12/14 10:59:24

Modified files:
	acqui          : newbiblio.pl 
	koha-tmpl/intranet-tmpl/default/en/acqui: basket.tmpl 
	                                          newbiblio.tmpl 

Log message:
	ppl can "cancel" (remove) a command line after a basket is closed.
	ppl can now edit command notes after a basket is closed.
	I added a "close" parameter to newbiblio in order to protect qty and price data from a modification after a basket is closed.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/newbiblio.pl.diff?only_with_tag=rel_2_2&tr1=1.21.2.2&tr2=1.21.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl.diff?only_with_tag=rel_2_2&tr1=1.15.2.10&tr2=1.15.2.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl.diff?only_with_tag=rel_2_2&tr1=1.15.2.4&tr2=1.15.2.5&r1=text&r2=text

Patches:
Index: koha/acqui/newbiblio.pl
diff -u koha/acqui/newbiblio.pl:1.21.2.2 koha/acqui/newbiblio.pl:1.21.2.3
--- koha/acqui/newbiblio.pl:1.21.2.2	Fri Aug 26 12:21:49 2005
+++ koha/acqui/newbiblio.pl	Wed Dec 14 10:59:24 2005
@@ -44,6 +44,7 @@
 my $biblio=$input->param('biblio');
 my $basketno=$input->param('basketno');
 my $suggestionid = $input->param('suggestionid');
+my $close= $input->param('close');
 my $data;
 my $new;
 my $dbh = C4::Context->dbh;
@@ -139,6 +140,12 @@
 			-labels   => \%select_bookfunds,
 			-size     => 1,
 			-multiple => 0 );
+my $bookfundname;
+my $bookfundid;
+if ($close){
+	$bookfundid=$data->{'bookfundid'};
+	$bookfundname= $select_bookfunds{$bookfundid};
+}
 
 #Build sort lists
 my $CGIsort1 = buildCGIsort("Asort1","sort1",$data->{'sort1'});
@@ -156,6 +163,9 @@
 }
 
 # fill template
+$template->param( close=> $close, bookfundid=>$bookfundid, bookfundname=>$bookfundname) if ($close);
+
+
 $template->param( existing => $biblio,
 						title => $title,
 						ordnum => $ordnum,
@@ -169,8 +179,8 @@
 						listincgst => $booksellers[0]->{'listincgst'},
 						listprice => $booksellers[0]->{'listprice'},
 						gstreg => $booksellers[0]->{'gstreg'},
-						invoiceinc => $booksellers[0]->{'invoiceincgst'},                              
-						invoicedisc => $booksellers[0]->{'invoicedisc'},                               
+						invoiceinc => $booksellers[0]->{'invoiceincgst'},
+						invoicedisc => $booksellers[0]->{'invoicedisc'},
 						nocalc => $booksellers[0]->{'nocalc'},
 						name => $booksellers[0]->{'name'},
 						currency => $booksellers[0]->{'listprice'},
Index: koha/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl
diff -u koha/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl:1.15.2.10 koha/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl:1.15.2.11
--- koha/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl:1.15.2.10	Mon Dec  5 10:46:24 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl	Wed Dec 14 10:59:24 2005
@@ -38,9 +38,8 @@
 				<th class="acquisition">Total</th>
 				<th class="acquisition doNotPrint">Fund <a href="basket.pl?basket=<!-- TMPL_VAR name="basketno" -->&order=aqorderbreakdown.bookfundid,biblioitems.publishercode">[order]</a></th>
 				<!-- TMPL_IF name="active" -->
-					<!-- TMPL_UNLESS name="closedate" -->
-						<th class="acquisition doNotPrint">Remove</th>
-					<!-- /TMPL_UNLESS -->
+				<th class="acquisition doNotPrint">Remove</th>
+				<th class="acquisition doNotPrint">Edit</th>
 				<!-- /TMPL_IF -->
 			</tr>
 			<!-- TMPL_LOOP NAME="books_loop" -->
@@ -72,13 +71,16 @@
 					<td class="number"><p><!-- TMPL_VAR NAME="line_total" --></p></td>
 					<td class="doNotPrint"><p><!-- TMPL_VAR NAME="bookfundid" --></p></td>
 					<!-- TMPL_IF name="active" -->
-						<!-- TMPL_UNLESS name="closedate" -->
-							<td class="doNotPrint">
-								<a href="addorder.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->&quantity=0&biblio=<!-- TMPL_VAR NAME="biblionumber" -->">
-									<img src="/intranet-tmpl/default/images/edittrash.png" alt="Remove from basket" title="Remove from basket" width="32" hspace="0" vspace="0" border="0">
-								</a>
-							</td>
-						<!-- /TMPL_UNLESS -->
+						<td class="doNotPrint">
+							<a href="addorder.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->&quantity=0&biblio=<!-- TMPL_VAR NAME="biblionumber" -->">
+								<img src="/intranet-tmpl/default/images/edittrash.png" alt="Remove from basket" title="Remove from basket" width="32" hspace="0" vspace="0" border="0">
+							</a>
+						</td>
+						<td class="doNotPrint">
+							<a href="newbiblio.pl?sub=&booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->&biblio=<!-- TMPL_VAR NAME="biblionumber" -->&ordnum=<!-- TMPL_VAR NAME="ordernumber" --><!--TMPL_IF name="closedate"-->&close=1<!--/TMPL_IF -->">
+								<img src="/intranet-tmpl/default/images/fileopen.png" alt="Edit" title="Remove from basket" width="32" hspace="0" vspace="0" border="0">
+							</a>
+						</td>
 					<!-- /TMPL_IF -->
 				</tr>
 			<!-- /TMPL_LOOP -->
Index: koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl
diff -u koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl:1.15.2.4 koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl:1.15.2.5
--- koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl:1.15.2.4	Fri Sep 23 09:48:31 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl	Wed Dec 14 10:59:24 2005
@@ -158,35 +158,51 @@
 		<h2 class="acquisition">Accounting details</h2>
 		<p>
 			<label class="label100">Quantity</label>
-			<input type="text" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" onchange="update(this.form);">
+			<!-- TMPL_IF name="close" -->
+				<input type="hidden" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->"><!-- TMPL_VAR NAME="quantity" -->
+			<!-- TMPL_ELSE -->
+				<input type="text" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" onchange="update(this.form);">
+		  	<!--/TMPL_IF-->
 		</p>
 		<p>
 			<label class="label100">Bookfund</label>
-			<!-- TMPL_VAR NAME="CGIbookfund" -->
+			<!-- TMPL_IF name="close" -->
+				<input type="hidden" size="20" name="bookfund" value="<!-- TMPL_VAR NAME="bookfundid" -->"><!-- TMPL_VAR NAME="bookfundname" -->
+			<!-- TMPL_ELSE -->
+				<!-- TMPL_VAR NAME="CGIbookfund" -->
+		  	<!--/TMPL_IF-->
 		</p>
 		<p>
 			<label class="label100">Suppliers List Price</label>
-			<input type="text" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="update(this.form)">
+			<!-- TMPL_IF name="close" -->
+				<input type="hidden" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->"><!-- TMPL_VAR NAME="listprice" -->
+			<!-- TMPL_ELSE -->
+				<input type="text" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="update(this.form)">
+		  	<!--/TMPL_IF-->
 		</p>
 		<p>
 			<label class="label100">Replacement Cost </label>
-			<input type="text" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->">
+			<!-- TMPL_IF name="close" -->
+				<input type="hidden" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->"><!-- TMPL_VAR NAME="rrp" -->
+			<!-- TMPL_ELSE -->
+				<input type="text" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->">
+		  	<!--/TMPL_IF-->
 		</p>
 		<p>
 			<label class="label100">Budgeted Cost</label>
-			<input type="text" size="20" name="ecost" value="<!-- TMPL_VAR NAME="ecost" -->">
+			<input type="text" size="20" name="ecost" value="<!-- TMPL_VAR NAME="ecost" -->"<!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF-->>
 		</p>
 		<p>
 			<label class="label100">Budgeted GST</label>
-			<input type="text" size="20" name="GST" value="">
+			<input type="text" size="20" name="GST" value="" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF-->>
 		</p>
 		<p>
 			<label class="label100"><b>BUDGETED TOTAL</b></label>
-			<input type="text" size="20" name="total" value="">
+			<input type="text" size="20" name="total" value="" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF-->>
 		</p>
 		<p>
 			<label class="label100">Actual Cost</label>
-			<input type="text" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->">
+			<input type="text" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF-->>
 		</p>
 		<p>
 			<label class="label100">Invoice Number *</label>





More information about the Koha-cvs mailing list