View | Details | Raw Unified | Return to bug 10504
Collapse All | Expand All

(-)file_not_specified_in_diff (-1 lines)
Line 2 Link Here
2
 - git grep ModOrderItem should return no result.
91
 - git grep ModOrderItem should return no result.
3
--
4
C4/Acquisition.pm       |   31 -------------------------------
92
C4/Acquisition.pm       |   31 -------------------------------
5
cataloguing/moveitem.pl |    2 +-
93
cataloguing/moveitem.pl |    2 +-
6
2 files changed, 1 insertion(+), 32 deletions(-)
94
2 files changed, 1 insertion(+), 32 deletions(-)
(-)a/C4/Acquisition.pm (-31 lines)
Lines 1257-1293 sub ModOrder { Link Here
1257
1257
1258
#------------------------------------------------------------#
1258
#------------------------------------------------------------#
1259
1259
1260
=head3 ModOrderItem
1261
1262
  &ModOrderItem(\%hashref);
1263
1264
Modifies the itemnumber in the aqorders_items table. The input hash needs three entities:
1265
1266
=over
1267
1268
=item - itemnumber: the old itemnumber
1269
=item - ordernumber: the order this item is attached to
1270
=item - newitemnumber: the new itemnumber we want to attach the line to
1271
1272
=back
1273
1274
=cut
1275
1276
sub ModOrderItem {
1277
    my $orderiteminfo = shift;
1278
    if (! $orderiteminfo->{'ordernumber'} || ! $orderiteminfo->{'itemnumber'} || ! $orderiteminfo->{'newitemnumber'}){
1279
        die "Ordernumber, itemnumber and newitemnumber is required";
1280
    }
1281
1282
    my $dbh = C4::Context->dbh;
1283
1284
    my $query = "UPDATE aqorders_items set itemnumber=? where itemnumber=? and ordernumber=?";
1285
    my @params = ($orderiteminfo->{'newitemnumber'}, $orderiteminfo->{'itemnumber'}, $orderiteminfo->{'ordernumber'});
1286
    my $sth = $dbh->prepare($query);
1287
    $sth->execute(@params);
1288
    return 0;
1289
}
1290
1291
=head3 ModItemOrder
1260
=head3 ModItemOrder
1292
1261
1293
    ModItemOrder($itemnumber, $ordernumber);
1262
    ModItemOrder($itemnumber, $ordernumber);
(-)a/cataloguing/moveitem.pl (-2 / +1 lines)
Lines 30-36 use C4::Context; Link Here
30
use C4::Koha;
30
use C4::Koha;
31
use C4::Branch;
31
use C4::Branch;
32
use C4::ClassSource;
32
use C4::ClassSource;
33
use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder ModOrderItem/;
33
use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder/;
34
34
35
use Date::Calc qw(Today);
35
use Date::Calc qw(Today);
36
36
37
- 

Return to bug 10504