return $self->closed ? $::locale->text('closed') : $::locale->text('open');
 }
 
+sub displayable_type {
+  my ($self) = @_;
+
+  return t8('AR Transaction')                         if $self->invoice_type eq 'ar_transaction';
+  return t8('Credit Note')                            if $self->invoice_type eq 'credit_note';
+  return t8('Invoice') . "(" . t8('Storno') . ")"     if $self->invoice_type eq 'invoice_storno';
+  return t8('Credit Note') . "(" . t8('Storno') . ")" if $self->invoice_type eq 'credit_note_storno';
+  return t8('Invoice');
+}
+
 sub abbreviation {
   my $self = shift;
 
 
 
   Common::webdav_folder($form);
 
+  if ($form->{convert_from_ar_ids}) {
+    RecordLinks->create_links('dbh'        => $dbh,
+                              'mode'       => 'ids',
+                              'from_table' => 'ar',
+                              'from_ids'   => $form->{convert_from_ar_ids},
+                              'to_table'   => 'ar',
+                              'to_id'      => $form->{id},
+    );
+    delete $form->{convert_from_ar_ids};
+  }
+
   # Link this record to the records it was created from.
   RecordLinks->create_links('dbh'        => $dbh,
                             'mode'       => 'ids',
 
     type    => 'sales_invoice',
     columns => [
       [ $::locale->text('Invoice Date'),            'transdate'               ],
+      [ $::locale->text('Type'),                    sub { $_[0]->displayable_type } ],
       [ $::locale->text('Invoice Number'),          sub { $self->sales_invoice($_[0], display => 'table-cell') } ],
       [ $::locale->text('Quotation Number'),        'quonumber' ],
       [ $::locale->text('Order Number'),            'ordnumber' ],
     type    => 'ar_transaction',
     columns => [
       [ $::locale->text('Invoice Date'),            'transdate'               ],
+      [ $::locale->text('Type'),                    sub { $_[0]->displayable_type } ],
       [ $::locale->text('Invoice Number'),          sub { $self->ar_transaction($_[0], display => 'table-cell') } ],
       [ $::locale->text('Customer'),                'customer'                ],
       [ $::locale->text('Net amount'),              'netamount'               ],
 
     max_dunning_level dunning_amount
     shiptoname shiptostreet shiptozipcode shiptocity shiptocountry  shiptocontact shiptophone shiptofax
     shiptoemail shiptodepartment_1 shiptodepartment_2  shiptocp_gender message email subject cc bcc taxaccounts cursor_fokus
-    convert_from_do_ids convert_from_oe_ids
+    convert_from_do_ids convert_from_oe_ids convert_from_ar_ids
     show_details
   ), @custom_hiddens,
   map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
   $form->{duedate} =
     $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
 
+  $form->{convert_from_ar_ids} = $form->{id};
   $form->{id}     = '';
   $form->{rowcount}--;