Lines 7019-7025
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
Link Here
|
7019 |
my $return_count; |
7019 |
my $return_count; |
7020 |
$dbh->do("ALTER TABLE aqorders ADD COLUMN orderstatus varchar(16) DEFAULT 'new' AFTER parent_ordernumber"); |
7020 |
$dbh->do("ALTER TABLE aqorders ADD COLUMN orderstatus varchar(16) DEFAULT 'new' AFTER parent_ordernumber"); |
7021 |
$dbh->do("UPDATE aqorders SET orderstatus='ordered' WHERE basketno IN (SELECT basketno FROM aqbasket WHERE closedate IS NOT NULL)"); |
7021 |
$dbh->do("UPDATE aqorders SET orderstatus='ordered' WHERE basketno IN (SELECT basketno FROM aqbasket WHERE closedate IS NOT NULL)"); |
7022 |
$dbh->do("UPDATE aqorders SET orderstatus='partial' WHERE quantity > quantityreceived AND quantityreceived > 0"); |
7022 |
$dbh->do("UPDATE aqorders SET orderstatus='partial' WHERE quantity > quantityreceived AND ordernumber IN ( SELECT parent_ordernumber FROM ( SELECT DISTINCT(parent_ordernumber) FROM aqorders ) AS aq )"); |
7023 |
$dbh->do("UPDATE aqorders SET orderstatus='complete' WHERE quantity=quantityreceived"); |
7023 |
$dbh->do("UPDATE aqorders SET orderstatus='complete' WHERE quantity=quantityreceived"); |
7024 |
$dbh->do("UPDATE aqorders SET orderstatus='cancelled' WHERE datecancellationprinted IS NOT NULL"); |
7024 |
$dbh->do("UPDATE aqorders SET orderstatus='cancelled' WHERE datecancellationprinted IS NOT NULL"); |
7025 |
print "Upgrade to $DBversion done (Bug 5336: Add the new column aqorders.orderstatus)\n"; |
7025 |
print "Upgrade to $DBversion done (Bug 5336: Add the new column aqorders.orderstatus)\n"; |
7026 |
- |
|
|