koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/acqui neworderempty.pl [rel_3_0]


From: paul poulain
Subject: [Koha-cvs] koha/acqui neworderempty.pl [rel_3_0]
Date: Wed, 24 Jan 2007 13:44:52 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     paul poulain <tipaul>   07/01/24 13:44:52

Modified files:
        acqui          : neworderempty.pl 

Log message:
        - Normalizing variable name (biblionumber)
        - adding "total" template variable, to show total on an order update.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/neworderempty.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.8&r2=1.1.2.9

Patches:
Index: neworderempty.pl
===================================================================
RCS file: /sources/koha/koha/acqui/neworderempty.pl,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -b -r1.1.2.8 -r1.1.2.9
--- neworderempty.pl    11 Jan 2007 15:30:52 -0000      1.1.2.8
+++ neworderempty.pl    24 Jan 2007 13:44:52 -0000      1.1.2.9
@@ -88,7 +88,7 @@
 my @booksellers  = GetBookSeller($booksellerid);
 my $count        = scalar @booksellers;
 my $ordnum       = $input->param('ordnum');
-my $biblio       = $input->param('biblio');
+my $biblionumber       = $input->param('biblionumber');
 my $basketno     = $input->param('basketno');
 my $suggestionid = $input->param('suggestionid');
 # my $donation     = $input->param('donation');
@@ -101,29 +101,24 @@
     $new = 'yes';
 
     #  $ordnum=newordernum;
-    if ( $biblio && !$suggestionid ) {
-        $data = GetBiblioData($biblio);
+    if ( $biblionumber && !$suggestionid ) {
+        $data = GetBiblioData($biblionumber);
     }
 
 # get suggestion fields if applicable. If it's a subscription renewal, then 
the biblio already exists
 # otherwise, retrieve suggestion information.
     if ($suggestionid) {
-        if ($biblio) {
-            $data = GetBiblioData($biblio);
+        if ($biblionumber) {
+            $data = GetBiblioData($biblionumber);
         }
         else {
             $data = GetSuggestion($suggestionid);
         }
     }
-    if ( $data->{'title'} eq '' ) {
-        $data->{'title'}         = $title;
-        $data->{'author'}        = $author;
-        $data->{'copyrightdate'} = $copyright;
-    }
 }
 else {    #modify order
     $data   = GetOrder($ordnum);
-    $biblio = $data->{'biblionumber'};
+    $biblionumber = $data->{'biblionumber'};
     #get basketno and suppleirno. too!
     my $data2 = GetBasket( $data->{'basketno'} );
     $basketno     = $data2->{'basketno'};
@@ -242,7 +237,7 @@
 my $bibitemsexists;
 
 #do a biblioitems lookup on bib
-my @bibitems = GetBiblioItemByBiblioNumber($biblio);
+my @bibitems = GetBiblioItemByBiblioNumber($biblionumber);
 my $bibitemscount = scalar @bibitems;
 
 if ( $bibitemscount > 0 ) {
@@ -272,13 +267,12 @@
   if ($close);
 
 $template->param(
-    existing         => $biblio,
-    title            => $title,
+    existing         => $biblionumber,
     ordnum           => $ordnum,
     basketno         => $basketno,
     booksellerid     => $booksellerid,
     suggestionid     => $suggestionid,
-    biblio           => $biblio,
+    biblionumber           => $biblionumber,
     biblioitemnumber => $data->{'biblioitemnumber'},
     itemtype         => $data->{'itemtype'},
     discount         => $booksellers[0]->{'discount'},
@@ -303,6 +297,7 @@
     quantity         => $data->{'quantity'},
     listprice        => $data->{'listprice'},
     rrp              => $data->{'rrp'},
+    total            => $data->{ecost}*$data->{quantity},
     invoice          => $data->{'booksellerinvoicenumber'},
     ecost            => $data->{'ecost'},
     notes            => $data->{'notes'},




reply via email to

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