|
@ -18,7 +18,8 @@ class WalletStatementTableViewCell: UITableViewCell { |
|
|
@IBOutlet weak var dateLabel: UILabel! |
|
|
@IBOutlet weak var dateLabel: UILabel! |
|
|
@IBOutlet weak var particularLabel: UILabel! |
|
|
@IBOutlet weak var particularLabel: UILabel! |
|
|
@IBOutlet weak var closingAmountLabel: UILabel! |
|
|
@IBOutlet weak var closingAmountLabel: UILabel! |
|
|
@IBOutlet weak var walletInOutLabel: UILabel! |
|
|
|
|
|
|
|
|
@IBOutlet weak var amtLabelStackView: UIStackView! |
|
|
|
|
|
|
|
|
@IBOutlet weak var walletAmountLabel: UILabel! |
|
|
@IBOutlet weak var walletAmountLabel: UILabel! |
|
|
|
|
|
|
|
|
var model: WalletStatement? |
|
|
var model: WalletStatement? |
|
@ -27,15 +28,25 @@ class WalletStatementTableViewCell: UITableViewCell { |
|
|
self.dateLabel.text = model?.transactionDate |
|
|
self.dateLabel.text = model?.transactionDate |
|
|
self.particularLabel.text = model?.particular |
|
|
self.particularLabel.text = model?.particular |
|
|
self.closingAmountLabel.text = model?.closingAmount |
|
|
self.closingAmountLabel.text = model?.closingAmount |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let type: WalletInOutType = (model?.walletOut ?? "") == "₩0" ? .walletIn : .walletOut |
|
|
let type: WalletInOutType = (model?.walletOut ?? "") == "₩0" ? .walletIn : .walletOut |
|
|
self.walletAmountLabel.layer.cornerRadius = 4 |
|
|
self.walletAmountLabel.layer.cornerRadius = 4 |
|
|
self.walletAmountLabel.clipsToBounds = true |
|
|
self.walletAmountLabel.clipsToBounds = true |
|
|
walletAmountLabel.textColor = .white |
|
|
walletAmountLabel.textColor = .white |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch type { |
|
|
switch type { |
|
|
case .walletIn: |
|
|
case .walletIn: |
|
|
|
|
|
if (model?.particular ?? "").lowercased() == "Balance Brought Forward".lowercased() { |
|
|
|
|
|
self.walletAmountLabel.text = "" |
|
|
|
|
|
self.walletAmountLabel.backgroundColor = AppConstants.themWhiteColor |
|
|
|
|
|
}else { |
|
|
self.walletAmountLabel.backgroundColor = AppConstants.themeBlueColor |
|
|
self.walletAmountLabel.backgroundColor = AppConstants.themeBlueColor |
|
|
self.walletAmountLabel.text = "IN: \(model?.walletIn ?? "")" |
|
|
|
|
|
|
|
|
self.walletAmountLabel.text = "IN: \(self.model?.walletIn ?? "")" |
|
|
|
|
|
} |
|
|
case .walletOut: |
|
|
case .walletOut: |
|
|
self.walletAmountLabel.backgroundColor = AppConstants.themeRedColor |
|
|
self.walletAmountLabel.backgroundColor = AppConstants.themeRedColor |
|
|
self.walletAmountLabel.text = "OUT: \(model?.walletOut ?? "")" |
|
|
self.walletAmountLabel.text = "OUT: \(model?.walletOut ?? "")" |
|
|