'Created by Charles Hoffman, CPA 6/28/2018 6:35:14 PM 'Reporting Style Code: COMID-BSN-CF1-ISM-IEMIX-OILY 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 001-General Information (http://www.xbrlsite.com/2014/Protototype/fac/GeneralInformation) 'General information 'Reviewed 2015-11-13 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 104-Balance Sheet, Classified, Fixed and Other than Fixed Breakdown of Noncurrent Assets (http://www.xbrlsite.com/2014/Protototype/fac/BalanceSheetClassified4) 'Balance sheet (Classified), Fixed/Nonfixed breakdown 'Reviewed 2015-11-13 'Determine which statements are used IsClassifiedBalanceSheet = CurrentAssets 'IS-Impute-00: (Added, 2016-03-06) If RedeemableNoncontrollingInterest = 0 Then RedeemableNoncontrollingInterest = RedeemableNoncontrollingInterestCommon + RedeemableNoncontrollingInterestPreferred + RedeemableNoncontrollingInterestOther End If 'IS-Impute-00: (Added, 2016-03-06) If TemporaryEquity = 0 Then TemporaryEquity = TemporaryEquityAttributableToParent + RedeemableNoncontrollingInterest End If 'BS-Impute-02: If Assets = 0 and LiabilitiesAndEquity <> 0 and CurrentAssets = LiabilitiesAndEquity Then Assets = CurrentAssets End If 'BS-Impute-05: If LiabilitiesAndEquity = 0 and Assets <> 0 Then LiabilitiesAndEquity = Assets End If 'BS-Impute-06: If Equity = 0 and EquityAttributableToNoncontrollingInterest <> 0 and EquityAttributableToParent <> 0 Then Equity = EquityAttributableToParent + EquityAttributableToNoncontrollingInterest End If 'BS-Impute-07: If Equity = 0 and EquityAttributableToNoncontrollingInterest = 0 and EquityAttributableToParent <> 0 Then Equity = EquityAttributableToParent End If 'BS-Impute-08: If Equity = 0 Then Equity = EquityAttributableToParent + EquityAttributableToNoncontrollingInterest End If 'BS-Impute-09: If EquityAttributableToParent = 0 and Equity <> 0 and EquityAttributableToNoncontrollingInterest <> 0 Then EquityAttributableToParent = Equity - EquityAttributableToNoncontrollingInterest End If 'BS-Impute-10: If EquityAttributableToParent = 0 and Equity <> 0 and EquityAttributableToNoncontrollingInterest = 0 Then EquityAttributableToParent = Equity End If 'BS-Impute-11: If Liabilities = 0 and (Equity <> 0) Then Liabilities = LiabilitiesAndEquity - (CommitmentsAndContingencies + TemporaryEquity + Equity) End If 'BS-Impute-12: If NoncurrentLiabilities = 0 and Liabilities <> 0 and CurrentLiabilities <> 0 Then NoncurrentLiabilities = Liabilities - CurrentLiabilities End If 'BS-Impute-13: If Liabilities = 0 and CurrentLiabilities <> 0 and NoncurrentLiabilities = 0 Then Liabilities = CurrentLiabilities End If 'BS-Impute-14: If Liabilities = 0 and CurrentLiabilities <> 0 and NoncurrentLiabilities <> 0 Then Liabilities = CurrentLiabilities + NoncurrentLiabilities End If 'BS-Impute-15: If EquityAttributableToParent <> 0 and Equity <> 0 and EquityAttributableToNoncontrollingInterest <> 0 and EquityAttributableToParent = Equity Then EquityAttributableToParent = Equity - EquityAttributableToNoncontrollingInterest End If 'BS-Impute-16: If CurrentLiabilities = 0 and NoncurrentLiabilities = 0 and Liabilities <> 0 Then CurrentLiabilities = Liabilities End If 'BS-Impute-17: ADDED 2015-05-29, also removed mappings to detailed NCI concepts If EquityAttributableToNoncontrollingInterest = 0 and Equity <> 0 and EquityAttributableToParent <> 0 Then EquityAttributableToNoncontrollingInterest = Equity - EquityAttributableToParent End If 'BS-Impute-94: If OtherThanFixedNoncurrentAssets = 0 and Assets <> 0 and CurrentAssets <> 0 and FixedAssets <> 0 Then OtherThanFixedNoncurrentAssets = Assets - CurrentAssets - FixedAssets End If 'BS-Impute-95: If Equity = 0 and CurrentLiabilities <> 0 and NoncurrentLiabilities <> 0 Then Equity = LiabilitiesAndEquity - (CurrentLiabilities + NoncurrentLiabilities + CommitmentsAndContingencies + TemporaryEquity) End If 'BS-Impute-96: If EquityAttributableToParent = 0 and Equity <> 0 and EquityAttributableToNoncontrollingInterest = 0 Then EquityAttributableToParent = Equity End If 'BS-Impute-99: (Added 2016-08-25) If FixedAssets = 0 and Assets <> 0 and CurrentAssets <> 0 and OtherThanFixedNoncurrentAssets <> 0 Then FixedAssets = Assets - CurrentAssets - OtherThanFixedNoncurrentAssets End If 'VERIFICATION RULES: Balance Sheet relations BS1 = Equity - (EquityAttributableToParent + EquityAttributableToNoncontrollingInterest) BS2 = Assets - LiabilitiesAndEquity BS3 = Assets - (CurrentAssets + FixedAssets + OtherThanFixedNoncurrentAssets) BS4 = Liabilities - (CurrentLiabilities + NoncurrentLiabilities) BS5 = LiabilitiesAndEquity - (Liabilities + CommitmentsAndContingencies + TemporaryEquity + Equity) 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 202-Income Statement, Multi Step (Report Operating Income) (http://www.xbrlsite.com/2014/Protototype/fac/IncomeStatementMultiStep) 'Income statement - Multi-Step, With Operating income (loss) (concepts us-gaap:GrossProfit and us-gaap:OperatingIncomeLoss explicitly reported) 'Reviewed 2015-11-13 'IS-Impute-00: ADDED 2016-03-10 (Changed basic relations of preferred dividends and distributed and undistributed earnings) If ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic = 0 Then ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic = PreferredStockDividendsAndOtherAdjustments + UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic End If 'IS-Impute-00: ADDED 2016-02-27 (No income from discontinued operations total provided, but detailed line items likely provided) If IncomeLossFromDiscontinuedOperationsNetOfTax = 0 Then IncomeLossFromDiscontinuedOperationsNetOfTax = IncomeLossFromDiscontinuedOperationsNetOfTaxDuringPhaseOut + IncomeLossFromDiscontinuedOperationsNetOfTaxGainLossOnDisposal + IncomeLossFromDiscontinuedOperationsNetOfTaxProvisionForGainLossOnDisposal + IncomeLossFromDiscontinuedOperationsNetOfTaxAdjustmentToPriorYearGainLossOnDisposal End If If NetIncomeLossAttributableToNoncontrollingInterest = 0 Then NetIncomeLossAttributableToNoncontrollingInterest = NetIncomeLossAttributableToNonredeemableNoncontrollingInterest + NetIncomeLossAttributableToRedeemableNoncontrollingInterest End If 'IS-Impute-00: (Fix taxes, 2015-07-06) If IncomeTaxExpenseBenefit = 0 and (IncomeTaxExpenseBenefitCurrent <> 0 or IncomeTaxExpenseBenefitDeferred <> 0) Then IncomeTaxExpenseBenefit = IncomeTaxExpenseBenefitCurrent + IncomeTaxExpenseBenefitDeferred End If 'NEW-01: Start from bottom, work up for net income steps If NetIncomeLossAttributableToParent = 0 and NetIncomeLossAvailableToCommonStockholdersBasic <> 0 and PreferredStockDividendsAndOtherAdjustments = 0 Then NetIncomeLossAttributableToParent = NetIncomeLossAvailableToCommonStockholdersBasic End If 'NEW-02: If NetIncomeLoss = 0 and NetIncomeLossAttributableToNoncontrollingInterest = 0 and NetIncomeLossAttributableToParent <> 0 Then NetIncomeLoss = NetIncomeLossAttributableToParent End If 'NEW-03: If NetIncomeLossAvailableToCommonStockholdersBasic = 0 and PreferredStockDividendsAndOtherAdjustments = 0 and NetIncomeLossAttributableToParent <> 0 Then NetIncomeLossAvailableToCommonStockholdersBasic = NetIncomeLossAttributableToParent End If 'NEW-04: If IncomeLossFromContinuingOperationsAfterTax = 0 and NetIncomeLoss <> 0 and IncomeLossFromDiscontinuedOperationsNetOfTax = 0 and ExtraordinaryItemsOfIncomeExpenseNetOfTax = 0 Then IncomeLossFromContinuingOperationsAfterTax = NetIncomeLoss End If 'NEW-05: If IncomeLossFromContinuingOperationsBeforeTax = 0 and IncomeLossFromContinuingOperationsAfterTax <> 0 and IncomeTaxExpenseBenefit = 0 Then IncomeLossFromContinuingOperationsBeforeTax = IncomeLossFromContinuingOperationsAfterTax End If 'NEW-06: If IncomeLossBeforeEquityMethodInvestments = 0 and IncomeLossFromContinuingOperationsBeforeTax <> 0 and IncomeLossFromEquityMethodInvestments = 0 Then IncomeLossBeforeEquityMethodInvestments = IncomeLossFromContinuingOperationsBeforeTax End If 'IS-Impute-01: If NetIncomeLoss = 0 and NetIncomeLossAttributableToParent <> 0 and NetIncomeLossAttributableToNoncontrollingInterest <> 0 Then NetIncomeLoss = NetIncomeLossAttributableToParent + NetIncomeLossAttributableToNoncontrollingInterest End If 'IS-Impute-02: If NetIncomeLossAttributableToParent = 0 and NetIncomeLossAttributableToNoncontrollingInterest <> 0 and NetIncomeLoss <> 0 Then NetIncomeLossAttributableToParent = NetIncomeLoss - NetIncomeLossAttributableToNoncontrollingInterest End If 'IS-Impute-03: If NetIncomeLossAvailableToCommonStockholdersBasic = 0 and PreferredStockDividendsAndOtherAdjustments <> 0 and NetIncomeLossAttributableToParent <> 0 Then NetIncomeLossAvailableToCommonStockholdersBasic = NetIncomeLossAttributableToParent - PreferredStockDividendsAndOtherAdjustments End If 'IS-Impute-04: If NetIncomeLossAttributableToParent = 0 and NetIncomeLossAttributableToNoncontrollingInterest = 0 and NetIncomeLoss <> 0 Then NetIncomeLossAttributableToParent = NetIncomeLoss End If 'IS-Impute-05: If PreferredStockDividendsAndOtherAdjustments = 0 and NetIncomeLossAttributableToParent <> 0 and NetIncomeLossAvailableToCommonStockholdersBasic <> 0 Then PreferredStockDividendsAndOtherAdjustments = NetIncomeLossAttributableToParent - NetIncomeLossAvailableToCommonStockholdersBasic End If 'IS-Impute-06: If NetIncomeLossAvailableToCommonStockholdersBasic = 0 and PreferredStockDividendsAndOtherAdjustments = 0 and NetIncomeLossAttributableToParent <> 0 Then NetIncomeLossAvailableToCommonStockholdersBasic = NetIncomeLossAttributableToParent End If 'IS-Impute-07: If IncomeLossFromContinuingOperationsAfterTax = 0 and NetIncomeLoss <> 0 Then IncomeLossFromContinuingOperationsAfterTax = NetIncomeLoss - IncomeLossFromDiscontinuedOperationsNetOfTax - ExtraordinaryItemsOfIncomeExpenseNetOfTax End If 'IS-Impute-08: If IncomeLossFromContinuingOperationsAfterTax = 0 and IncomeTaxExpenseBenefit <> 0 and IncomeLossFromContinuingOperationsBeforeTax <> 0 Then IncomeLossFromContinuingOperationsAfterTax = IncomeLossFromContinuingOperationsBeforeTax - IncomeTaxExpenseBenefit End If 'IS-Impute-09: If IncomeLossFromContinuingOperationsBeforeTax = 0 and IncomeLossBeforeEquityMethodInvestments <> 0 and IncomeLossFromEquityMethodInvestments <> 0 Then IncomeLossFromContinuingOperationsBeforeTax = IncomeLossBeforeEquityMethodInvestments + IncomeLossFromEquityMethodInvestments End If 'IS-Impute-10: If IncomeLossFromContinuingOperationsBeforeTax = 0 and IncomeLossFromContinuingOperationsAfterTax <> 0 Then IncomeLossFromContinuingOperationsBeforeTax = IncomeLossFromContinuingOperationsAfterTax + IncomeTaxExpenseBenefit End If 'IS-Impute-11: If IncomeLossBeforeEquityMethodInvestments = 0 and IncomeLossFromContinuingOperationsBeforeTax <> 0 and IncomeLossFromEquityMethodInvestments <> 0 Then IncomeLossBeforeEquityMethodInvestments = IncomeLossFromContinuingOperationsBeforeTax - IncomeLossFromEquityMethodInvestments End If 'IS-Impute-12: If Revenues = 0 and GrossProfit <> 0 and CostOfRevenue <> 0 Then Revenues = GrossProfit + CostOfRevenue End If 'IS-Impute-13: If CostOfRevenue = 0 and GrossProfit <> 0 and Revenues <> 0 Then CostOfRevenue = Revenues - GrossProfit End If 'IS-Impute-14: If GrossProfit = 0 and Revenues <> 0 and CostOfRevenue <> 0 Then GrossProfit = Revenues - CostOfRevenue End If 'IS-Impute-15: If CostsAndExpenses = 0 and CostOfRevenue <> 0 and OperatingExpenses <> 0 Then CostsAndExpenses = CostOfRevenue + OperatingExpenses End If 'IS-Impute-16: OperatingExpensesPlusOtherOperatingIncomeExpenses is a DEBIT OperatingExpensesPlusOtherOperatingIncomeExpenses = 0 If OperatingExpensesPlusOtherOperatingIncomeExpenses = 0 and GrossProfit <> 0 and OperatingIncomeLoss <> 0 Then OperatingExpensesPlusOtherOperatingIncomeExpenses = GrossProfit - OperatingIncomeLoss End If 'IS-Impute-17: If CostsAndExpenses = 0 and GrossProfit = 0 and Revenues <> 0 and OperatingIncomeLoss <> 0 and OtherOperatingIncomeExpenses <> 0 Then CostsAndExpenses = Revenues - OperatingIncomeLoss + OtherOperatingIncomeExpenses End If 'IS-Impute-18: If OperatingExpenses = 0 and CostOfRevenue <> 0 and CostsAndExpenses <> 0 Then OperatingExpenses = CostsAndExpenses - CostOfRevenue End If 'IS-Impute-19: This seems to have little to no effect If CostOfRevenue = 0 and Revenues <> 0 and GrossProfit = 0 and (Revenues - CostsAndExpenses = OperatingIncomeLoss) and OperatingExpenses = 0 and OtherOperatingIncomeExpenses = 0 Then CostOfRevenue = CostsAndExpenses - OperatingExpenses End If 'IS-Impute-20: If InterestAndDebtExpense = 0 and OperatingIncomeLoss <> 0 and NonoperatingIncomeLoss <> 0 and IncomeLossBeforeEquityMethodInvestments <> 0 Then InterestAndDebtExpense = IncomeLossBeforeEquityMethodInvestments - (OperatingIncomeLoss + NonoperatingIncomeLoss) End If 'IS-Impute-21: If OtherOperatingIncomeExpenses = 0 and GrossProfit <> 0 and OperatingExpenses <> 0 and OperatingIncomeLoss <> 0 and OperatingIncomeLoss <> (GrossProfit - OperatingExpenses + OtherOperatingIncomeExpenses) Then OtherOperatingIncomeExpenses = OperatingIncomeLoss - (GrossProfit - OperatingExpenses) End If 'IS-Impute-22: Seemst to have little impact If OperatingIncomeLoss = 0 and IncomeLossBeforeEquityMethodInvestments <> 0 and NonoperatingIncomeLoss <> 0 and InterestAndDebtExpense <> 0 Then OperatingIncomeLoss = IncomeLossBeforeEquityMethodInvestments - NonoperatingIncomeLoss + InterestAndDebtExpense End If 'IS-Impute-23: If NonoperatingIncomeLossPlusInterestAndDebtExpense = 0 and NonoperatingIncomeLoss <> 0 and InterestAndDebtExpense <> 0 Then NonoperatingIncomeLossPlusInterestAndDebtExpense = NonoperatingIncomeLoss - InterestAndDebtExpense End If 'IS-Impute-24: 'The line items were not reported, but both sides of the equation were reported If NonoperatingIncomeLossPlusInterestAndDebtExpense = 0 and OperatingIncomeLoss <> 0 and IncomeLossBeforeEquityMethodInvestments <> 0 Then NonoperatingIncomeLossPlusInterestAndDebtExpense = IncomeLossBeforeEquityMethodInvestments - OperatingIncomeLoss End If 'IS-Impute-25: If NonoperatingIncomeLossPlusInterestAndDebtExpense = 0 and NonoperatingIncomeLoss <> 0 and InterestAndDebtExpense = 0 Then NonoperatingIncomeLossPlusInterestAndDebtExpense = NonoperatingIncomeLoss End If 'IS-Impute-26: CHANGED THIS, reversed interest and debt expense, added the multiplication by negative 1 If NonoperatingIncomeLossPlusInterestAndDebtExpense = 0 and NonoperatingIncomeLoss = 0 and InterestAndDebtExpense <> 0 Then NonoperatingIncomeLossPlusInterestAndDebtExpense = InterestAndDebtExpense * -1 End If 'IS-Impute-27: If IncomeLossFromEquityMethodInvestments <> 0 and OperatingIncomeLoss <> 0 and IncomeLossBeforeEquityMethodInvestments <> 0 Then NonoperatingIncomePlusInterestAndDebtExpensePlusIncomeFromEquityMethodInvestments = NonoperatingIncomeLossPlusInterestAndDebtExpense + IncomeLossFromEquityMethodInvestments End If 'IS-Impute-28: Changed this from NEGATIVE income from equity method investments to POSITIVE If NonoperatingIncomePlusInterestAndDebtExpensePlusIncomeFromEquityMethodInvestments = 0 and IncomeLossFromEquityMethodInvestments <> 0 Then NonoperatingIncomePlusInterestAndDebtExpensePlusIncomeFromEquityMethodInvestments = NonoperatingIncomeLossPlusInterestAndDebtExpense + IncomeLossFromEquityMethodInvestments End If 'IS-Impute-29: If IncomeLossBeforeEquityMethodInvestments = 0 and IncomeLossFromEquityMethodInvestments = 0 Then IncomeLossBeforeEquityMethodInvestments = IncomeLossFromContinuingOperationsBeforeTax End If 'IS-Impute-30: If NonoperatingIncomeLossPlusInterestAndDebtExpense = 0 and NonoperatingIncomeLoss = 0 and InterestAndDebtExpense = 0 Then NonoperatingIncomeLossPlusInterestAndDebtExpense = IncomeLossBeforeEquityMethodInvestments - OperatingIncomeLoss End If 'NOTE: THIS IS A NEW VARIABLE WHICH SHOULD BE ADDED TO THE HTML! 'IS-Impute-31: Added to FORCE a total for operating expenses, costs and expenses, and/or other operating income expense 'OperatingExpensesPlusOtherOperatingIncomeExpenses is a DEBIT and set above If OperatingExpenses = 0 and CostsAndExpenses = 0 and OtherOperatingIncomeExpenses = 0 and GrossProfit <> 0 and OperatingIncomeLoss <> 0 and OperatingIncomeLoss <> (GrossProfit - OperatingExpenses + OtherOperatingIncomeExpenses) Then OtherOperatingIncomeExpenses = OperatingExpensesPlusOtherOperatingIncomeExpenses * -1 End If 'IS-Impute-34: If CostsAndExpenses = 0 and CostOfRevenue = 0 and OperatingExpenses <> 0 Then CostsAndExpenses = OperatingExpenses End If 'IS-Impute-51: ADDED If GrossProfit <> 0 and IncomeLossBeforeEquityMethodInvestments <> 0 Then OperatingExpensesPlusOtherOperatingIncomeExpensesPlusNonoperatingIncomeLossPlusInterestAndDebtExpensePlusIncomeLossFromEquityMethodInvestments = GrossProfit - IncomeLossBeforeEquityMethodInvestments End If 'IS-Impute-55: ADDED 2015-06-02 when no line items exist above operating income loss If Revenues = 0 and GrossProfit = 0 and CostOfRevenue = 0 and OperatingExpenses = 0 and CostsAndExpenses = 0 and OtherOperatingIncomeExpenses = 0 and OperatingIncomeLoss <> 0 Then OtherOperatingIncomeExpenses = OperatingIncomeLoss End If 'IS-Impute-99-1: Added 2015-11-12 (Deals with noncontrolling interests that are made up of multiple line items) If NetIncomeLossAttributableToNoncontrollingInterest = 0 and NetIncomeLoss <> 0 and NetIncomeLossAttributableToParent <> 0 and EquityAttributableToNoncontrollingInterest <> 0 Then NetIncomeLossAttributableToNoncontrollingInterest = NetIncomeLoss - NetIncomeLossAttributableToParent End If NonoperatingIncomeLossPlusInterestAndDebtExpensePlusIncomeLossFromEquityMethodInvestments = NonoperatingIncomeLossPlusInterestAndDebtExpense + IncomeLossFromEquityMethodInvestments 'Income statement checks CheckGrossProfitToOperatingIncomeLoss = OperatingExpenses - OtherOperatingIncomeExpenses CheckGrossProfitToIncomeFromContinuingOperationsBeforeTax = OperatingExpenses - OtherOperatingIncomeExpenses - NonoperatingIncomeLoss + InterestAndDebtExpense - IncomeLossFromEquityMethodInvestments CheckSpecialReportingItems = IncomeLossFromDiscontinuedOperationsNetOfTax + ExtraordinaryItemsOfIncomeExpenseNetOfTax CheckIncomeTaxes = IncomeLossFromContinuingOperationsBeforeTax - IncomeLossFromContinuingOperationsAfterTax CheckSingleStepOperatingIncomeLoss = Revenues - CostsAndExpenses CheckMultiStepOperatingIncomeLoss = GrossProfit - OperatingExpenses + OtherOperatingIncomeExpenses CheckNonoperatingItems = NonoperatingIncomeLoss + IncomeLossBeforeEquityMethodInvestments - InterestAndDebtExpense CheckOperatingItems = OperatingExpenses - OtherOperatingIncomeExpenses 'Determine if income statement is multi-step or single-step, IsMultiStepIncomeStatement is not ZERO when gross profit is reported IsMultiStepIncomeStatement = GrossProfit 'VERIFICATION RULES: Income statement IS1 = GrossProfit - (Revenues - CostOfRevenue) IS2 = OperatingIncomeLoss - (GrossProfit - OperatingExpenses + OtherOperatingIncomeExpenses) IS3 = IncomeLossBeforeEquityMethodInvestments - (OperatingIncomeLoss + NonoperatingIncomeLossPlusInterestAndDebtExpense) IS4 = IncomeLossFromContinuingOperationsBeforeTax - (IncomeLossBeforeEquityMethodInvestments + IncomeLossFromEquityMethodInvestments) IS5 = IncomeLossFromContinuingOperationsAfterTax - (IncomeLossFromContinuingOperationsBeforeTax - IncomeTaxExpenseBenefit) IS6 = NetIncomeLoss - (IncomeLossFromContinuingOperationsAfterTax + IncomeLossFromDiscontinuedOperationsNetOfTax + ExtraordinaryItemsOfIncomeExpenseNetOfTax) IS7 = NetIncomeLoss - (NetIncomeLossAttributableToParent + NetIncomeLossAttributableToNoncontrollingInterest) IS8 = NetIncomeLossAvailableToCommonStockholdersBasic - (NetIncomeLossAttributableToParent - PreferredStockDividendsAndOtherAdjustments) 'ADDED TO TRY TO FIX ISSUE WITH IS2 (This seems to work, but impacts a small number of filings) If IS2 <> 0 and OperatingIncomeLoss <> 0 and GrossProfit <> 0 and OtherOperatingIncomeExpenses <> 0 and OperatingExpenses = 0 and (GrossProfit - OperatingIncomeLoss) + OtherOperatingIncomeExpenses = (IS2 * -1) Then OperatingExpenses = (GrossProfit - OperatingIncomeLoss) + OtherOperatingIncomeExpenses IS2 = 0 End If 'END OF WHAT WAS ADDED TO FIX IS2 If IsMultiStepIncomeStatement = 0 Then 'Single-step only IS11 = OperatingIncomeLoss - (Revenues - CostsAndExpenses + OtherOperatingIncomeExpenses) Else IS11 = 0 End If IS12 = CostsAndExpenses - (CostOfRevenue + OperatingExpenses) IS13 = OperatingExpensesPlusOtherOperatingIncomeExpenses - (OperatingExpenses - OtherOperatingIncomeExpenses) IS14 = OperatingExpensesPlusOtherOperatingIncomeExpensesPlusNonoperatingIncomeLossPlusInterestAndDebtExpensePlusIncomeLossFromEquityMethodInvestments - (OperatingExpenses - OtherOperatingIncomeExpenses - NonoperatingIncomeLoss + InterestAndDebtExpense - IncomeLossFromEquityMethodInvestments) 'ADDED TO FIX IS4: If the amount that test IS4 is off is equal to income from equity method investments that means the filer put income from equity method investments somewhere else If IS4 = (IncomeLossFromEquityMethodInvestments * -1) Then IS4 = 0 End If 'This probably does not impact this report frame because operating income (loss) is always reported 'ADDED TO FIX IS3: 'IS-Impute-61: ADDED to fix IS3 If OperatingIncomeLoss = 0 and IS3 = IS11 * -1 Then OperatingIncomeLoss = Revenues - CostsAndExpenses IS3 = 0 IS11 = 0 End If 'ADDED 2014-11-28 TO TRY TO FIX ISSUE IS2 If IS2 <> 0 and (GrossProfit - OperatingExpenses + OtherOperatingIncomeExpenses) = OperatingIncomeLoss Then 'OperatingIncomeLoss was not reported but it can be computed. IS2 = OperatingIncomeLoss - (GrossProfit - OperatingExpenses + OtherOperatingIncomeExpenses) Else 'Do nothing End If If IS2 <> 0 and (Revenues - CostsAndExpenses + OtherOperatingIncomeExpenses) = OperatingIncomeLoss Then 'OperatingIncomeLoss was not reported but it can be computed. IS2 = OperatingIncomeLoss - (Revenues - CostsAndExpenses + OtherOperatingIncomeExpenses) Else 'Do nothing End If 'END OF WHAT WAS ADDED TO FIX IS2 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 211-Net Income (Loss) Breakdown (http://www.xbrlsite.com/2014/Protototype/fac/NetIncomeLossBreakdown) 'Empty 'Reviewed 2015-11-13 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 212-Net Income (Loss) Available to Common Breakdown (http://www.xbrlsite.com/2014/Protototype/fac/NetIncomeLossAvailableToCommonBreakdown) 'Empty 'Reviewed 2015-11-13 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 301-Statement of Comprehensive Income (http://www.xbrlsite.com/2014/Protototype/fac/StatementOfComprehensiveIncome) 'Statement of comprehensive income 'Reviewed 2015-11-13 'IS-Impute-201: If ComprehensiveIncomeLossAttributableToParent = 0 and ComprehensiveIncomeLossAttributableToNoncontrollingInterest = 0 and ComprehensiveIncomeLoss <> 0 Then ComprehensiveIncomeLossAttributableToParent = ComprehensiveIncomeLoss End If 'IS-Impute-202: If ComprehensiveIncomeLossAttributableToParent = 0 and ComprehensiveIncomeLossAttributableToNoncontrollingInterest <> 0 and ComprehensiveIncomeLoss <> 0 Then ComprehensiveIncomeLossAttributableToParent = ComprehensiveIncomeLoss - ComprehensiveIncomeLossAttributableToNoncontrollingInterest End If 'IS-Impute-203: If ComprehensiveIncomeLoss = 0 and ComprehensiveIncomeLossAttributableToNoncontrollingInterest <> 0 and ComprehensiveIncomeLossAttributableToParent <> 0 Then ComprehensiveIncomeLoss = ComprehensiveIncomeLossAttributableToParent + ComprehensiveIncomeLossAttributableToNoncontrollingInterest End If 'IS-Impute-204: If ComprehensiveIncomeLoss = 0 and ComprehensiveIncomeLossAttributableToNoncontrollingInterest = 0 and ComprehensiveIncomeLossAttributableToParent <> 0 Then ComprehensiveIncomeLoss = ComprehensiveIncomeLossAttributableToParent End If 'IS-Impute-205: If ComprehensiveIncomeLossAttributableToNoncontrollingInterest = 0 and ComprehensiveIncomeLoss <> 0 and ComprehensiveIncomeLossAttributableToParent <> 0 Then ComprehensiveIncomeLossAttributableToNoncontrollingInterest = ComprehensiveIncomeLoss - ComprehensiveIncomeLossAttributableToParent End If 'IS-Impute-206: If ComprehensiveIncomeLoss = 0 and ComprehensiveIncomeLossAttributableToParent = 0 and ComprehensiveIncomeLossAttributableToNoncontrollingInterest = 0 and OtherComprehensiveIncomeLoss = 0 Then ComprehensiveIncomeLoss = NetIncomeLoss End If 'IS-Impute-207: If OtherComprehensiveIncomeLoss = 0 and ComprehensiveIncomeLoss <> 0 Then OtherComprehensiveIncomeLoss = ComprehensiveIncomeLoss - NetIncomeLoss End If 'IS-Impute-208: If ComprehensiveIncomeLossAttributableToParent = 0 and ComprehensiveIncomeLossAttributableToNoncontrollingInterest = 0 and ComprehensiveIncomeLoss <> 0 Then ComprehensiveIncomeLossAttributableToParent = ComprehensiveIncomeLoss End If 'IS-Impute-209: If ComprehensiveIncomeLossAttributableToNoncontrollingInterest = 0 and ComprehensiveIncomeLossAttributableToParent <> 0 and ComprehensiveIncomeLoss <> 0 Then ComprehensiveIncomeLossAttributableToNoncontrollingInterest = ComprehensiveIncomeLoss - ComprehensiveIncomeLossAttributableToParent End If 'VERIFICATION RULES: Statement of comprehensive income IS9 = ComprehensiveIncomeLoss - (ComprehensiveIncomeLossAttributableToParent + ComprehensiveIncomeLossAttributableToNoncontrollingInterest) IS10 = ComprehensiveIncomeLoss - (NetIncomeLoss + OtherComprehensiveIncomeLoss) 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 311-Comprehensive Income (Loss) Breakdown (http://www.xbrlsite.com/2014/Protototype/fac/ComprehensiveIncomeBreakdown) 'Empty 'Reviewed 2015-11-13 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 401-Cash Flow Statement (http://www.xbrlsite.com/2014/Protototype/fac/CashFlowStatement) 'Cash flow statement (exchange gains included in net cash flow) 'Reviewed 2015-11-13 'Refactored version 'CF-Impute-101: Added 2015-11-12 If total discontinued is reported but detail is not, assume total is operating If NetCashFlowFromOperatingActivitiesDiscontinued = 0 and NetCashFlowFromInvestingActivitiesDiscontinued = 0 and NetCashFlowFromFinancingActivitiesDiscontinued = 0 and NetCashFlowDiscontinued <> 0 Then NetCashFlowFromOperatingActivitiesDiscontinued = NetCashFlowDiscontinued End If 'CF-Impute-102: If NetCashFlowFromOperatingActivitiesContinuing = 0 and NetCashFlowFromOperatingActivities <> 0 Then NetCashFlowFromOperatingActivitiesContinuing = NetCashFlowFromOperatingActivities - NetCashFlowFromOperatingActivitiesDiscontinued End If 'CF-Impute-103: If NetCashFlowFromInvestingActivitiesContinuing = 0 and NetCashFlowFromInvestingActivities <> 0 Then NetCashFlowFromInvestingActivitiesContinuing = NetCashFlowFromInvestingActivities - NetCashFlowFromInvestingActivitiesDiscontinued End If 'CF-Impute-104: If NetCashFlowFromFinancingActivitiesContinuing = 0 and NetCashFlowFromFinancingActivities <> 0 Then NetCashFlowFromFinancingActivitiesContinuing = NetCashFlowFromFinancingActivities - NetCashFlowFromFinancingActivitiesDiscontinued End If 'CF-Impute-105: If NetCashFlowFromOperatingActivities = 0 Then NetCashFlowFromOperatingActivities = NetCashFlowFromOperatingActivitiesContinuing + NetCashFlowFromOperatingActivitiesDiscontinued End If 'CF-Impute-106: If NetCashFlowFromInvestingActivities = 0 Then NetCashFlowFromInvestingActivities = NetCashFlowFromInvestingActivitiesContinuing + NetCashFlowFromInvestingActivitiesDiscontinued End If 'CF-Impute-107: If NetCashFlowFromFinancingActivities = 0 Then NetCashFlowFromFinancingActivities = NetCashFlowFromFinancingActivitiesContinuing + NetCashFlowFromFinancingActivitiesDiscontinued End If 'CF-Impute-108: If NetCashFlowDiscontinued = 0 Then NetCashFlowDiscontinued = NetCashFlowFromOperatingActivitiesDiscontinued + NetCashFlowFromInvestingActivitiesDiscontinued + NetCashFlowFromFinancingActivitiesDiscontinued End If 'CF-Impute-109: 'CF-Impute-NEW during refactoring: If NetCashFlowContinuing = 0 and NetCashFlow <> 0 Then NetCashFlowContinuing = NetCashFlow - NetCashFlowDiscontinued - ExchangeGainsLosses End If 'CF-Impute-110: 'CF-Impute-NEW2 during refactoring: If NetCashFlow = 0 and NetCashFlowContinuing <> 0 Then NetCashFlow = NetCashFlowContinuing + NetCashFlowDiscontinued + ExchangeGainsLosses End If 'CF-Impute-111: Added 2015-11-05 If NetCashFlowFromInvestingActivitiesContinuing = 0 and NetCashFlowFromOperatingActivitiesContinuing <> 0 and NetCashFlowFromFinancingActivitiesContinuing <> 0 and (NetCashFlowContinuing - (NetCashFlowFromOperatingActivitiesContinuing + NetCashFlowFromInvestingActivitiesContinuing + NetCashFlowFromFinancingActivitiesContinuing) <> 0) Then NetCashFlowFromInvestingActivitiesContinuing = NetCashFlowContinuing - (NetCashFlowFromOperatingActivitiesContinuing + NetCashFlowFromFinancingActivitiesContinuing) End If 'CF-Impute-112: Added 2015-11-05 If NetCashFlowFromFinancingActivitiesContinuing = 0 and NetCashFlowFromOperatingActivitiesContinuing <> 0 and NetCashFlowFromInvestingActivitiesContinuing <> 0 and (NetCashFlowContinuing - (NetCashFlowFromOperatingActivitiesContinuing + NetCashFlowFromInvestingActivitiesContinuing + NetCashFlowFromFinancingActivitiesContinuing) <> 0) Then NetCashFlowFromFinancingActivitiesContinuing = NetCashFlowContinuing - (NetCashFlowFromOperatingActivitiesContinuing + NetCashFlowFromInvestingActivitiesContinuing) End If 'CF-Impute-113: Added 2015-11-05 If NetCashFlowFromInvestingActivities = 0 and NetCashFlowFromOperatingActivities <> 0 and NetCashFlowFromFinancingActivities <> 0 and (NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses) <> 0) Then NetCashFlowFromInvestingActivities = NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses) End If 'CF-Impute-114: Added 2015-11-05 If NetCashFlowFromFinancingActivities = 0 and NetCashFlowFromOperatingActivities <> 0 and NetCashFlowFromInvestingActivities <> 0 and (NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses) <> 0) Then NetCashFlowFromFinancingActivities = NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + ExchangeGainsLosses) End If 'CF-Impute-115: If NetCashFlowContinuing = 0 Then NetCashFlowContinuing = NetCashFlowFromOperatingActivitiesContinuing + NetCashFlowFromInvestingActivitiesContinuing + NetCashFlowFromFinancingActivitiesContinuing End If 'CF-Impute-116: If NetCashFlowFromOperatingActivities = 0 and NetCashFlowFromOperatingActivitiesContinuing <> 0 and NetCashFlowFromOperatingActivitiesDiscontinued = 0 Then NetCashFlowFromOperatingActivities = NetCashFlowFromOperatingActivitiesContinuing End If 'CF-Impute-117: If NetCashFlowFromInvestingActivities = 0 and NetCashFlowFromInvestingActivitiesContinuing <> 0 and NetCashFlowFromInvestingActivitiesDiscontinued = 0 Then NetCashFlowFromInvestingActivities = NetCashFlowFromInvestingActivitiesContinuing End If 'CF-Impute-118: If NetCashFlowFromFinancingActivities = 0 and NetCashFlowFromFinancingActivitiesContinuing <> 0 and NetCashFlowFromFinancingActivitiesDiscontinued = 0 Then NetCashFlowFromFinancingActivities = NetCashFlowFromFinancingActivitiesContinuing End If 'CF-Impute-119: Added 2016-12-12 If NetCashFlowFromInvestingActivitiesContinuing = 0 and NetCashFlowFromInvestingActivitiesDiscontinued = 0 and NetCashFlowFromInvestingActivities <> 0 Then NetCashFlowFromInvestingActivitiesContinuing = NetCashFlowFromInvestingActivities End If 'CF-Impute-120: Added 2016-12-12 If NetCashFlowFromFinancingActivitiesContinuing = 0 and NetCashFlowFromFinancingActivitiesDiscontinued = 0 and NetCashFlowFromFinancingActivities <> 0 Then NetCashFlowFromFinancingActivitiesContinuing = NetCashFlowFromFinancingActivities End If 'CF-Impute-121: Added 2015-11-05 If NetCashFlow = 0 and NetCashFlowContinuing <> 0 and NetCashFlowDiscontinued = 0 and NetCashFlowFromOperatingActivitiesDiscontinued = 0 and NetCashFlowFromInvestingActivitiesDiscontinued = 0 and NetCashFlowFromFinancingActivitiesDiscontinued = 0 and ExchangeGainsLosses = 0 Then NetCashFlow = NetCashFlowContinuing End If 'CF-Impute-122: If NetCashFlow = 0 and (NetCashFlowFromOperatingActivities <> 0 or NetCashFlowFromInvestingActivities <> 0 or NetCashFlowFromFinancingActivities <> 0) Then NetCashFlow = NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses End If 'CF-Impute-123: If NetCashFlow = 0 and NetCashFlowContinuing <> 0 and NetCashFlowDiscontinued <> 0 Then NetCashFlow = NetCashFlowContinuing + NetCashFlowDiscontinued + ExchangeGainsLosses End If 'VERIFICATION RULES: Cash flow statement CF1 = NetCashFlow - (NetCashFlowFromOperatingActivities + NetCashFlowFromInvestingActivities + NetCashFlowFromFinancingActivities + ExchangeGainsLosses) 'CF2 = NetCashFlowContinuing - (NetCashFlowFromOperatingActivitiesContinuing + NetCashFlowFromInvestingActivitiesContinuing + NetCashFlowFromFinancingActivitiesContinuing) CF2 = NetCashFlow - (NetCashFlowContinuing + NetCashFlowDiscontinued + ExchangeGainsLosses) CF3 = NetCashFlowDiscontinued - (NetCashFlowFromOperatingActivitiesDiscontinued + NetCashFlowFromInvestingActivitiesDiscontinued + NetCashFlowFromFinancingActivitiesDiscontinued) CF4 = NetCashFlowFromOperatingActivities - (NetCashFlowFromOperatingActivitiesContinuing + NetCashFlowFromOperatingActivitiesDiscontinued) CF5 = NetCashFlowFromInvestingActivities - (NetCashFlowFromInvestingActivitiesContinuing + NetCashFlowFromInvestingActivitiesDiscontinued) CF6 = NetCashFlowFromFinancingActivities - (NetCashFlowFromFinancingActivitiesContinuing + NetCashFlowFromFinancingActivitiesDiscontinued) 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 411.1-Net Cash Flow Breakdown (http://www.xbrlsite.com/2014/Protototype/fac/NetCashFlowBreakdown) 'Empty 'Reviewed 2015-11-13 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 420.1-Continuing and Discontinued Net Cash Flow Breakdown (http://www.xbrlsite.com/2014/Protototype/fac/ContinuingDiscontuedBreakdown) 'Empty 'Reviewed 2015-11-13 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 501-Key Ratios (http://www.xbrlsite.com/2014/Protototype/fac/KeyRatios) 'Key ratios 'Reviewed 2015-11-13 If (Assets <> 0) and (Equity <> 0) and (Revenues <> 0) Then SustainableGrowthRate = ((NetIncomeLoss / Revenues) * (1+((Assets - Equity) / Equity))) / ((1 / (Revenues / Assets))-(((NetIncomeLoss / Revenues) * (1+(((Assets - Equity) / Equity)))))) End If If Assets <> 0 Then ReturnOnAssets = NetIncomeLoss / Assets End If If Equity <> 0 Then ReturnOnEquity = NetIncomeLoss / Equity End If If Revenues <> 0 Then ReturnOnSales = NetIncomeLoss / Revenues End If 'XXXXXXXXXXXXXXXXXXXXXXXX NETWORK: 601.2-Validation Results (No IS11) (http://www.xbrlsite.com/2014/Protototype/fac/ValidationResults2) 'Empty 'Reviewed 2015-11-13 'END OF FILE