about summary refs log tree commit diff stats
path: root/src/Command/ConvertCommand.php
diff options
context:
space:
mode:
authorAlan Pearce2015-04-07 11:36:44 +0100
committerAlan Pearce2015-04-07 11:36:44 +0100
commit8599153dd0a954cbf45f814973457576b23f8a89 (patch)
tree4401406905bde8ba07155cc892c579e6b0f86ad8 /src/Command/ConvertCommand.php
parent3fef61d9a4ae38f7f325d3eee3a32753ec06a177 (diff)
downloadynab-ledger-8599153dd0a954cbf45f814973457576b23f8a89.tar.lz
ynab-ledger-8599153dd0a954cbf45f814973457576b23f8a89.tar.zst
ynab-ledger-8599153dd0a954cbf45f814973457576b23f8a89.zip
Include state in export format
Diffstat (limited to 'src/Command/ConvertCommand.php')
-rw-r--r--src/Command/ConvertCommand.php4
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) {