koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/acqui acqui-home.pl acquire.pl lateorders.... [dev_week]


From: Ryan Higgins
Subject: [Koha-cvs] koha/acqui acqui-home.pl acquire.pl lateorders.... [dev_week]
Date: Tue, 13 Feb 2007 15:18:26 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Ryan Higgins <rych>     07/02/13 15:18:26

Modified files:
        acqui          : acqui-home.pl acquire.pl lateorders.pl 
                         receive.pl recieveorder.pl suggestion-select.pl 
                         supplier.pl updatesupplier.pl 

Log message:
        Changes in freight calculation, minor display related updates.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/acqui-home.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.3.2.4&r2=1.3.2.4.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/acquire.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.18.2.4.2.2&r2=1.18.2.4.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/lateorders.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.2&r2=1.1.2.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/receive.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.13.2.5.2.3&r2=1.13.2.5.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/recieveorder.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.9.2.7&r2=1.9.2.7.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/suggestion-select.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.3.2.5.2.2&r2=1.3.2.5.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/supplier.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.9.2.4&r2=1.9.2.4.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/updatesupplier.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.5&r2=1.5.4.1

Patches:
Index: acqui-home.pl
===================================================================
RCS file: /sources/koha/koha/acqui/acqui-home.pl,v
retrieving revision 1.3.2.4
retrieving revision 1.3.2.4.2.1
diff -u -b -r1.3.2.4 -r1.3.2.4.2.1
--- acqui-home.pl       5 Feb 2006 21:59:21 -0000       1.3.2.4
+++ acqui-home.pl       13 Feb 2007 15:18:26 -0000      1.3.2.4.2.1
@@ -9,6 +9,7 @@
 use C4::Suggestions;
 use HTML::Template;
 use C4::Acquisition;
+use C4::Date;
 
 my $query = new CGI;
 my ($template, $loggedinuser, $cookie)
@@ -29,7 +30,8 @@
 my $totavail=0;
 my @loop_budget = ();
 for (my $i=0;$i<$count;$i++){
-       my ($spent,$comtd)=bookfundbreakdown($results[$i]->{'bookfundid'});
+       my 
($spent,$comtd,$freight)=bookfundbreakdown($results[$i]->{'bookfundid'});
+       $spent += $freight;
        my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd);
        my %line;
        $line{bookfundname} = $results[$i]->{'bookfundname'};
@@ -37,6 +39,8 @@
        $line{spent} = sprintf  ("%.2f", $spent);
        $line{comtd} = sprintf  ("%.2f",$comtd);
        $line{avail}  = sprintf  ("%.2f",$avail);
+       $line{startdate} = format_date($results[$i]->{'startdate'});
+       $line{enddate} = format_date($results[$i]->{'enddate'});
        push @loop_budget, \%line;
        $total+=$results[$i]->{'budgetamount'};
        $totspent+=$spent;

Index: acquire.pl
===================================================================
RCS file: /sources/koha/koha/acqui/Attic/acquire.pl,v
retrieving revision 1.18.2.4.2.2
retrieving revision 1.18.2.4.2.3
diff -u -b -r1.18.2.4.2.2 -r1.18.2.4.2.3
--- acquire.pl  1 Jan 2007 01:45:40 -0000       1.18.2.4.2.2
+++ acquire.pl  13 Feb 2007 15:18:26 -0000      1.18.2.4.2.3
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: acquire.pl,v 1.18.2.4.2.2 2007/01/01 01:45:40 rych Exp $
+# $Id: acquire.pl,v 1.18.2.4.2.3 2007/02/13 15:18:26 rych Exp $
 
 #script to recieve orders
 #written by address@hidden 24/2/2000
@@ -89,7 +89,7 @@
        
        my $locations = getKohaAuthorisedValues($dbh, 'items.location');
        if ($locations ) {
-               my @location_codes = keys %$locations;
+               my @location_codes = sort keys %$locations;
                my $CGIlocation=CGI::scrolling_list( -name     => 'location',
                                -values   => address@hidden,
                                -default  => $results[0]->{'itemtype'},

Index: lateorders.pl
===================================================================
RCS file: /sources/koha/koha/acqui/lateorders.pl,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -b -r1.1.2.2 -r1.1.2.2.2.1
--- lateorders.pl       21 Feb 2006 20:26:06 -0000      1.1.2.2
+++ lateorders.pl       13 Feb 2007 15:18:26 -0000      1.1.2.2.2.1
@@ -39,6 +39,7 @@
                        -default  => $supplierid,
                        -labels   => \%supplierlist,
                        -size     => 1,
+                       -tabindex=>'',
                        -multiple => 0 );
 
 $template->param(Supplier=>$supplierlist{$supplierid}) if ($supplierid);
@@ -57,6 +58,7 @@
                                -values   => address@hidden,
                                -labels   => \%select_branches,
                                -size     => 1,
+                               -tabindex=>'',
                                -multiple => 0 );
 
 my ($count, @lateorders) = getlateorders($delay,$supplierid,$branch);

Index: receive.pl
===================================================================
RCS file: /sources/koha/koha/acqui/Attic/receive.pl,v
retrieving revision 1.13.2.5.2.3
retrieving revision 1.13.2.5.2.4
diff -u -b -r1.13.2.5.2.3 -r1.13.2.5.2.4
--- receive.pl  1 Jan 2007 01:55:53 -0000       1.13.2.5.2.3
+++ receive.pl  13 Feb 2007 15:18:26 -0000      1.13.2.5.2.4
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: receive.pl,v 1.13.2.5.2.3 2007/01/01 01:55:53 rych Exp $
+# $Id: receive.pl,v 1.13.2.5.2.4 2007/02/13 15:18:26 rych Exp $
 
 #script to recieve orders
 #written by address@hidden 24/2/2000
@@ -61,7 +61,8 @@
 my $toggle;
 my @loop_received = ();
 for (my $i=0;$i<$countlines;$i++){
-       $total=($parcelitems[$i]->{'unitprice'} + 
$parcelitems[$i]->{'freight'}) * $parcelitems[$i]->{'quantityreceived'};   
#weird, are the freight fees counted by book? (pierre)
+#      $total=($parcelitems[$i]->{'unitprice'} + 
$parcelitems[$i]->{'freight'}) * $parcelitems[$i]->{'quantityreceived'};   
#weird, are the freight fees counted by book? (pierre)
+       $total=($parcelitems[$i]->{'unitprice'}  ) * 
$parcelitems[$i]->{'quantityreceived'};   #weird, are the freight fees counted 
by book? (pierre)
        $parcelitems[$i]->{'unitprice'}+=0;
        my %line;
        if ($toggle==0){
@@ -81,17 +82,24 @@
        $line{author} = $parcelitems[$i]->{'author'};
        $line{unitprice} = $parcelitems[$i]->{'unitprice'};
        $line{ecost} = $parcelitems[$i]->{'ecost'};
-       $line{quantityrecieved} = $parcelitems[$i]->{'quantityreceived'};
-       $line{quantityrecievedplus1} = $parcelitems[$i]->{'quantityreceived'} + 
1;
+       $line{quantityreceived} = $parcelitems[$i]->{'quantityreceived'};
+       $line{quantityreceivedplus1} = $parcelitems[$i]->{'quantityreceived'} + 
1;
        $line{quantity} = $parcelitems[$i]->{'quantity'};
        $line{total} = $total;
        $line{supplierid} = $supplierid;
        push @loop_received, \%line;
        $totalprice+=$parcelitems[$i]->{'unitprice'};
-       $totalfreight+=$parcelitems[$i]->{'freight'};
+# FIXME - each order in a  parcel holds the freight for the whole parcel. This 
means if you receive a parcel with items from multiple budgets, you'll see the 
freight charge in each budget..
+    if ( $i > 0 && $totalfreight != $parcelitems[$i]->{'freight'}) {           
+               warn "FREIGHT CHARGE MISMATCH!!";
+       }
+       $totalfreight=$parcelitems[$i]->{'freight'};
+#      $totalfreight+=$parcelitems[$i]->{'freight'};
        $totalquantity+=$parcelitems[$i]->{'quantityreceived'};
        $tototal+=$total;
 }
+$freight = $totalfreight unless $freight;  #rch
+
 my ($countpendings,@pendingorders)=getallorders($supplierid);
 my @loop_orders = ();
 for (my $i=0;$i<$countpendings;$i++){
@@ -113,7 +121,7 @@
        $line{author} = $pendingorders[$i]->{'author'};
        $line{unitprice} = $pendingorders[$i]->{'unitprice'};
        $line{ecost} = $pendingorders[$i]->{'ecost'};
-       $line{quantityrecieved} = $pendingorders[$i]->{'quantityreceived'};
+       $line{quantityreceived} = $pendingorders[$i]->{'receivedinbasket'};
        $line{quantity} = $pendingorders[$i]->{'quantity'};
        $line{total} = $total;
        $line{supplierid} = $supplierid;
@@ -129,18 +137,18 @@
                                                name => 
$booksellers[0]->{'name'},
                                                supplierid => $supplierid,
                                                gst => $gst,
-                                               freight => $freight,
-                                               invoice => $invoice,
+                                               freight => 
sprintf("%.2f",$freight),
+                               #               invoice => $invoice,
                                                countreceived => $countlines,
                                                loop_received => address@hidden,
                                                countpending => $countpendings,
                                                loop_orders => address@hidden,
                                                totalprice => $totalprice,
-                                               totalfreight => $totalfreight,
+                                               totalfreight => 
sprintf("%.2f",$totalfreight),
                                                totalquantity => $totalquantity,
                                                tototal => $tototal,
                                                gst => $gst,
-                                               grandtot => $tototal+$gst,
+                                               grandtot => 
sprintf("%.2f",$tototal+$gst),
                                                intranetcolorstylesheet => 
C4::Context->preference("intranetcolorstylesheet"),
                intranetstylesheet => 
C4::Context->preference("intranetstylesheet"),
                IntranetNav => C4::Context->preference("IntranetNav"),

Index: recieveorder.pl
===================================================================
RCS file: /sources/koha/koha/acqui/Attic/recieveorder.pl,v
retrieving revision 1.9.2.7
retrieving revision 1.9.2.7.2.1
diff -u -b -r1.9.2.7 -r1.9.2.7.2.1
--- recieveorder.pl     4 Apr 2006 13:33:52 -0000       1.9.2.7
+++ recieveorder.pl     13 Feb 2007 15:18:26 -0000      1.9.2.7.2.1
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: recieveorder.pl,v 1.9.2.7 2006/04/04 13:33:52 tipaul Exp $
+# $Id: recieveorder.pl,v 1.9.2.7.2.1 2007/02/13 15:18:26 rych Exp $
 
 #script to show display basket of orders
 #written by address@hidden 24/2/2000
@@ -112,6 +112,7 @@
        $cell{emptycode}=$results[$i]->{booksellerinvoicenumber} eq '';
        $cell{raw_datereceived}=$results[$i]->{datereceived};
        $cell{datereceived}=format_date($results[$i]->{datereceived});
+       $cell{ponum}=$results[$i]->{purchaseordernumber};
        $cell{bibcount}=$results[$i]->{biblio};
        $cell{reccount}=$results[$i]->{itemsreceived};
        $cell{itemcount}=$results[$i]->{itemsexpected};
@@ -124,9 +125,7 @@
 $template->param(
                name => $booksellers[0]->{'name'},
                supplierid => $supplierid,
-               intranetcolorstylesheet => 
C4::Context->preference("intranetcolorstylesheet"),
-               intranetstylesheet => 
C4::Context->preference("intranetstylesheet"),
-               IntranetNav => C4::Context->preference("IntranetNav"),
+               GST => C4::Context->preference("gist"),
                );
 
 output_html_with_http_headers $input, $cookie, $template->output;

Index: suggestion-select.pl
===================================================================
RCS file: /sources/koha/koha/acqui/Attic/suggestion-select.pl,v
retrieving revision 1.3.2.5.2.2
retrieving revision 1.3.2.5.2.3
diff -u -b -r1.3.2.5.2.2 -r1.3.2.5.2.3
--- suggestion-select.pl        21 Jul 2006 17:46:48 -0000      1.3.2.5.2.2
+++ suggestion-select.pl        13 Feb 2007 15:18:26 -0000      1.3.2.5.2.3
@@ -84,7 +84,7 @@
                        push @value, $_->{publishercode};
                }
        
-               my ($finalresult,$nbresult) = 
C4::SearchMarc::catalogsearch($dbh,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,0,10);
+               my ($finalresult,$nbresult) = 
C4::Search::catalogsearch($dbh,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,0,10);
                # there is at least 1 result => return the 1st one
                if ($nbresult) {
        #               warn "$nbresult => 
"address@hidden>{biblionumber},@$finalresult[0]->{bibid},@$finalresult[0]->{title};

Index: supplier.pl
===================================================================
RCS file: /sources/koha/koha/acqui/supplier.pl,v
retrieving revision 1.9.2.4
retrieving revision 1.9.2.4.2.1
diff -u -b -r1.9.2.4 -r1.9.2.4.2.1
--- supplier.pl 20 Feb 2006 14:58:13 -0000      1.9.2.4
+++ supplier.pl 13 Feb 2007 15:18:26 -0000      1.9.2.4.2.1
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: supplier.pl,v 1.9.2.4 2006/02/20 14:58:13 hdl Exp $
+# $Id: supplier.pl,v 1.9.2.4.2.1 2007/02/13 15:18:26 rych Exp $
 
 #script to show display basket of orders
 #written by address@hidden 24/2/2000
@@ -65,6 +65,7 @@
                                        contfax => $booksellers[0]->{'contfax'},
                                        contemail => 
$booksellers[0]->{'contemail'},
                                        contnotes => 
$booksellers[0]->{'contnotes'},
+                                       notes => $booksellers[0]->{'notes'},
                                        active => $booksellers[0]->{'active'},
                                        specialty => 
$booksellers[0]->{'specialty'},
                                        gstreg => $booksellers[0]->{'gstreg'},
@@ -73,9 +74,7 @@
                                        discount => 
$booksellers[0]->{'discount'},
                                        
invoiceprice=>$booksellers[0]->{'invoiceprice'},
                                        
listprice=>$booksellers[0]->{'listprice'},
-                                       intranetcolorstylesheet => 
C4::Context->preference("intranetcolorstylesheet"),
-                                       intranetstylesheet => 
C4::Context->preference("intranetstylesheet"),
-                                       IntranetNav => 
C4::Context->preference("IntranetNav"),
+                                       GST => C4::Context->preference("gist"),
                                        );
 }else{
        my  ($count, $currencies) = &getcurrencies();
@@ -109,6 +108,7 @@
                                                contaltphone => 
$booksellers[0]->{'contaltphone'},
                                                contfax => 
$booksellers[0]->{'contfax'},
                                                contemail => 
$booksellers[0]->{'contemail'},
+                                               notes => 
$booksellers[0]->{'notes'},
                                                contnotes => 
$booksellers[0]->{'contnotes'},
                                                active => 
$booksellers[0]->{'active'},
                                                specialty => 
$booksellers[0]->{'specialty'},
@@ -118,9 +118,7 @@
                                                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"),
+                                               GST => 
C4::Context->preference("gist"),
                        enter=>1,
                                                );
 }

Index: updatesupplier.pl
===================================================================
RCS file: /sources/koha/koha/acqui/updatesupplier.pl,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -b -r1.5 -r1.5.4.1
--- updatesupplier.pl   13 Jul 2004 12:53:00 -0000      1.5
+++ updatesupplier.pl   13 Feb 2007 15:18:26 -0000      1.5.4.1
@@ -35,7 +35,6 @@
 $data{'id'}=$input->param('id');
 
 $data{'name'}=$input->param('company');
-$data{'name'}=~ s/\'/\\\'/g;
 $data{'postal'}=$input->param('company_postal');
 my $address=$input->param('physical');
 my @addresses=split('\n',$address);
@@ -52,7 +51,8 @@
 $data{'contaltphone'}=$input->param('contact_phone_2');
 $data{'contfax'}=$input->param('contact_fax');
 $data{'contemail'}=$input->param('company_email');
-$data{'contnotes'}=$input->param('notes');
+$data{'contnotes'}=$input->param('contact_notes');
+$data{'notes'}=$input->param('notes');
 $data{'active'}=$input->param('status');
 $data{'specialty'}=$input->param('publishers_imprints');
 $data{'listprice'}=$input->param('list_currency');




reply via email to

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