TaxCalculator
public enum TaxCalculator
Utility to generate tax relevant data from a Ledger
It relies heavily on meta data in the ledger.
-
Gets all taxable sales from the ledger for a specific year
Declaration
Swift
public static func getTaxableSales(from ledger: Ledger, for year: Int) throws -> [Sale]
Parameters
ledger
ledger to get the transactions from
year
tax year
Return Value
Array of all sales