about summary refs log tree commit diff stats
path: root/src/Command
diff options
context:
space:
mode:
Diffstat (limited to 'src/Command')
-rw-r--r--src/Command/ConvertCommand.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Command/ConvertCommand.php b/src/Command/ConvertCommand.php
index ca2bcc4..1df8249 100644
--- a/src/Command/ConvertCommand.php
+++ b/src/Command/ConvertCommand.php
@@ -93,12 +93,14 @@ function toLedger (Generator $transactions) {
                 $startDate = $txn->date;
                 $lTxn->isVirtual = true;
                 do {
-                    $posting = new LedgerPosting;
-                    $posting->currency = $txn->currency;
-                    $posting->amount = $txn->in;
-                    $posting->account = array_merge(['Funds'], $txn->category);
-                    if ($posting->amount !== 0.00) {
-                        $lTxn->postings[] = $posting;
+                    if ($txn->category[0] != 'Pre-YNAB Debt') {
+                        $posting = new LedgerPosting;
+                        $posting->currency = $txn->currency;
+                        $posting->amount = $txn->in;
+                        $posting->account = array_merge(['Funds'], $txn->category);
+                        if ($posting->amount !== 0.00) {
+                            $lTxn->postings[] = $posting;
+                        }
                     }
 
                     $transactions->next();