Skip to content

Commit

Permalink
Fixed annoying issue when default date is not setup for new posting.
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenate committed Nov 29, 2011
1 parent cef60db commit f4eeb69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Fab.Client/MoneyTracker/Postings/PostingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ protected override void OnActivate()
public void NewIncome()
{
TransactionDetails.IsDeposite = true;
TransactionDetails.Create(AccountId);
TransactionDetails.Create(AccountId, fromDate.Date);
ActivateItem(TransactionDetails);
}

Expand All @@ -313,7 +313,7 @@ public void NewIncome()
public void NewExpense()
{
TransactionDetails.IsDeposite = false;
TransactionDetails.Create(AccountId);
TransactionDetails.Create(AccountId, fromDate.Date);
ActivateItem(TransactionDetails);
}

Expand All @@ -322,7 +322,7 @@ public void NewExpense()
/// </summary>
public void NewTransfer()
{
TransferDetails.Create(AccountId);
TransferDetails.Create(AccountId, fromDate.Date);
ActivateItem(TransferDetails);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,13 @@ public override string DisplayName

#region Methods

public void Create(int accountId)
public void Create(int accountId, DateTime date)
{
InitCategories();

transactionId = null;
AccountId = accountId;
OperationDate = DateTime.SpecifyKind(DateTime.Today, DateTimeKind.Unspecified);
OperationDate = date;
CurrentCategory = null;
Price = string.Empty;
Quantity = "1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public override string DisplayName

#region Methods

public void Create(int accountId)
public void Create(int accountId, DateTime date)
{
DisplayName = "New Transfer";

Expand All @@ -163,7 +163,7 @@ public void Create(int accountId)
prevSourceAccont = (AccountDTO)SourceAccounts.CurrentItem;
prevTargetAccont = (AccountDTO)TargetAccounts.CurrentItem;

OperationDate = DateTime.SpecifyKind(DateTime.Today, DateTimeKind.Unspecified);
OperationDate = date;
Amount = string.Empty;
Comment = string.Empty;

Expand Down

0 comments on commit f4eeb69

Please sign in to comment.