From 8599153dd0a954cbf45f814973457576b23f8a89 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 7 Apr 2015 11:36:44 +0100 Subject: Include state in export format --- src/Command/ConvertCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit 1.4.1