Lines 59-65
BEGIN {
Link Here
|
59 |
&ModReceiveOrder &CancelReceipt |
59 |
&ModReceiveOrder &CancelReceipt |
60 |
&GetCancelledOrders |
60 |
&GetCancelledOrders |
61 |
&GetLastOrderNotReceivedFromSubscriptionid &GetLastOrderReceivedFromSubscriptionid |
61 |
&GetLastOrderNotReceivedFromSubscriptionid &GetLastOrderReceivedFromSubscriptionid |
62 |
&NewOrderItem &ModOrderItem &ModItemOrder |
62 |
&NewOrderItem &ModItemOrder |
63 |
|
63 |
|
64 |
&GetParcels &GetParcel |
64 |
&GetParcels &GetParcel |
65 |
&GetContracts &GetContract |
65 |
&GetContracts &GetContract |
Lines 1225-1261
sub ModOrder {
Link Here
|
1225 |
|
1225 |
|
1226 |
#------------------------------------------------------------# |
1226 |
#------------------------------------------------------------# |
1227 |
|
1227 |
|
1228 |
=head3 ModOrderItem |
|
|
1229 |
|
1230 |
&ModOrderItem(\%hashref); |
1231 |
|
1232 |
Modifies the itemnumber in the aqorders_items table. The input hash needs three entities: |
1233 |
|
1234 |
=over |
1235 |
|
1236 |
=item - itemnumber: the old itemnumber |
1237 |
=item - ordernumber: the order this item is attached to |
1238 |
=item - newitemnumber: the new itemnumber we want to attach the line to |
1239 |
|
1240 |
=back |
1241 |
|
1242 |
=cut |
1243 |
|
1244 |
sub ModOrderItem { |
1245 |
my $orderiteminfo = shift; |
1246 |
if (! $orderiteminfo->{'ordernumber'} || ! $orderiteminfo->{'itemnumber'} || ! $orderiteminfo->{'newitemnumber'}){ |
1247 |
die "Ordernumber, itemnumber and newitemnumber is required"; |
1248 |
} |
1249 |
|
1250 |
my $dbh = C4::Context->dbh; |
1251 |
|
1252 |
my $query = "UPDATE aqorders_items set itemnumber=? where itemnumber=? and ordernumber=?"; |
1253 |
my @params = ($orderiteminfo->{'newitemnumber'}, $orderiteminfo->{'itemnumber'}, $orderiteminfo->{'ordernumber'}); |
1254 |
my $sth = $dbh->prepare($query); |
1255 |
$sth->execute(@params); |
1256 |
return 0; |
1257 |
} |
1258 |
|
1259 |
=head3 ModItemOrder |
1228 |
=head3 ModItemOrder |
1260 |
|
1229 |
|
1261 |
ModItemOrder($itemnumber, $ordernumber); |
1230 |
ModItemOrder($itemnumber, $ordernumber); |