From c1913f0f6db68522b7207f5e2c0a00e4c37f82d1 Mon Sep 17 00:00:00 2001 From: gme_2 Date: Thu, 4 Oct 2018 11:48:24 +0900 Subject: [PATCH] handled for first opening balance --- .../View/LoginViewController.swift | 2 +- .../Cell/WalletStatementTableViewCell.swift | 17 ++++++++++++++--- .../View/WalletStatement.storyboard | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift b/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift index 1e7fe37a..0fa2ce9e 100644 --- a/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift +++ b/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift @@ -62,7 +62,7 @@ class LoginViewController: UIViewController { private func setup() { // all setup should be done here setupNavBar() - showAnimation() +// showAnimation() } func showAnimation() { diff --git a/GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift b/GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift index 1ff99762..5eee4ce2 100644 --- a/GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift +++ b/GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift @@ -18,7 +18,8 @@ class WalletStatementTableViewCell: UITableViewCell { @IBOutlet weak var dateLabel: UILabel! @IBOutlet weak var particularLabel: UILabel! @IBOutlet weak var closingAmountLabel: UILabel! - @IBOutlet weak var walletInOutLabel: UILabel! + @IBOutlet weak var amtLabelStackView: UIStackView! + @IBOutlet weak var walletAmountLabel: UILabel! var model: WalletStatement? @@ -27,15 +28,25 @@ class WalletStatementTableViewCell: UITableViewCell { self.dateLabel.text = model?.transactionDate self.particularLabel.text = model?.particular self.closingAmountLabel.text = model?.closingAmount + + + let type: WalletInOutType = (model?.walletOut ?? "") == "₩0" ? .walletIn : .walletOut self.walletAmountLabel.layer.cornerRadius = 4 self.walletAmountLabel.clipsToBounds = true walletAmountLabel.textColor = .white + + switch type { case .walletIn: - self.walletAmountLabel.backgroundColor = AppConstants.themeBlueColor - self.walletAmountLabel.text = "IN: \(model?.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.text = "IN: \(self.model?.walletIn ?? "")" + } case .walletOut: self.walletAmountLabel.backgroundColor = AppConstants.themeRedColor self.walletAmountLabel.text = "OUT: \(model?.walletOut ?? "")" diff --git a/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard b/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard index 4ea35066..56e85807 100644 --- a/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard +++ b/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard @@ -125,6 +125,7 @@ +