1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
4 if( !column_exists( 'branchtransfers', 'datecancelled' ) ) {
5 $dbh->do( "ALTER TABLE `branchtransfers` ADD COLUMN `datecancelled` datetime default NULL AFTER `datearrived`" );
8 if( !column_exists( 'branchtransfers', 'cancellation_reason' ) ) {
9 $dbh->do( "ALTER TABLE `branchtransfers` ADD COLUMN `cancellation_reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve') DEFAULT NULL AFTER `reason`" );
12 NewVersion( $DBversion, 26057, "Add datecancelled field to branchtransfers");