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); |