- $ar->{type} =
- $has_storno ? $locale->text("Invoice with Storno (abbreviation)") :
- $is_storno ? $locale->text("Storno (one letter abbreviation)") :
- $ar->{amount} < 0 ? $locale->text("Credit note (one letter abbreviation)") :
- $ar->{invoice} ? $locale->text("Invoice (one letter abbreviation)") :
- $locale->text("AR Transaction (abbreviation)");
+ if ($ar->{type} eq 'invoice_for_advance_payment') {
+ $ar->{type} =
+ $has_storno ? $locale->text("Invoice for Advance Payment with Storno (abbreviation)") :
+ $is_storno ? $locale->text("Storno (one letter abbreviation)") :
+ $locale->text("Invoice for Advance Payment (one letter abbreviation)");
+
+ } elsif ($ar->{type} eq 'final_invoice') {
+ $ar->{type} = t8('Final Invoice (one letter abbreviation)');
+
+ } else {
+ $ar->{type} =
+ $has_storno ? $locale->text("Invoice with Storno (abbreviation)") :
+ $is_storno ? $locale->text("Storno (one letter abbreviation)") :
+ $ar->{amount} < 0 ? $locale->text("Credit note (one letter abbreviation)") :
+ $ar->{invoice} ? $locale->text("Invoice (one letter abbreviation)") :
+ $locale->text("AR Transaction (abbreviation)");
+ }