koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha acqui/supplier.pl koha-tmpl/intranet-tmpl/... [rel_2_2]
Date: Mon, 20 Feb 2006 14:58:13 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Henri-Damien LAURENT <address@hidden>   06/02/20 14:58:13

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

Log message:
        Adding a new way to display supplier information: When providing 
op=display to supplier.pl, supplier information will be displayed and no 
modifications can be directly done on that.
        Adding three buttons on that page : Receive, Manage orders, edit 
information

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/supplier.pl.diff?only_with_tag=rel_2_2&tr1=1.9.2.3&tr2=1.9.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl.diff?only_with_tag=rel_2_2&tr1=1.12.2.1&tr2=1.12.2.2&r1=text&r2=text

Patches:
Index: koha/acqui/supplier.pl
diff -u koha/acqui/supplier.pl:1.9.2.3 koha/acqui/supplier.pl:1.9.2.4
--- koha/acqui/supplier.pl:1.9.2.3      Sun Feb  5 21:59:21 2006
+++ koha/acqui/supplier.pl      Mon Feb 20 14:58:13 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: supplier.pl,v 1.9.2.3 2006/02/05 21:59:21 kados Exp $
+# $Id: supplier.pl,v 1.9.2.4 2006/02/20 14:58:13 hdl Exp $
 
 #script to show display basket of orders
 #written by address@hidden 24/2/2000
@@ -35,6 +35,8 @@
 
 my $query=new CGI;
 my $id=$query->param('supplierid');
+my $op=$query->param('op');
+
 my ($count,@booksellers)=bookseller($id);
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/supplier.tmpl",
@@ -45,22 +47,8 @@
                             debug => 1,
                             });
 #build array for currencies
-my  ($count, $currencies) = &getcurrencies();
-my @loop_pricescurrency;
-my @loop_invoicecurrency;
-for (my $i=0;$i<$count;$i++) {
-       if ($booksellers[0]->{'listprice'} eq $currencies->[$i]->{'currency'}) {
-               push @loop_pricescurrency, { currency => "<option selected 
value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"
 };
-       } else {
-               push @loop_pricescurrency, { currency => "<option 
value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
-       }
-       if ($booksellers[0]->{'invoiceprice'} eq 
$currencies->[$i]->{'currency'}) {
-               push @loop_invoicecurrency, { currency => "<option selected 
value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
-       } else {
-               push @loop_invoicecurrency, { currency => "<option 
value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
-       }
-}
-$template->param(id => $id,
+if ($op eq "display"){
+       $template->param(id => $id,
                                        name => $booksellers[0]->{'name'},
                                        postal =>$booksellers[0]->{'postal'},
                                        address1 => 
$booksellers[0]->{'address1'},
@@ -83,11 +71,57 @@
                                        listincgst => 
$booksellers[0]->{'listincgst'},
                                        invoiceincgst => 
$booksellers[0]->{'invoiceincgst'},
                                        discount => 
$booksellers[0]->{'discount'},
-                                       loop_pricescurrency => address@hidden,
-                                       loop_invoicecurrency => address@hidden,
+                                       
invoiceprice=>$booksellers[0]->{'invoiceprice'},
+                                       
listprice=>$booksellers[0]->{'listprice'},
                                        intranetcolorstylesheet => 
C4::Context->preference("intranetcolorstylesheet"),
-               intranetstylesheet => 
C4::Context->preference("intranetstylesheet"),
-               IntranetNav => C4::Context->preference("IntranetNav"),
+                                       intranetstylesheet => 
C4::Context->preference("intranetstylesheet"),
+                                       IntranetNav => 
C4::Context->preference("IntranetNav"),
                                        );
-
+}else{
+       my  ($count, $currencies) = &getcurrencies();
+       my @loop_pricescurrency;
+       my @loop_invoicecurrency;
+       for (my $i=0;$i<$count;$i++) {
+               if ($booksellers[0]->{'listprice'} eq 
$currencies->[$i]->{'currency'}) {
+                       push @loop_pricescurrency, { currency => "<option 
selected 
value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"
 };
+               } else {
+                       push @loop_pricescurrency, { currency => "<option 
value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
+               }
+               if ($booksellers[0]->{'invoiceprice'} eq 
$currencies->[$i]->{'currency'}) {
+                       push @loop_invoicecurrency, { currency => "<option 
selected 
value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
+               } else {
+                       push @loop_invoicecurrency, { currency => "<option 
value=\"$currencies->[$i]->{'currency'}\">$currencies->[$i]->{'currency'}</option>"};
+               }
+       }
+       $template->param(id => $id,
+                                               name => 
$booksellers[0]->{'name'},
+                                               postal 
=>$booksellers[0]->{'postal'},
+                                               address1 => 
$booksellers[0]->{'address1'},
+                                               address2 => 
$booksellers[0]->{'address2'},
+                                               address3 => 
$booksellers[0]->{'address3'},
+                                               address4 => 
$booksellers[0]->{'address4'},
+                                               phone 
=>$booksellers[0]->{'phone'},
+                                               fax => $booksellers[0]->{'fax'},
+                                               url => $booksellers[0]->{'url'},
+                                               contact => 
$booksellers[0]->{'contact'},
+                                               contpos => 
$booksellers[0]->{'contpos'},
+                                               contphone => 
$booksellers[0]->{'contphone'},
+                                               contaltphone => 
$booksellers[0]->{'contaltphone'},
+                                               contfax => 
$booksellers[0]->{'contfax'},
+                                               contemail => 
$booksellers[0]->{'contemail'},
+                                               contnotes => 
$booksellers[0]->{'contnotes'},
+                                               active => 
$booksellers[0]->{'active'},
+                                               specialty => 
$booksellers[0]->{'specialty'},
+                                               gstreg => 
$booksellers[0]->{'gstreg'},
+                                               listincgst => 
$booksellers[0]->{'listincgst'},
+                                               invoiceincgst => 
$booksellers[0]->{'invoiceincgst'},
+                                               discount => 
$booksellers[0]->{'discount'},
+                                               loop_pricescurrency => 
address@hidden,
+                                               loop_invoicecurrency => 
address@hidden,
+                                               intranetcolorstylesheet => 
C4::Context->preference("intranetcolorstylesheet"),
+                       intranetstylesheet => 
C4::Context->preference("intranetstylesheet"),
+                       IntranetNav => C4::Context->preference("IntranetNav"),
+                       enter=>1,
+                                               );
+}
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl
diff -u koha/koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl:1.12.2.1 
koha/koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl:1.12.2.2
--- koha/koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl:1.12.2.1        
Mon Feb 28 14:00:39 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl Mon Feb 20 
14:58:13 2006
@@ -1,6 +1,7 @@
 <!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
 
 <div id="mainbloc">
+<!--TMPL_IF Name="enter"-->
        <form action=updatesupplier.pl method="post">
        
        <input type="hidden" name="id" value=<!-- TMPL_VAR NAME="id" -->>
@@ -124,5 +125,109 @@
        </form>
        </div>
 </div>
-
+<!--TMPL_ELSE-->
+<a href="recieveorder.pl?supplierid=<!--TMPL_VAR Name="id"-->" class="button 
acquisition"> Receive Parcel </a>
+<a href="order.pl?supplier=<!--TMPL_VAR Name="name"-->" class="button 
acquisition"> Manage Orders </a>
+<a href="supplier.pl?supplierid=<!--TMPL_VAR Name="id"-->" class="button 
acquisition"> Edit Supplier </a>
+       <h1 class="acquisition">Information for : <!-- TMPL_VAR NAME="name" 
--></h1>
+       <div id="bloc25">
+               <h2 class="acquisition">COMPANY DETAILS</h2>
+               <p>
+                       <label>Company Name</label>
+                       <!-- TMPL_VAR NAME="name" -->
+               </p>
+               <p>
+                       <label class="label100">Postal Address</label>
+                               <!-- TMPL_VAR NAME="postal" -->
+               </p>
+               <p>
+                       <label class="label100">Physical Address</label>
+                       <!-- TMPL_VAR NAME="address1" --><!-- TMPL_VAR 
NAME="address2" --><!-- TMPL_VAR NAME="address3" --><!-- TMPL_VAR 
NAME="address4" -->
+               </p>
+               <p>
+                       <label>Phone</label>
+                       <!-- TMPL_VAR NAME="phone" -->
+               </p>
+               <p>
+                       <label>Fax</label>
+                       <!-- TMPL_VAR NAME="fax" -->
+               </p>
+               <p>
+                       <label>Website</label>
+                       <!-- TMPL_VAR NAME="url" -->
+               </p>
+               
+               <h2 class="acquisition">CONTACT DETAILS</h2>
+               <p>
+                       <label>Contact Name</label>
+                       <!-- TMPL_VAR NAME="contact" -->
+               </p>
+               <p>
+                       <label>Position</label>
+                       <!-- TMPL_VAR NAME="contpos" -->
+               </p>
+               <p>
+                       <label>Phone</label>
+                       <!-- TMPL_VAR NAME="contphone" -->
+               </p>
+               <p>
+                       <label>Alternative phone</label>
+                       <!-- TMPL_VAR NAME="contaltphone" -->
+               </p>
+               <p>
+                       <label>Fax</label>
+                       <!-- TMPL_VAR NAME="contfax" -->
+               </p>
+               <p>
+                       <label>E-mail</label>
+                       <!-- TMPL_VAR NAME="contemail" -->
+               </p>
+               <p>
+                       <label>Notes</label>
+                       <!-- TMPL_VAR NAME="contnotes" -->
+               </p>
+       </div>
+       <div id="bloc25">
+               <h2 class="acquisition">CURRENT STATUS</h2>
+               <p>
+                       <label>Supplier is</label>
+                               <!-- TMPL_IF name="active" -->
+                                       Active
+                               <!-- TMPL_ELSE -->
+                                       Inactive
+                               <!-- /TMPL_IF -->
+               </p>
+               <h2 class="acquisition">ORDERING INFORMATION</h2>
+               </p>
+               <p>
+                       <label>Publishers and Imprints</label>
+                       <!-- TMPL_VAR NAME="specialty" -->
+               </p>
+               <p>
+                       <label class="label100">List Prices 
are</label><!--TMPL_VAR Name="listprice"-->
+               </p>
+               <p>
+                       <label class="label100">Invoice Prices 
are</label><!--TMPL_VAR Name="invoiceprice"-->
+               </p>
+               <p>
+                       <label class="label100">GST Registered</label>
+                               <!-- TMPL_IF name="gstreg" 
-->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF -->
+               </p>
+               <p>
+                       <label class="label100">List Item Price Includes 
GST</label>
+                               <!-- TMPL_IF name="listincgst" 
-->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF -->
+               </p>
+               <p>
+                       <label class="label100">Invoice Item Price Includes 
GST</label>
+                               <!-- TMPL_IF name= "invoiceincgst" 
-->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF -->
+               </p>
+               <p>
+                       <label class="label100">Discount</label>
+                       <!-- TMPL_VAR NAME="discount" --> %
+               </p>
+       <br/>
+       <br/>
+       </div>
+</div>
+<!--/TMPL_IF-->
 <!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->




reply via email to

[Prev in Thread] Current Thread [Next in Thread]