#!/usr/bin/env -S uv run python """Separate Harbor's cash, noncash, and accrual amounts without dependencies.""" def money(amount: float) -> str: return f"(${abs(amount):,.0f})" if amount < 0 else f"${amount:,.0f}" def show(label: str, amount: float) -> None: print(f"{label:<48} {money(amount):>16}") print("HARBOR — ACQUISITION CLOSING BRIDGE") cash_consideration = 450_000 cash_acquired = 50_000 stock_consideration = 150_000 net_acquisition_cash_used = cash_consideration - cash_acquired show("Cash consideration transferred", cash_consideration) show("Less: cash acquired", -cash_acquired) show("Net acquisition cash used", -net_acquisition_cash_used) show("Stock consideration — noncash", stock_consideration) print("\nHARBOR — DISPOSAL CLOSING BRIDGE") cash_proceeds = 300_000 cash_divested = 20_000 net_disposal_cash_provided = cash_proceeds - cash_divested show("Cash proceeds received", cash_proceeds) show("Less: cash divested", -cash_divested) show("Net disposal cash provided", net_disposal_cash_provided) print("The disposal gain is an accrual result, not a cash-flow input.") print("\nHARBOR — GROSS FINANCING") borrowing_proceeds = 500_000 principal_repayments = 200_000 dividends_and_award_withholding = 80_000 financing_cash_flow = ( borrowing_proceeds - principal_repayments - dividends_and_award_withholding ) show("Gross borrowing proceeds", borrowing_proceeds) show("Gross principal repayments", -principal_repayments) show("Dividends and award withholding", -dividends_and_award_withholding) show("Net financing cash flow", financing_cash_flow) print("\nHARBOR — NONCASH ACTIVITY") noncash_events = { "Stock consideration": stock_consideration, "Equipment acquired by issuing a note": 90_000, "Lease commencement": 60_000, } for name, amount in noncash_events.items(): show(name, amount) show("Total noncash activity", sum(noncash_events.values())) print("\nHARBOR — FULL STATEMENT CONTROL") operating_cash_flow = 100_000 other_investing = -200_000 investing_cash_flow = ( other_investing - net_acquisition_cash_used + net_disposal_cash_provided ) net_change = operating_cash_flow + investing_cash_flow + financing_cash_flow opening_population = 1_000_000 ending_population = 1_000_000 show("Operating cash flow", operating_cash_flow) show("Investing cash flow", investing_cash_flow) show("Financing cash flow", financing_cash_flow) show("Net change", net_change) show("Population difference", opening_population + net_change - ending_population) assert net_acquisition_cash_used == 400_000 assert net_disposal_cash_provided == 280_000 assert investing_cash_flow == -320_000 assert financing_cash_flow == 220_000 assert net_change == 0 assert sum(noncash_events.values()) == 300_000 print("\nAll arithmetic controls pass. Classification and deal judgments are supplied.")