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