diff options
author | Alan Pearce | 2015-04-07 16:46:44 +0100 |
---|---|---|
committer | Alan Pearce | 2015-04-07 16:46:44 +0100 |
commit | 6c29b8421c09abbf1ec4e0c68a8da91e7576481c (patch) | |
tree | 42717c6f4260ec830c97f8796cb961c4891a57f0 /src/Command | |
parent | 102c7ffde62a1a2ee08678747583ee207b8263cf (diff) | |
download | ynab-ledger-6c29b8421c09abbf1ec4e0c68a8da91e7576481c.tar.lz ynab-ledger-6c29b8421c09abbf1ec4e0c68a8da91e7576481c.tar.zst ynab-ledger-6c29b8421c09abbf1ec4e0c68a8da91e7576481c.zip |
Align accounts and amounts
Diffstat (limited to 'src/Command')
-rw-r--r-- | src/Command/ConvertCommand.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Command/ConvertCommand.php b/src/Command/ConvertCommand.php index 1df8249..2cf727b 100644 --- a/src/Command/ConvertCommand.php +++ b/src/Command/ConvertCommand.php @@ -341,12 +341,14 @@ class ConvertCommand extends Command { , !empty($txn->note) ? " ; $txn->note" : "" , PHP_EOL; foreach ($txn->postings as $posting) { - echo " " - , $txn->isVirtual ? "[" : ($posting->isVirtual ? "(" : "") - , implode(':', $posting->account) - , $txn->isVirtual ? "]" : ($posting->isVirtual ? ")" : ""); + printf( + " %-40s", + ($txn->isVirtual ? "[" : ($posting->isVirtual ? "(" : "")) + . implode(':', $posting->account) + . ($txn->isVirtual ? "]" : ($posting->isVirtual ? ")" : "")) + ); if ($posting->currency !== null) { - echo " {$fmt->formatCurrency($posting->amount, $posting->currency)}"; + printf(" %10s", $fmt->formatCurrency($posting->amount, $posting->currency)); } echo !empty($posting->note) ? " ; $posting->note" : "", PHP_EOL; } |