-- | Get first amount from record, if any
getRAmount :: Ext Record -> Maybe Amount
getRAmount r =
  case getContent r of
    Transaction (TEntry (UEntry dt cr _ _)) ->
      Just $ head $ map postingValue dt ++ map postingValue cr
    Transaction (TReconciliate _ _ x _ _) -> Just x
    _ -> Nothing
getRAmount :: Ext Record -> Maybe Amount
getRAmount r =
  case getContent r of
    Transaction (TEntry (UEntry dt cr _ _)) ->
      Just $ head $ map postingValue dt ++ map postingValue cr
    Transaction (TReconciliate _ _ x _ _) -> Just x
    _ -> Nothing
getRAmount r =
  case getContent r of
    Transaction (TEntry (UEntry dt cr _ _)) ->
      Just $ head $ map postingValue dt ++ map postingValue cr
    Transaction (TReconciliate _ _ x _ _) -> Just x
    _ -> Nothing