diff options
author | Alan Pearce | 2015-04-07 11:36:44 +0100 |
---|---|---|
committer | Alan Pearce | 2015-04-07 11:36:44 +0100 |
commit | 8599153dd0a954cbf45f814973457576b23f8a89 (patch) | |
tree | 4401406905bde8ba07155cc892c579e6b0f86ad8 /src/Command | |
parent | 3fef61d9a4ae38f7f325d3eee3a32753ec06a177 (diff) | |
download | ynab-ledger-8599153dd0a954cbf45f814973457576b23f8a89.tar.lz ynab-ledger-8599153dd0a954cbf45f814973457576b23f8a89.tar.zst ynab-ledger-8599153dd0a954cbf45f814973457576b23f8a89.zip |
Include state in export format
Diffstat (limited to 'src/Command')
-rw-r--r-- | src/Command/ConvertCommand.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Command/ConvertCommand.php b/src/Command/ConvertCommand.php index c1a17f2..1a8aac9 100644 --- a/src/Command/ConvertCommand.php +++ b/src/Command/ConvertCommand.php @@ -307,7 +307,9 @@ class ConvertCommand extends Command { $export = toLedger(multiRead(new SplFileObject($budgetFile), new SplFileObject($registerFile), $fmt)); foreach ($export as $txn) { - echo "{$txn->date->format('Y-m-d')} $txn->payee" + echo "{$txn->date->format('Y-m-d')} " + , $txn->state ? "$txn->state " : "" + , $txn->payee , !empty($txn->note) ? " ; $txn->note" : "" , PHP_EOL; foreach ($txn->postings as $posting) { |