# Consistency_Tests

Rule:
$Assets = ($CurrentAssets + $NoncurrentAssets)

Rule_OLD:
BS3 = Assets - (CurrentAssets + NoncurrentAssets)


Rule:
$Liabilities = ($CurrentLiabilities + $NoncurrentLiabilities)

Rule_OLD:
BS4 = Liabilities - (CurrentLiabilities + NoncurrentLiabilities)


Rule:
$LiabilitiesAndEquity = ($Liabilities + $Equity)

Rule_OLD:
BS5 = LiabilitiesAndEquity - (Liabilities + Equity)


Rule:
$GrossProfit = ($Revenues - $CostOfRevenue)

Rule_OLD:
IS1 = GrossProfit - (Revenues - CostOfRevenue)


Rule:
$OperatingIncomeLoss = ($GrossProfit - $OperatingExpenses)

Rule_OLD:
IS2 = OperatingIncomeLoss - (GrossProfit - OperatingExpenses)


Rule:
$IncomeLossFromContinuingOperationsBeforeTax = ($OperatingIncomeLoss + $NonoperatingIncomeLoss)

Rule_OLD:
IS4 = IncomeLossFromContinuingOperationsBeforeTax - (OperatingIncomeLoss + NonoperatingIncomeLoss)


Rule:
$IncomeLossFromContinuingOperationsAfterTax = ($IncomeLossFromContinuingOperationsBeforeTax - $IncomeTaxExpenseBenefit)

Rule_OLD:
IS5 = IncomeLossFromContinuingOperationsAfterTax - (IncomeLossFromContinuingOperationsBeforeTax - IncomeTaxExpenseBenefit)


Rule:
$NetIncomeLoss = ($IncomeLossFromContinuingOperationsAfterTax + $IncomeLossFromDiscontinuedOperationsNetOfTax)

Rule_OLD:
IS6 = NetIncomeLoss - (IncomeLossFromContinuingOperationsAfterTax + IncomeLossFromDiscontinuedOperationsNetOfTax)


Rule:
$NetCashFlow = ($NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities + $NetCashFlowFromFinancingActivities)

Rule_OLD:
CF1 = NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities)

Commentary:
Same as CF1, except exchange gains are not included because they are included in the roll forward of cash and cash equivalents.


Rule:
$IncomeLossFromContinuingOperationsBeforeTax = ($Revenues - $CostsAndExpenses)

Rule_OLD:
IS4 = IncomeLossFromContinuingOperationsBeforeTax - (Revenues - CostsAndExpenses)

Commentary:
Insurance-based revenues; us-gaap:BenefitsLossesAndExpenses is generally total expenses.  Costs and expenses does NOT include nonoperating expenses and income.  All other relations for insurance-based revenues on the income statement are the same.


Rule:
$OperatingIncomeLoss = ($GrossProfit - $OperatingExpenses + $OtherOperatingIncomeExpenses)

Rule_OLD:
IS2 = OperatingIncomeLoss - (GrossProfit - OperatingExpenses + OtherOperatingIncomeExpenses)

Commentary:
This is same as another IS2, except the entity DOES report OtherOperatingIncomeExpenses


Rule:
$IncomeLossFromContinuingOperationsBeforeTax = ($Revenues - $OperatingExpenses + $NonoperatingIncomeLoss)

Rule_OLD:
IS4 = IncomeLossFromContinuingOperationsBeforeTax - (Revenues - OperatingExpenses + NonoperatingIncomeLoss)

Commentary:
Three step income statement, SPECIAL 3, uses operating expenses


Rule:
$IncomeLossFromContinuingOperationsBeforeTax = ($Revenues - $CostsAndExpenses + $NonoperatingIncomeLoss)

Rule_OLD:
IS4 = IncomeLossFromContinuingOperationsBeforeTax - (Revenues - CostsAndExpenses + NonoperatingIncomeLoss)

Commentary:
Three step income statement, SPECIAL 3, uses costs and expenses


Rule:
$IncomeLossFromContinuingOperationsBeforeTax = ($GrossProfit - $OperatingExpenses + $NonoperatingIncomeLoss)

Rule_OLD:
IS4 = IncomeLossFromContinuingOperationsBeforeTax - (GrossProfit - OperatingExpenses + NonoperatingIncomeLoss)

Commentary:
Three step income statement, uses gross profit.


Rule:
$IncomeLossFromContinuingOperationsBeforeTax = ($OperatingAndNonoperatingRevenues - $OperatingAndNonoperatingCostsAndExpenses)

Rule_OLD:
IS4 = IncomeLossFromContinuingOperationsBeforeTax - (OperatingAndNonoperatingRevenues - OperatingAndNonoperatingCostsAndExpenses)

Commentary:
IS6 - Operating and nonoperating revenue and expenses are combined.


Rule:
$OperatingIncomeLoss = ($Revenues - $CostsAndExpenses)

Rule_OLD:
IS2 = OperatingIncomeLoss - (Revenues - CostsAndExpenses)


Commentary:
Income statement starts with OperatingIncomeLoss


Rule:
$OperatingIncomeLoss = ($Revenues - $CostsAndExpenses + $OtherOperatingIncomeExpenses)

Rule_OLD:
IS2 = OperatingIncomeLoss - (Revenues - CostsAndExpenses + OtherOperatingIncomeExpenses)


Rule:
$IncomeLossFromContinuingOperationsBeforeTax = ($InterestIncomeExpenseAfterProvisionForLosses + $NoninterestIncome - $NoninterestExpense)

Rule_OLD:
IS4 = IncomeLossFromContinuingOperationsBeforeTax - (InterestIncomeExpenseAfterProvisionForLosses + NoninterestIncome - NoninterestExpense)


# Impute_Tests

Rule:
if (($Assets = 0) and ($NoncurrentAssets = 0) and not($Assets = $LiabilitiesAndEquity) and ($CurrentAssets = $LiabilitiesAndEquity)) then ($Assets = $CurrentAssets) else ($Assets = $Assets)

Description:
If Assets = 0 and NoncurrentAssets = 0 and Assets <> LiabilitiesAndEquity and CurrentAssets = LiabilitiesAndEquity Then
    Assets = CurrentAssets
End If

Precondition:
exists($LiabilitiesAndEquity) and exists($CurrentAssets) and ($Assets eq null) and ($NoncurrentAssets eq null)


Rule:
if (($Assets = 0) and not($LiabilitiesAndEquity = 0) and ($CurrentAssets = $LiabilitiesAndEquity)) then ($Assets = $CurrentAssets) else ($Assets = $Assets)

Description:
If Assets = 0 and LiabilitiesAndEquity <> 0 and CurrentAssets = LiabilitiesAndEquity Then
    Assets = CurrentAssets
End If

Precondition:
exists($LiabilitiesAndEquity) and exists($CurrentAssets) and exists($LiabilitiesAndEquity) and ($Assets eq null) and ($NoncurrentAssets eq null)


Rule:
if (($Assets = 0) and ($NoncurrentAssets = 0) and not($LiabilitiesAndEquity = 0) and ($LiabilitiesAndEquity = $Liabilities + $Equity)) then ($Assets = $CurrentAssets) else ($Assets = $Assets)

Description:
If Assets = 0 and NoncurrentAssets = 0 and LiabilitiesAndEquity <> 0 and (LiabilitiesAndEquity = Liabilities + Equity) Then
    Assets = CurrentAssets
End If

Precondition:
($Assets eq null) and ($NoncurrentAssets eq null) and exists($Liabilities) and exists($Equity) and exists($LiabilitiesAndEquity) and ($LiabilitiesAndEquity = $Liabilities + $Equity)


Rule:
if ($NoncurrentAssets = 0 and not($Assets = 0) and not($CurrentAssets = 0)) then ($NoncurrentAssets = $Assets - $CurrentAssets) else ($NoncurrentAssets = $NoncurrentAssets)

Description:
If NoncurrentAssets = 0 and Assets <> 0 and CurrentAssets <> 0 Then
    NoncurrentAssets = Assets - CurrentAssets
End If

Formula_Value:
$NoncurrentAssets = $Assets - $CurrentAssets

Precondition:
($Assets eq null) and ($NoncurrentAssets eq null) and exists($CurrentAssets)


Rule:
if ($LiabilitiesAndEquity = 0 and not($Assets = 0)) then ($LiabilitiesAndEquity = $Assets) else ($LiabilitiesAndEquity = $LiabilitiesAndEquity)

Description:
If LiabilitiesAndEquity = 0 and Assets <> 0 Then
    LiabilitiesAndEquity = Assets
End If

Precondition:
($LiabilitiesAndEquity eq null) and exists($Assets)


Rule:
if ($Liabilities = 0 and (($CurrentLiabilities =0) or ($NoncurrentLiabilities = 0)) and not($Equity = 0) and not($LiabilitiesAndEquity = 0) ) then ($Liabilities = $LiabilitiesAndEquity - $Equity) else ($Liabilities = $Liabilities)

Description:
If Liabilities = 0 and (Equity <> 0) Then
    Liabilities = LiabilitiesAndEquity - Equity
End If

Commentary:
if ($Liabilities = 0 and not($Equity = 0)) then ($Liabilities = $LiabilitiesAndEquity - ($CommitmentsAndContingencies + $TemporaryEquity + $Equity)) else ($Liabilities = $Liabilities) <<= Old rule


Rule:
if ($NoncurrentLiabilities = 0 and not($Liabilities = 0) and not($CurrentLiabilities = 0)) then ($NoncurrentLiabilities = $Liabilities - $CurrentLiabilities) else ($NoncurrentLiabilities = $NoncurrentLiabilities)

Description:
If NoncurrentLiabilities = 0 and Liabilities <> 0 and CurrentLiabilities <> 0 Then
    NoncurrentLiabilities = Liabilities - CurrentLiabilities
End If


Rule:
if ($Liabilities = 0 and not($CurrentLiabilities = 0) and $NoncurrentLiabilities = 0 and not($Equity = 0) and not($LiabilitiesAndEquity = 0) ) then ($Liabilities = $CurrentLiabilities) else ($Liabilities = $Liabilities)

Description:
If Liabilities = 0 and CurrentLiabilities <> 0 and NoncurrentLiabilities = 0 Then
    Liabilities = CurrentLiabilities
End If

Commentary:
if ($Liabilities = 0 and not($CurrentLiabilities = 0) and $NoncurrentLiabilities = 0) then ($Liabilities = $CurrentLiabilities) else ($Liabilities = $Liabilities) <<= old rule


Rule:
if ($Liabilities = 0 and not($CurrentLiabilities = 0) and not($NoncurrentLiabilities = 0)) then ($Liabilities = $CurrentLiabilities + $NoncurrentLiabilities) else ($Liabilities = $Liabilities)

Description:
If Liabilities = 0 and CurrentLiabilities <> 0 and NoncurrentLiabilities <> 0 Then
    Liabilities = CurrentLiabilities + NoncurrentLiabilities
End If


Rule:
if ($CurrentLiabilities = 0 and $NoncurrentLiabilities = 0 and not($Liabilities = 0)) then ($CurrentLiabilities = $Liabilities) else ($CurrentLiabilities = $CurrentLiabilities)

Description:
If CurrentLiabilities = 0 and NoncurrentLiabilities = 0 and Liabilities <> 0 Then
    CurrentLiabilities = Liabilities
End If


Rule:
if ($CurrentAssets = 0 and not($Assets = 0) and not($LiabilitiesAndEquity = 0) and $LiabilitiesAndEquity = $Assets) then ($CurrentAssets = $Assets) else ($CurrentAssets = $CurrentAssets)

Description:
If CurrentAssets = 0 and Assets <> 0 and LiabilitiesAndEquity <> 0 and LiabilitiesAndEquity = Assets Then
    CurrentAssets = Assets
End If


Rule:
if ($NetCashFlowFromInvestingActivities = 0 and not($NetCashFlowFromOperatingActivities = 0) and not($NetCashFlowFromFinancingActivities = 0) and not($NetCashFlow - ($NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities + $NetCashFlowFromFinancingActivities + $ExchangeGainsLosses) = 0)) then ($NetCashFlowFromInvestingActivities = $NetCashFlow - ($NetCashFlowFromOperatingActivities + $NetCashFlowFromFinancingActivities + $ExchangeGainsLosses)) else ($NetCashFlowFromInvestingActivities =$NetCashFlowFromInvestingActivities)

Description:
If NetCashFlowFromInvestingActivities = 0 and NetCashFlowFromOperatingActivities <> 0 and NetCashFlowFromFinancingActivities <> 0 and (NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses) <> 0) Then
    NetCashFlowFromInvestingActivities = NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses)
End If


Rule:
if ($NetCashFlowFromFinancingActivities = 0 and not($NetCashFlowFromOperatingActivities = 0) and not($NetCashFlowFromInvestingActivities = 0) and not ($NetCashFlow - ($NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities + $NetCashFlowFromFinancingActivities + $ExchangeGainsLosses) = 0)) then ($NetCashFlowFromFinancingActivities = $NetCashFlow - ($NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities + $ExchangeGainsLosses)) else ($NetCashFlowFromFinancingActivities =$NetCashFlowFromFinancingActivities)

Description:
If NetCashFlowFromFinancingActivities = 0 and NetCashFlowFromOperatingActivities <> 0 and NetCashFlowFromInvestingActivities <> 0 and (NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses) <> 0) Then
    NetCashFlowFromFinancingActivities = NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + ExchangeGainsLosses)
End If


Rule:
if ($NetCashFlowFromOperatingActivities = 0 and not($NetCashFlowFromOperatingActivitiesContinuing = 0) and $NetCashFlowFromOperatingActivitiesDiscontinued = 0) then ($NetCashFlowFromOperatingActivities = $NetCashFlowFromOperatingActivitiesContinuing) else ($NetCashFlowFromOperatingActivities = $NetCashFlowFromOperatingActivities)

Description:
If NetCashFlowFromOperatingActivities = 0 and NetCashFlowFromOperatingActivitiesContinuing <> 0 and NetCashFlowFromOperatingActivitiesDiscontinued = 0 Then
    NetCashFlowFromOperatingActivities = NetCashFlowFromOperatingActivitiesContinuing
End If


Rule:
if ($NetCashFlow = 0 and (not($NetCashFlowFromOperatingActivities = 0) or not($NetCashFlowFromInvestingActivities = 0) or not($NetCashFlowFromFinancingActivities = 0))) then ($NetCashFlow = $NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities + $NetCashFlowFromFinancingActivities + $ExchangeGainsLosses) else ($NetCashFlow = $NetCashFlow)

Description:
If NetCashFlow = 0 and (NetCashFlowFromOperatingActivities <> 0 or NetCashFlowFromInvestingActivities <> 0 or NetCashFlowFromFinancingActivities <> 0) Then
    NetCashFlow = NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses
End If


Rule:
if ($IncomeLossFromContinuingOperationsAfterTax = 0 and not($IncomeLossFromContinuingOperationsBeforeTax = 0)) then ($IncomeLossFromContinuingOperationsAfterTax = $IncomeLossFromContinuingOperationsBeforeTax - $IncomeTaxExpenseBenefit) else ($IncomeLossFromContinuingOperationsAfterTax = $IncomeLossFromContinuingOperationsAfterTax)

Description:
If IncomeLossFromContinuingOperationsAfterTax = 0 and IncomeLossFromContinuingOperationsBeforeTax <> 0 Then
    IncomeLossFromContinuingOperationsAfterTax = IncomeLossFromContinuingOperationsBeforeTax - IncomeTaxExpenseBenefit
End If


Rule:
if ($NetIncomeLoss = 0 and not($IncomeLossFromContinuingOperationsAfterTax = 0) and not($IncomeLossFromDiscontinuedOperationsNetOfTax = 0)) then ($NetIncomeLoss = $IncomeLossFromContinuingOperationsAfterTax + $IncomeLossFromDiscontinuedOperationsNetOfTax) else ($NetIncomeLoss = $NetIncomeLoss)

Description:
If NetIncomeLoss = 0 and IncomeLossFromContinuingOperationsAfterTax <> 0 and IncomeLossFromDiscontinuedOperationsNetOfTax <> 0 Then
    NetIncomeLoss = IncomeLossFromContinuingOperationsAfterTax + IncomeLossFromDiscontinuedOperationsNetOfTax
End If


Rule:
if ($IncomeLossFromContinuingOperationsBeforeTax = 0 and not($IncomeLossFromContinuingOperationsAfterTax = 0) and $IncomeTaxExpenseBenefit = 0) then ($IncomeLossFromContinuingOperationsBeforeTax = $IncomeLossFromContinuingOperationsAfterTax) else ($IncomeLossFromContinuingOperationsBeforeTax = $IncomeLossFromContinuingOperationsBeforeTax)

Description:
If IncomeLossFromContinuingOperationsBeforeTax = 0 and IncomeLossFromContinuingOperationsAfterTax <> 0 and IncomeTaxExpenseBenefit = 0 Then
    IncomeLossFromContinuingOperationsBeforeTax = IncomeLossFromContinuingOperationsAfterTax
End If


Rule:
if ($IncomeLossFromContinuingOperationsAfterTax = 0 and not($NetIncomeLoss = 0)) then ($IncomeLossFromContinuingOperationsAfterTax = $NetIncomeLoss - $IncomeLossFromDiscontinuedOperationsNetOfTax) else ($IncomeLossFromContinuingOperationsAfterTax = $IncomeLossFromContinuingOperationsAfterTax)

Description:
If IncomeLossFromContinuingOperationsAfterTax = 0 and NetIncomeLoss <> 0 Then
    IncomeLossFromContinuingOperationsAfterTax = NetIncomeLoss - IncomeLossFromDiscontinuedOperationsNetOfTax
End If


Rule:
if ($IncomeLossFromContinuingOperationsAfterTax = 0 and not($IncomeTaxExpenseBenefit = 0) and not($IncomeLossFromContinuingOperationsBeforeTax = 0)) then ($IncomeLossFromContinuingOperationsAfterTax = $IncomeLossFromContinuingOperationsBeforeTax - $IncomeTaxExpenseBenefit) else ($IncomeLossFromContinuingOperationsAfterTax = $IncomeLossFromContinuingOperationsAfterTax)

Description:
If IncomeLossFromContinuingOperationsAfterTax = 0 and IncomeTaxExpenseBenefit <> 0 and IncomeLossFromContinuingOperationsBeforeTax <> 0 Then
    IncomeLossFromContinuingOperationsAfterTax = IncomeLossFromContinuingOperationsBeforeTax - IncomeTaxExpenseBenefit
End If


Rule:
if ($IncomeLossFromContinuingOperationsBeforeTax = 0 and not($IncomeLossFromContinuingOperationsAfterTax = 0)) then ($IncomeLossFromContinuingOperationsBeforeTax = $IncomeLossFromContinuingOperationsAfterTax + $IncomeTaxExpenseBenefit) else ($IncomeLossFromContinuingOperationsBeforeTax = $IncomeLossFromContinuingOperationsBeforeTax)

Description:
If IncomeLossFromContinuingOperationsBeforeTax = 0 and IncomeLossFromContinuingOperationsAfterTax <> 0 Then
    IncomeLossFromContinuingOperationsBeforeTax = IncomeLossFromContinuingOperationsAfterTax + IncomeTaxExpenseBenefit
End If


Rule:
if ($NonoperatingIncomeLoss = 0 and not($IncomeLossFromContinuingOperationsBeforeTax= 0) and not($OperatingIncomeLoss
 = 0)) then ($NonoperatingIncomeLoss = $IncomeLossFromContinuingOperationsBeforeTax - $OperatingIncomeLoss) else ($NonoperatingIncomeLoss = $NonoperatingIncomeLoss)

Description:
If IncomeLossFromContinuingOperationsBeforeTax <> 0 and OperatingIncomeLoss
 <> 0 Then
    NonoperatingIncomeLoss = IncomeLossFromContinuingOperationsBeforeTax - OperatingIncomeLoss
End If

Commentary:
ERROR??? There is some sort of error related to this formula.


Rule:
if ($GrossProfit = 0 and not($Revenues = 0) and not($CostOfRevenue = 0)) then ($GrossProfit = $Revenues - $CostOfRevenue) else ($GrossProfit = $GrossProfit)

Description:
If GrossProfit = 0 and Revenues <> 0 and CostOfRevenue <> 0 Then
    GrossProfit = Revenues - CostOfRevenue
End If


Rule:
if ($OperatingExpenses = 0 and not($OperatingIncomeLoss = 0)) then ($OperatingExpenses = $GrossProfit - $OperatingIncomeLoss) else ($OperatingExpenses = $OperatingExpenses)

Description:
If OperatingExpenses = 0 and OperatingIncomeLoss <> 0 Then
    OperatingExpenses = GrossProfit - OperatingIncomeLoss
End If


Rule:
if ($CostOfRevenue = 0 and not($Revenues = 0) and not($GrossProfit = 0)) then ($CostOfRevenue = $Revenues - $GrossProfit) else ($CostOfRevenue = $CostOfRevenue)

Description:
If CostOfRevenue = 0 and Revenues <> 0 and GrossProfit <> 0 Then
    CostOfRevenue = Revenues - GrossProfit
End If


Rule:
if ($NoncurrentLiabilities = 0 and not($CurrentLiabilities = 0) and not($Liabilities = 0)) then ($NoncurrentLiabilities = $Liabilities - $CurrentLiabilities) else ($NoncurrentLiabilities = $NoncurrentLiabilities)

Description:
If NoncurrentLiabilities = 0 and CurrentLiabilities <> 0 and Liabilities <> 0 Then
    NoncurrentLiabilities = Liabilities - CurrentLiabilities
End If


Rule:
if ($OperatingIncomeLoss = 0 and not($Revenues = 0) and not($CostsAndExpenses = 0)) then ($OperatingIncomeLoss = $Revenues - $CostsAndExpenses) else ($OperatingIncomeLoss = $OperatingIncomeLoss)

Description:
If OperatingIncomeLoss = 0 and Revenues <> 0 and CostsAndExpenses <> 0 Then
    OperatingIncomeLoss = Revenues - CostsAndExpenses
End If


Rule:
if ($CostsAndExpenses = 0 and not($Revenues = 0) and not($OperatingIncomeLoss = 0)) then ($CostsAndExpenses = $Revenues - $OperatingIncomeLoss) else ($CostsAndExpenses = $CostsAndExpenses)

Description:
If CostsAndExpenses = 0 and Revenues <> 0 and OperatingIncomeLoss <> 0 Then
    CostsAndExpenses = Revenues - OperatingIncomeLoss
End If


Rule:
if ($Revenues = 0 and not($CostsAndExpenses = 0) and not($OperatingIncomeLoss = 0)) then ($Revenues = $CostsAndExpenses + $OperatingIncomeLoss) else ($Revenues = $Revenues)

Description:
If Revenues = 0 and CostsAndExpenses <> 0 and OperatingIncomeLoss <> 0 Then
    Revenues = CostsAndExpenses + OperatingIncomeLoss
End If


Rule:
if ($OperatingExpenses = 0 and not($Revenues = 0) and not($OperatingIncomeLoss = 0)) then ($OperatingExpenses = $Revenues - $OperatingIncomeLoss) else ($OperatingExpenses = $OperatingExpenses)

Description:
If OperatingExpenses = 0 and Revenues <> 0 and OperatingIncomeLoss <> 0 Then
    OperatingExpenses = Revenues - OperatingIncomeLoss
End If


Rule:
if ($Revenues = 0 and not($OperatingExpenses = 0) and not($OperatingIncomeLoss = 0)) then ($Revenues = $OperatingIncomeLoss + $OperatingExpenses) else ($Revenues = $Revenues)

Description:
If Revenues = 0 and OperatingExpenses <> 0 and OperatingIncomeLoss <> 0 Then
    Revenues = OperatingIncomeLoss + OperatingExpenses
End If


Rule:
if ($OperatingIncomeLoss = 0 and not($Revenues = 0) and not($OperatingExpenses = 0)) then ($OperatingIncomeLoss = $Revenues - $OperatingExpenses) else ($OperatingIncomeLoss = $OperatingIncomeLoss)

Description:
If OperatingIncomeLoss = 0 and Revenues <> 0 and OperatingExpenses <> 0 Then
    OperatingIncomeLoss = Revenues - OperatingExpenses
End If

Commentary:
Unique to SPEC1; added to make consistent with SPEC2


Rule:
if ($OperatingAndNonoperatingRevenues = 0 and not($IncomeLossFromContinuingOperationsBeforeTax = 0)) then ($OperatingAndNonoperatingRevenues = $IncomeLossFromContinuingOperationsBeforeTax + $OperatingAndNonoperatingCostsAndExpenses) else ($OperatingAndNonoperatingRevenues = $OperatingAndNonoperatingRevenues)

Description:
If OperatingAndNonoperatingRevenues = 0 and IncomeLossFromContinuingOperationsBeforeTax <> 0 and OperatingAndNonoperatingCostsAndExpenses <> 0 Then
    OperatingAndNonoperatingRevenues = IncomeLossFromContinuingOperationsBeforeTax + OperatingAndNonoperatingCostsAndExpenses
End If

Commentary:
Operating and nonoperating revenues and expenses are not separated in totals.


Rule:
if ($OperatingAndNonoperatingCostsAndExpenses = 0 and not($OperatingAndNonoperatingRevenues = 0) and not($IncomeLossFromContinuingOperationsBeforeTax = 0)) then ($OperatingAndNonoperatingCostsAndExpenses = $OperatingAndNonoperatingRevenues - $IncomeLossFromContinuingOperationsBeforeTax) else ($OperatingAndNonoperatingCostsAndExpenses = $OperatingAndNonoperatingCostsAndExpenses)

Description:
If OperatingAndNonoperatingCostsAndExpenses = 0 and OperatingAndNonoperatingRevenues <> 0 and IncomeLossFromContinuingOperationsBeforeTax <> 0 Then
    OperatingAndNonoperatingCostsAndExpenses = OperatingAndNonoperatingRevenues - IncomeLossFromContinuingOperationsBeforeTax
End If


Rule:
if ($IncomeLossFromContinuingOperationsBeforeTax = 0) then ($IncomeLossFromContinuingOperationsBeforeTax = $Revenues - $CostsAndExpenses) else ($IncomeLossFromContinuingOperationsBeforeTax = $IncomeLossFromContinuingOperationsBeforeTax)

Description:
If IncomeLossFromContinuingOperationsBeforeTax = 0 Then
	 	  IncomeLossFromContinuingOperationsBeforeTax = Revenues - CostsAndExpenses
End If


Rule:
if ($CostsAndExpenses = 0 and not($Revenues = 0) and not($IncomeLossFromContinuingOperationsBeforeTax = 0)) then ($CostsAndExpenses = $Revenues - $IncomeLossFromContinuingOperationsBeforeTax) else ($CostsAndExpenses = $CostsAndExpenses)

Description:
If CostsAndExpenses = 0 and Revenues <> 0 and IncomeLossFromContinuingOperationsBeforeTax <> 0 Then
   CostsAndExpenses = Revenues - IncomeLossFromContinuingOperationsBeforeTax
End If


Rule:
if ($NetCashFlowContinuing = 0 and not($NetCashFlow =0)) then ($NetCashFlowContinuing = $NetCashFlow - $NetCashFlowDiscontinued) else ($NetCashFlowContinuing = $NetCashFlowContinuing)

Description:
If NetCashFlowContinuing = 0 and NetCashFlow <> 0 Then
    NetCashFlowContinuing = NetCashFlow - NetCashFlowDiscontinued
End If


Rule:
if ($NetCashFlow = 0 and not($NetCashFlowContinuing =0)) then ($NetCashFlow = $NetCashFlowContinuing + $NetCashFlowDiscontinued) else ($NetCashFlow = $NetCashFlow)

Description:
If NetCashFlow = 0 and NetCashFlowContinuing <> 0 Then
    NetCashFlow = NetCashFlowContinuing + NetCashFlowDiscontinued
End If


Rule:
if ($NetCashFlowFromInvestingActivities = 0 and not($NetCashFlowFromOperatingActivities = 0) and not($NetCashFlowFromFinancingActivities = 0) and not($NetCashFlow - ($NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities + $NetCashFlowFromFinancingActivities) = 0)) then ($NetCashFlowFromInvestingActivities = $NetCashFlow - ($NetCashFlowFromOperatingActivities + $NetCashFlowFromFinancingActivities)) else ($NetCashFlowFromInvestingActivities =$NetCashFlowFromInvestingActivities)

Description:
If NetCashFlowFromInvestingActivities = 0 and NetCashFlowFromOperatingActivities <> 0 and NetCashFlowFromFinancingActivities <> 0 and (NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities) <> 0) Then
    NetCashFlowFromInvestingActivities = NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromFinancingActivities)
End If


Rule:
if ($NetCashFlowFromFinancingActivities = 0 and not($NetCashFlowFromOperatingActivities = 0) and not($NetCashFlowFromInvestingActivities = 0) and not ($NetCashFlow - ($NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities + $NetCashFlowFromFinancingActivities) = 0)) then ($NetCashFlowFromFinancingActivities = $NetCashFlow - ($NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities)) else ($NetCashFlowFromFinancingActivities =$NetCashFlowFromFinancingActivities)

Description:
If NetCashFlowFromFinancingActivities = 0 and NetCashFlowFromOperatingActivities <> 0 and NetCashFlowFromInvestingActivities <> 0 and (NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities) <> 0) Then
    NetCashFlowFromFinancingActivities = NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities)
End If


Rule:
if ($NetCashFlow = 0 and (not($NetCashFlowFromOperatingActivities = 0) or not($NetCashFlowFromInvestingActivities = 0) or not($NetCashFlowFromFinancingActivities = 0))) then ($NetCashFlow = $NetCashFlowFromOperatingActivities + $NetCashFlowFromInvestingActivities + $NetCashFlowFromFinancingActivities) else ($NetCashFlow = $NetCashFlow)

Description:
If NetCashFlow = 0 and (NetCashFlowFromOperatingActivities <> 0 or NetCashFlowFromInvestingActivities <> 0 or NetCashFlowFromFinancingActivities <> 0) Then
    NetCashFlow = NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities
End If


Rule:
if ($NonoperatingIncomeLoss = 0 and not($Revenues =0) and not($OperatingExpenses =0)) then ($NonoperatingIncomeLoss = $IncomeLossFromContinuingOperationsBeforeTax - $Revenues + $OperatingExpenses) else ($NonoperatingIncomeLoss = $NonoperatingIncomeLoss)

Description:
If NonoperatingIncomeLoss = 0 and Revenues <> 0 and OperatingExpenses <> 0 Then
    NonoperatingIncomeLoss = IncomeLossFromContinuingOperationsBeforeTax - Revenues + OperatingExpenses
End If


Rule:
if ($Revenues = 0 and not($GrossProfit = 0) and not($CostOfRevenue = 0)) then ($Revenues = $GrossProfit + $CostOfRevenue) else ($Revenues = $Revenues)

Description:
If Revenues = 0 and GrossProfit <> 0 and CostOfRevenue <> 0 Then
    Revenues = GrossProfit + CostOfRevenue
End If


Rule:
if ($Liabilities = 0 and not($CurrentLiabilities = 0) and not($NoncurrentLiabilities = 0)) then ($Liabilities = $CurrentLiabilities + $NoncurrentLiabilities + $LiabilitiesHeldForSale) else ($Liabilities = $Liabilities)

Description:
If Liabilities = 0 and CurrentLiabilities <> 0 and NoncurrentLiabilities <> 0 Then
    Liabilities = CurrentLiabilities + NoncurrentLiabilities + LiabilitiesHeldForSale
End If


Rule:
if ($OperatingExpenses = 0 and not($OperatingIncomeLoss = 0) and $OtherOperatingIncomeExpenses = 0) then ($OperatingExpenses = $GrossProfit - $OperatingIncomeLoss) else ($OperatingExpenses = $OperatingExpenses)

Description:
If OperatingExpenses = 0 and OperatingIncomeLoss <> 0 and OtherOperatingIncomeExpenses = 0 Then
    OperatingExpenses = GrossProfit - OperatingIncomeLoss
End If


Rule:
if ($OtherOperatingIncomeExpenses = 0 and not($OperatingExpenses = 0) and not($OperatingIncomeLoss = 0) and not($GrossProfit = 0)) then ($OtherOperatingIncomeExpenses = $OperatingIncomeLoss - $GrossProfit + $OperatingExpenses) else ($OtherOperatingIncomeExpenses = $OperatingExpenses)

Description:
If OtherOperatingIncomeExpenses = 0 and OperatingExpenses <> 0 and OperatingIncomeLoss <> 0 and GrossProfit <> 0 Then
    OtherOperatingIncomeExpenses = OperatingIncomeLoss - GrossProfit + OperatingExpenses
End If


Rule:
if ($Assets = 0 and not($NoncurrentAssets = 0) and not($CurrentAssets = 0)) then ($Assets = $NoncurrentAssets + $CurrentAssets) else ($Assets = $Assets)

Description:
If Assets = 0 and NoncurrentAssets <> 0 and CurrentAssets <> 0 Then
    Assets = NoncurrentAssets + CurrentAssets
End If


Rule:
if ($LiabilitiesAndEquity = 0 and not($Equity = 0) and not($Liabilities = 0)) then ($LiabilitiesAndEquity = $Equity + $Liabilities) else ($LiabilitiesAndEquity = $LiabilitiesAndEquity)

Description:
If LiabilitiesAndEquity = 0 and Equity <> 0 and Liabilities <> 0 Then
    LiabilitiesAndEquity = Equity + Liabilities
End If


# Networks

Comments:
Note that Operating Income (Loss) is NOT reported. Note that gross profit is NOT reported.


Comments:
100% of filers provide this information most of which is tested by SEC when document is received.


Comments:
Note that this is the most common balance sheet style.


Comments:
Note that Assets and Liabilities are not broken out into Current and Noncurrent portions.


NetworkLabel:
203-Income Statement, Multi Step, Alternative (IS3)

Documentation:
Income Statement, Multi Step, Alternative


Comments:
Note that Exchange Gains (Losses) are reported as part of Net Cash Flow.


Comments:
This is a demonstration of including ratios.


# ReportFrameCodes

Comments:
Balance sheet CLASSIFIED, cash flow statement NORMAL, income statement by multi step


Comments:
Balance sheet CLASSIFIED, cash flow statement NORMAL, income statement by single step


Comments:
Balance sheet CLASSIFIED, cash flow statement NORMAL, income statement by multi step alternative


Comments:
Balance sheet CLASSIFIED ALTERNATIVE, cash flow statement NORMAL, income statement single step


Comments:
Balance sheet CLASSIFIED ALTERNATIVE, cash flow statement NORMAL, income statement multi step


# FundamentalAccountingConcepts

ConceptLabel:
Operating and Nonoperating Costs and Expenses


ConceptLabel:
Income (Loss) From Continuing Operations After Tax


ConceptLabel:
Income (Loss) From Continuing Operations Before Tax


ConceptLabel:
Income (Loss) From Discontinued Operations, Net Of Tax


ConceptLabel:
Income Statement Start Period (Year to Date)


