my $date = $transaction->{date};
my $status = $transaction->{status};
my $payee = $transaction->{payee} || '';
- my $memo = $transaction->{memo} || '';
+ my $memo = $transaction->{note} // $transaction->{memo} // '';
my @postings = @{$transaction->{postings}};
my @out;
push @line, ' ';
if (defined $posting->{amount}) {
push @line, $self->_format_amount($posting->{amount}, $posting->{commodity});
- my $lot_price = $posting->{lot_price};
- my $lot_date = $posting->{lot_date};
- my $lot_ref = $posting->{lot_ref};
+ my $lot = $posting->{lot} || {};
+ my $lot_price = $lot->{price} // $posting->{lot_price};
+ my $lot_date = $lot->{date} // $posting->{lot_date};
+ my $lot_ref = $lot->{ref} // $posting->{lot_ref};
if ($lot_price || $lot_date || $lot_ref) {
push @line, ' {',
join(', ',