Cost
public class Cost
extension Cost: CustomStringConvertible
extension Cost: Equatable
extension Cost: Hashable
Cost of a posting
-
Amount
Declaration
Swift
public let amount: Amount?
-
Optional date to identify a lot in the inventory - if no date is set for positive amount, the transactions date is used
Declaration
Swift
public let date: Date?
-
Optional label to identify a lot in the inventory
Declaration
Swift
public let label: String?
-
String to describe the cost in the ledger file
Declaration
Swift
public var description: String { get }
-
Compares two
Cost
sDeclaration
Swift
public static func == (lhs: Cost, rhs: Cost) -> Bool
Parameters
lhs
first cost
rhs
second const
Return Value
True if the costs are the same, false otherwise
-
Declaration
Swift
public func hash(into hasher: inout Hasher)