From 1ec6e3df73c9baed8d05ca7f471ff07f6e194aa9 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Thu, 29 Oct 2009 17:44:59 +0100 Subject: [PATCH] Change in API : ordnum becomes ordernumber --- C4/Acquisition.pm | 30 +++++++++---------- acqui/addorder.pl | 14 ++++----- acqui/addorderiso2709.pl | 8 ++--- acqui/finishreceive.pl | 6 ++-- acqui/neworderempty.pl | 16 +++++----- .../prog/en/modules/acqui/basket.tmpl | 4 +-- .../prog/en/modules/acqui/neworderempty.tmpl | 16 +++++----- .../prog/en/modules/acqui/orderreceive.tmpl | 2 +- .../prog/en/modules/acqui/parcel.tmpl | 4 +-- .../prog/en/modules/acqui/uncertainprice.tmpl | 2 +- .../modules/serials/subscription-detail.tmpl | 1 + labels/spinelabel-print.pl | 6 ++-- t/lib/KohaTest/Acquisition.pm | 10 +++---- t/lib/KohaTest/Acquisition/GetHistory.pm | 4 +-- t/lib/KohaTest/Acquisition/GetParcel.pm | 6 ++-- t/lib/KohaTest/Acquisition/GetParcels.pm | 4 +-- .../KohaTest/Acquisition/GetPendingOrders.pm | 4 +-- t/lib/KohaTest/Acquisition/NewOrder.pm | 16 +++++----- 18 files changed, 77 insertions(+), 76 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index eeb25e5f1c..ff7a6c0daa 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -867,7 +867,7 @@ C<$order> are fields from the biblio, biblioitems, aqorders tables of the Koha d =cut sub GetOrder { - my ($ordnum) = @_; + my ($ordernumber) = @_; my $dbh = C4::Context->dbh; my $query = " SELECT biblioitems.*, biblio.*, aqorders.* @@ -878,7 +878,7 @@ sub GetOrder { "; my $sth= $dbh->prepare($query); - $sth->execute($ordnum); + $sth->execute($ordernumber); my $data = $sth->fetchrow_hashref; $sth->finish; return $data; @@ -901,7 +901,7 @@ table of the Koha database. =item $hashref->{'basketno'} is the basketno foreign key in aqorders, it is mandatory -=item $hashref->{'ordnum'} is a "minimum order number." +=item $hashref->{'ordernumber'} is a "minimum order number." =item $hashref->{'budgetdate'} is effectively ignored. If it's undef (anything false) or the string 'now', the current day is used. @@ -940,8 +940,8 @@ sub NewOrder { } $orderinfo->{'entrydate'} ||= C4::Dates->new()->output("iso"); - my $ordnum=InsertInTable("aqorders",$orderinfo); - return ( $orderinfo->{'basketno'}, $ordnum ); + my $ordernumber=InsertInTable("aqorders",$orderinfo); + return ( $orderinfo->{'basketno'}, $ordernumber ); } @@ -960,7 +960,7 @@ sub NewOrder { =cut sub NewOrderItem { - #my ($biblioitemnumber,$ordnum, $biblionumber) = @_; + #my ($biblioitemnumber,$ordernumber, $biblionumber) = @_; my ($itemnumber, $ordernumber) = @_; my $dbh = C4::Context->dbh; my $query = qq| @@ -1068,7 +1068,7 @@ sub ModOrderItem { =over 4 -&ModOrderBiblioitemNumber($biblioitemnumber,$ordnum, $biblionumber); +&ModOrderBiblioitemNumber($biblioitemnumber,$ordernumber, $biblionumber); Modifies the biblioitemnumber for an existing order. Updates the order with order number C<$ordernum> and biblionumber C<$biblionumber>. @@ -1079,7 +1079,7 @@ Updates the order with order number C<$ordernum> and biblionumber C<$biblionumbe #FIXME: is this used at all? sub ModOrderBiblioitemNumber { - my ($biblioitemnumber,$ordnum, $biblionumber) = @_; + my ($biblioitemnumber,$ordernumber, $biblionumber) = @_; my $dbh = C4::Context->dbh; my $query = " UPDATE aqorders @@ -1087,7 +1087,7 @@ sub ModOrderBiblioitemNumber { WHERE ordernumber = ? AND biblionumber = ?"; my $sth = $dbh->prepare($query); - $sth->execute( $biblioitemnumber, $ordnum, $biblionumber ); + $sth->execute( $biblioitemnumber, $ordernumber, $biblionumber ); } #------------------------------------------------------------# @@ -1117,7 +1117,7 @@ C<$ordernumber>. sub ModReceiveOrder { my ( - $biblionumber, $ordnum, $quantrec, $user, $cost, + $biblionumber, $ordernumber, $quantrec, $user, $cost, $invoiceno, $freight, $rrp, $budget_id, $datereceived ) = @_; @@ -1135,7 +1135,7 @@ sub ModReceiveOrder { SELECT * FROM aqorders WHERE biblionumber=? AND aqorders.ordernumber=?"); - $sth->execute($biblionumber,$ordnum); + $sth->execute($biblionumber,$ordernumber); my $order = $sth->fetchrow_hashref(); $sth->finish(); @@ -1151,7 +1151,7 @@ sub ModReceiveOrder { , quantityreceived=? WHERE biblionumber=? AND ordernumber=?"); - $sth->execute($quantrec,$datereceived,$invoiceno,$cost,$freight,$rrp,$quantrec,$biblionumber,$ordnum); + $sth->execute($quantrec,$datereceived,$invoiceno,$cost,$freight,$rrp,$quantrec,$biblionumber,$ordernumber); $sth->finish; # create a new order for the remaining items, and set its bookfund. @@ -1164,7 +1164,7 @@ sub ModReceiveOrder { set quantityreceived=?,datereceived=?,booksellerinvoicenumber=?, unitprice=?,freight=?,rrp=? where biblionumber=? and ordernumber=?"); - $sth->execute($quantrec,$datereceived,$invoiceno,$cost,$freight,$rrp,$biblionumber,$ordnum); + $sth->execute($quantrec,$datereceived,$invoiceno,$cost,$freight,$rrp,$biblionumber,$ordernumber); $sth->finish; } return $datereceived; @@ -1260,7 +1260,7 @@ cancelled. =cut sub DelOrder { - my ( $bibnum, $ordnum ) = @_; + my ( $bibnum, $ordernumber ) = @_; my $dbh = C4::Context->dbh; my $query = " UPDATE aqorders @@ -1268,7 +1268,7 @@ sub DelOrder { WHERE biblionumber=? AND ordernumber=? "; my $sth = $dbh->prepare($query); - $sth->execute( $bibnum, $ordnum ); + $sth->execute( $bibnum, $ordernumber ); $sth->finish; } diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 38ece5514f..ebb1351d3b 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -42,7 +42,7 @@ All of the cgi parameters below are related to the new order. =over 4 -=item C +=item C the number of this new order. =item C @@ -148,7 +148,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( # get CGI parameters my $orderinfo = $input->Vars; $orderinfo->{'list_price'} ||= 0; -#my $ordnum = $input->param('ordnum'); +#my $ordernumber = $input->param('ordernumber'); #my $basketno = $input->param('basketno'); #my $booksellerid = $input->param('booksellerid'); #my $existing = $input->param('existing'); # existing biblio, (not basket or order) @@ -210,12 +210,12 @@ if ( $orderinfo->{quantity} ne '0' ) { $orderinfo->{biblionumber}=$biblionumber; } - # if we already have $ordnum, then it's an ordermodif - if ($$orderinfo{ordnum}) { + # if we already have $ordernumber, then it's an ordermodif + if ($$orderinfo{ordernumber}) { ModOrder( $orderinfo); } else { # else, it's a new line - @$orderinfo{qw(basketno ordnum )} = NewOrder($orderinfo); + @$orderinfo{qw(basketno ordernumber )} = NewOrder($orderinfo); } # now, add items if applicable @@ -254,7 +254,7 @@ if ( $orderinfo->{quantity} ne '0' ) { 'ITEM'); my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); my ($biblionumber,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$$orderinfo{biblionumber}); - NewOrderItem($itemnumber, $$orderinfo{ordnum}); + NewOrderItem($itemnumber, $$orderinfo{ordernumber}); } } @@ -263,7 +263,7 @@ if ( $orderinfo->{quantity} ne '0' ) { else { # qty=0, delete the line my $biblionumber = $input->param('biblionumber'); - DelOrder( $biblionumber, $$orderinfo{ordnum} ); + DelOrder( $biblionumber, $$orderinfo{ordernumber} ); } my $basketno=$$orderinfo{basketno}; my $booksellerid=$$orderinfo{booksellerid}; diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index baf3d00f55..3c05ca0ae7 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -55,7 +55,7 @@ my $booksellerid = $input->param('booksellerid'); $template->param(scriptname => "/cgi-bin/koha/acqui/addorderiso2709.pl", booksellerid => $booksellerid, ); -my $ordnum; +my $ordernumber; if ($cgiparams->{'import_batch_id'} && $op eq ""){ $op = "batch_details"; @@ -174,7 +174,7 @@ if ($op eq ""){ # remove uncertainprice flag if we have found a price in the MARC record $orderinfo{uncertainprice} = 0 if $orderinfo{listprice}; my $basketno; - ( $basketno, $ordnum ) = NewOrder(\%orderinfo); + ( $basketno, $ordernumber ) = NewOrder(\%orderinfo); # now, add items if applicable # parse all items sent by the form, and create an item just for the import_record_id we are dealing with @@ -228,7 +228,7 @@ if ($op eq ""){ $item->{'indicator'}); my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); my ($biblionumber,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber); - NewOrderItem( $itemnumber, $ordnum); + NewOrderItem( $itemnumber, $ordernumber); } } } @@ -295,7 +295,7 @@ sub import_biblios_list { match_score => $#$match > -1 ? $match->[0]->{'score'} : 0, # itemtypes => \@itemtypes, ); -# if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordnum) { +# if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber) { # # prepare empty item form # my $cell = PrepareItemrecordDisplay(); # my @itemloop; diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index fe67cfcb3b..52962a1574 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -38,7 +38,7 @@ my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired, ' my $user=$input->remote_user; my $biblionumber = $input->param('biblionumber'); my $biblioitemnumber=$input->param('biblioitemnumber'); -my $ordnum=$input->param('ordnum'); +my $ordernumber=$input->param('ordernumber'); my $origquantityrec=$input->param('origquantityrec'); my $quantityrec=$input->param('quantityrec'); my $quantity=$input->param('quantity'); @@ -61,7 +61,7 @@ my %tplorder = ( 'quantity' => $input->param('quantity') || 'ecost' => $input->param('ecost') || '', 'unitprice' => $input->param('cost') || '', ); -my $order = GetOrder($ordnum); +my $order = GetOrder($ordernumber); if ( any { $order->{$_} ne $tplorder{$_} } qw(quantity quantityreceived notes rrp ecost unitprice) ) { $order->{quantity} = $tplorder{quantity} if $tplorder{quantity}; $order->{quantityreceived} = $tplorder{quantityreceived} if $tplorder{quantityreceived}; @@ -111,7 +111,7 @@ if ($quantityrec > $origquantityrec ) { # save the quantity received. if( $quantityrec > 0 ) { - $datereceived = ModReceiveOrder($biblionumber,$ordnum, $quantityrec ,$user,$unitprice,$invoiceno,$freight,$replacement,undef,$datereceived); + $datereceived = ModReceiveOrder($biblionumber,$ordernumber, $quantityrec ,$user,$unitprice,$invoiceno,$freight,$replacement,undef,$datereceived); } } print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&datereceived=$datereceived$error_url_str"); diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 8dcc300c6a..4c92e796b9 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -45,7 +45,7 @@ the author of this new record. =item publication year the publication year of this new record. -=item ordnum +=item ordernumber the number of this order. =item biblio @@ -97,7 +97,7 @@ my $title = $input->param('title'); my $author = $input->param('author'); my $publicationyear = $input->param('publicationyear'); my $bookseller = GetBookSellerFromId($booksellerid); # FIXME: else ERROR! -my $ordnum = $input->param('ordnum') || ''; +my $ordernumber = $input->param('ordernumber') || ''; my $biblionumber = $input->param('biblionumber'); my $basketno = $input->param('basketno'); my $suggestionid = $input->param('suggestionid'); @@ -126,7 +126,7 @@ my $contract = &GetContract($basket->{contractnumber}); #simple parameters reading (all in one :-) my $params = $input->Vars; my $listprice; # the price, that can be in MARC record if we have one -if ( $ordnum eq '' and defined $params->{'breedingid'}){ +if ( $ordernumber eq '' and defined $params->{'breedingid'}){ #we want to import from the breeding reservoir (from a z3950 search) my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'}); die("Could not find the selected record in the reservoir, bailing") unless $marcrecord; @@ -168,10 +168,10 @@ if ( $ordnum eq '' and defined $params->{'breedingid'}){ my $cur = GetCurrency(); -if ( $ordnum eq '' ) { # create order +if ( $ordernumber eq '' ) { # create order $new = 'yes'; - # $ordnum=newordernum; + # $ordernumber=newordernum; if ( $biblionumber && !$suggestionid ) { $data = GetBiblioData($biblionumber); } @@ -183,7 +183,7 @@ if ( $ordnum eq '' ) { # create order } } else { #modify order - $data = GetOrder($ordnum); + $data = GetOrder($ordernumber); $biblionumber = $data->{'biblionumber'}; $budget_id = $data->{'budget_id'}; @@ -290,7 +290,7 @@ if ($CGIsort2) { $template->param( sort2 => $data->{'sort2'} ); } -if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordnum) { +if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber) { # prepare empty item form my $cell = PrepareItemrecordDisplay('','','','ACQ'); # warn "==> ".Data::Dumper::Dumper($cell); @@ -313,7 +313,7 @@ $template->param( $template->param( existing => $biblionumber, - ordnum => $ordnum, + ordernumber => $ordernumber, # basket informations basketno => $basketno, basketname => $basket->{'basketname'}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl index 3dd2d9e24c..14d9bd7550 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl @@ -240,10 +240,10 @@ - &booksellerid=&basketno=">Modify + &booksellerid=&basketno=">Modify - &basketno=&quantity=0&biblionumber=">Delete + &basketno=&quantity=0&biblionumber=">Delete diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index 87e93da75c..2a7734a511 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -1,5 +1,5 @@ -Koha › Acquisitions › Shopping Basket <!-- TMPL_VAR NAME="basketno" --> › <!-- TMPL_IF name="ordnum" -->Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --> +Koha › Acquisitions › Shopping Basket <!-- TMPL_VAR NAME="basketno" --> › <!-- TMPL_IF name="ordernumber" -->Modify order details (line #<!-- TMPL_VAR NAME="ordernumber" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --> @@ -54,12 +54,12 @@ ff.submit(); -
" > +
" > - +
@@ -68,8 +68,8 @@ ff.submit();

- - Modify order details (line #) + + Modify order details (line #) New order @@ -120,7 +120,7 @@ ff.submit(); - " /> + " /> " /> " /> " /> @@ -298,10 +298,10 @@ ff.submit();
  • - + - +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl index f3a03e6899..62d712d665 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tmpl @@ -75,7 +75,7 @@ " /> - " /> + " /> " /> " /> " /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl index 13e25c5642..7c940fc724 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl @@ -228,7 +228,7 @@ "> - &booksellerid="> + &booksellerid="> "> / @@ -297,7 +297,7 @@ "> - &booksellerid="> + &booksellerid="> "> / - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tmpl index d9ad59cf98..86f635e3ea 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tmpl @@ -84,7 +84,7 @@ function check(form) { /
    ,

    - &booksellerid=&basketno="> + &booksellerid=&basketno="> edit diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl index 0e74f1761b..e61444d12e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tmpl @@ -59,6 +59,7 @@ function popup(subscriptionid) {
    • The subscription has not expired yet
    • The subscription has linked issues
    • +
    • The subscription has linked items
      Those items won't be deleted
    " /> diff --git a/labels/spinelabel-print.pl b/labels/spinelabel-print.pl index d3a33cc6e4..7076a08f18 100755 --- a/labels/spinelabel-print.pl +++ b/labels/spinelabel-print.pl @@ -62,14 +62,14 @@ while ( my ( $key, $value ) = each(%$item) ) { $value = '' unless defined $value; my @characters = split( //, $value ); my $charnum = 1; - my $wordnum = 1; + my $wordernumber = 1; my $i = 1; foreach my $char (@characters) { if ( $char ne ' ' ) { - $data->{$key} .= "$char"; + $data->{$key} .= "$char"; } else { $data->{$key} .= "$char"; - $wordnum++; + $wordernumber++; $charnum = 1; } $charnum++; diff --git a/t/lib/KohaTest/Acquisition.pm b/t/lib/KohaTest/Acquisition.pm index 330f5f1183..eca0b16c10 100644 --- a/t/lib/KohaTest/Acquisition.pm +++ b/t/lib/KohaTest/Acquisition.pm @@ -71,7 +71,7 @@ sub create_new_basket { $self->add_biblios( add_items => 1 ); ok( scalar @{$self->{'biblios'}} > 0, 'we have added at least one biblio' ); - my ( $basketno, $ordnum ) = NewOrder( undef, # $basketno, + my ( $basketno, $ordernumber ) = NewOrder( undef, # $basketno, $self->{'biblios'}[0], # $bibnum, undef, # $title, 1, # $quantity, @@ -93,16 +93,16 @@ sub create_new_basket { undef, # $purchaseorder ); ok( $basketno, "my basket number is $basketno" ); - ok( $ordnum, "my order number is $ordnum" ); + ok( $ordernumber, "my order number is $ordernumber" ); - my $order = GetOrder( $ordnum ); - is( $order->{'ordernumber'}, $ordnum, 'got the right order' ) + my $order = GetOrder( $ordernumber ); + is( $order->{'ordernumber'}, $ordernumber, 'got the right order' ) or diag( Data::Dumper->Dump( [ $order ], [ 'order' ] ) ); is( $order->{'budgetdate'}, $today, "the budget date is $today" ); # XXX should I stuff these in $self? - return ( $basketno, $ordnum ); + return ( $basketno, $ordernumber ); } diff --git a/t/lib/KohaTest/Acquisition/GetHistory.pm b/t/lib/KohaTest/Acquisition/GetHistory.pm index be5e6be815..8c7c475337 100644 --- a/t/lib/KohaTest/Acquisition/GetHistory.pm +++ b/t/lib/KohaTest/Acquisition/GetHistory.pm @@ -41,9 +41,9 @@ sub no_history : Test( 4 ) { sub one_order : Test( 50 ) { my $self = shift; - my ( $basketno, $ordnum ) = $self->create_new_basket(); + my ( $basketno, $ordernumber ) = $self->create_new_basket(); ok( $basketno, "basketno is $basketno" ); - ok( $ordnum, "ordnum is $ordnum" ); + ok( $ordernumber, "ordernumber is $ordernumber" ); # No arguments fetches no history. { diff --git a/t/lib/KohaTest/Acquisition/GetParcel.pm b/t/lib/KohaTest/Acquisition/GetParcel.pm index ec6d87a071..c26e5f2cb4 100644 --- a/t/lib/KohaTest/Acquisition/GetParcel.pm +++ b/t/lib/KohaTest/Acquisition/GetParcel.pm @@ -39,12 +39,12 @@ sub one_parcel : Test( 17 ) { localtime->year() + 1900, localtime->mon() + 1, localtime->mday() ); - my ( $basketno, $ordnum ) = $self->create_new_basket(); + my ( $basketno, $ordernumber ) = $self->create_new_basket(); ok( $basketno, "my basket number is $basketno" ); - ok( $ordnum, "my order number is $ordnum" ); + ok( $ordernumber, "my order number is $ordernumber" ); my $datereceived = ModReceiveOrder( $self->{'biblios'}[0], # biblionumber - $ordnum, # $ordnum, + $ordernumber, # $ordernumber, undef, # $quantrec, undef, # $user, undef, # $cost, diff --git a/t/lib/KohaTest/Acquisition/GetParcels.pm b/t/lib/KohaTest/Acquisition/GetParcels.pm index 82b6101c69..fd3ad0fba8 100644 --- a/t/lib/KohaTest/Acquisition/GetParcels.pm +++ b/t/lib/KohaTest/Acquisition/GetParcels.pm @@ -269,10 +269,10 @@ sub create_order { localtime->mon() + 1, localtime->mday() ) unless exists $param{'date'}; - my ( $basketno, $ordnum ) = $self->create_new_basket( %param ); + my ( $basketno, $ordernumber ) = $self->create_new_basket( %param ); my $datereceived = ModReceiveOrder( $self->{'biblios'}[0], # biblionumber - $ordnum, # $ordnum, + $ordernumber, # $ordernumber, undef, # $quantrec, undef, # $user, undef, # $cost, diff --git a/t/lib/KohaTest/Acquisition/GetPendingOrders.pm b/t/lib/KohaTest/Acquisition/GetPendingOrders.pm index d6361fffd2..cf4bb1551a 100644 --- a/t/lib/KohaTest/Acquisition/GetPendingOrders.pm +++ b/t/lib/KohaTest/Acquisition/GetPendingOrders.pm @@ -31,10 +31,10 @@ we make an order, then see if it shows up in the pending orders sub one_new_order : Test( 49 ) { my $self = shift; - my ( $basketno, $ordnum ) = $self->create_new_basket(); + my ( $basketno, $ordernumber ) = $self->create_new_basket(); ok( $basketno, "basketno is $basketno" ); - ok( $ordnum, "ordnum is $ordnum" ); + ok( $ordernumber, "ordernumber is $ordernumber" ); my $orders = GetPendingOrders( $self->{'booksellerid'} ); is( scalar @$orders, 1, 'we successfully entered one order.' ); diff --git a/t/lib/KohaTest/Acquisition/NewOrder.pm b/t/lib/KohaTest/Acquisition/NewOrder.pm index e309b4cca1..972cde2f5d 100644 --- a/t/lib/KohaTest/Acquisition/NewOrder.pm +++ b/t/lib/KohaTest/Acquisition/NewOrder.pm @@ -25,7 +25,7 @@ sub new_order_no_budget : Test( 4 ) { localtime->year() + 1900, localtime->mon() + 1, localtime->mday() ); - my ( $basketno, $ordnum ) = NewOrder( undef, # $basketno, + my ( $basketno, $ordernumber ) = NewOrder( undef, # $basketno, 1, # $bibnum, undef, # $title, undef, # $quantity, @@ -48,10 +48,10 @@ sub new_order_no_budget : Test( 4 ) { undef, # $branchcode ); ok( $basketno, "my basket number is $basketno" ); - ok( $ordnum, "my order number is $ordnum" ); + ok( $ordernumber, "my order number is $ordernumber" ); - my $order = GetOrder( $ordnum ); - is( $order->{'ordernumber'}, $ordnum, 'got the right order' ) + my $order = GetOrder( $ordernumber ); + is( $order->{'ordernumber'}, $ordernumber, 'got the right order' ) or diag( Data::Dumper->Dump( [ $order ], [ 'order' ] ) ); is( $order->{'budgetdate'}, $today, "the budget date is $today" ); @@ -73,7 +73,7 @@ sub new_order_set_budget : Test( 4 ) { localtime->year() + 1900, localtime->mon() + 1, localtime->mday() ); - my ( $basketno, $ordnum ) = NewOrder( undef, # $basketno, + my ( $basketno, $ordernumber ) = NewOrder( undef, # $basketno, 1, # $bibnum, undef, # $title, undef, # $quantity, @@ -96,10 +96,10 @@ sub new_order_set_budget : Test( 4 ) { undef, # $branchcode ); ok( $basketno, "my basket number is $basketno" ); - ok( $ordnum, "my order number is $ordnum" ); + ok( $ordernumber, "my order number is $ordernumber" ); - my $order = GetOrder( $ordnum ); - is( $order->{'ordernumber'}, $ordnum, 'got the right order' ) + my $order = GetOrder( $ordernumber ); + is( $order->{'ordernumber'}, $ordernumber, 'got the right order' ) or diag( Data::Dumper->Dump( [ $order ], [ 'order' ] ) ); like( $order->{'budgetdate'}, qr(^2\d\d\d-07-01$), "the budget date ($order->{'budgetdate'}) is a July 1st." ); -- 2.39.5