X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d104879c27e78a5c2101c8d9227e6419aea15881..d64a64201767dd534ed86ac77dfcedf4a9c7c6f2:/bin/mozilla/ar.pl diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index b2a6602bb..e7576bda0 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -128,6 +128,7 @@ sub load_record_template { $::form->{currency} = $template->currency->name; $::form->{direct_debit} = $template->direct_debit; $::form->{globalproject_id} = $template->project_id; + $::form->{transaction_description} = $template->transaction_description; $::form->{AR_chart_id} = $template->ar_ap_chart_id; $::form->{transdate} = $today->to_kivitendo; $::form->{duedate} = $today->to_kivitendo; @@ -210,6 +211,7 @@ sub save_record_template { direct_debit => $::form->{direct_debit} ? 1 : 0, ordnumber => $::form->{ordnumber}, notes => $::form->{notes}, + transaction_description => $::form->{transaction_description}, items => \@items, ); @@ -1206,12 +1208,23 @@ sub ar_transactions { my $is_storno = $ar->{storno} && $ar->{storno_id}; my $has_storno = $ar->{storno} && !$ar->{storno_id}; - $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)"); + } map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(netamount tax amount paid due marge_total marge_percent);