sub OrderProcess_NotifyTheUser { my ( $ErrorStatus, $Message, $AndExit ) = @_; my ( $msg, $vmsg ); if ( $ApplicationName_Long !~ /Initial-Order/i ) { return 0; } #Exit if not the Initial ( ex. Changes ); if ( $ORDERPROCESS_STATUS < 0 ) { $ORDERPROCESS_STATUS = 0; } if ( $AndExit > 0 ) { $ORDERPROCESS_STATUS = $AndExit; } if ( $ErrorStatus >= 9 ) { $TERMINATE++; $ORDERPROCESS_STATUS = $TERMINATE; } elsif ( $ErrorStatus >= 5 ) { $ERRORS++; } elsif ( $ErrorStatus >= 1 ) { $WARNINGS++; } $msg = $ErrorStatus . '|' . $Message; push( @LOG_MSG, $msg ); $vmsg = 'Time[' . &UnixDate( &ParseDate('Today'), '%H:%M:%S' ) . "] $Message "; push( @VERBOSE_MSG, $vmsg ); &Log2File( $ErrorStatus, $Message, $Log_Key, $Log_File ); if ( $ProcessType =~ /SCREENPROCESS/i ) { print STDOUT sprintf( $DisplayVia_Browser, $vmsg ); }elsif( $Verbose && $ViaCommandLine ) { print STDOUT "$vmsg $myLF\n"; } # if ( $Verbose && $ViaCommandLine ) { # print STDOUT "$vmsg $myLF\n"; # }elsif ( !$ViaCommandLine && $ProcessType =~ /SCREENPROCESS/i ) { # print STDOUT sprintf( $DisplayVia_Browser, $vmsg ); # } if ( $AndExit && $ViaCommandLine ) { OrderProcess_CustomExit($AndExit, $OnExit_callBackSubroutine); } }