Anzahlungs-Rg.: Drucken können
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 10 Nov 2021 15:47:00 +0000 (16:47 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 14 Feb 2022 12:52:01 +0000 (13:52 +0100)
SL/Form.pm
SL/Helper/PrintOptions.pm
bin/mozilla/io.pl
bin/mozilla/is.pl
locale/de/all
locale/en/all

index 9c05c33..6a7f285 100644 (file)
@@ -1089,6 +1089,7 @@ sub get_formname_translation {
     credit_note             => $main::locale->text('Credit Note'),
     invoice                 => $main::locale->text('Invoice'),
     invoice_copy            => $main::locale->text('Invoice Copy'),
+    invoice_for_advance_payment => $main::locale->text('Invoice for Advance Payment'),
     pick_list               => $main::locale->text('Pick List'),
     proforma                => $main::locale->text('Proforma Invoice'),
     purchase_order          => $main::locale->text('Purchase Order'),
@@ -1131,7 +1132,7 @@ sub get_number_prefix_for_type {
   my ($self) = @_;
 
   my $prefix =
-      (first { $self->{type} eq $_ } qw(invoice credit_note)) ? 'inv'
+      (first { $self->{type} eq $_ } qw(invoice invoice_for_advance_payment credit_note)) ? 'inv'
     : ($self->{type} =~ /_quotation$/)                        ? 'quo'
     : ($self->{type} =~ /_delivery_order$/)                   ? 'do'
     : ($self->{type} =~ /letter/)                             ? 'letter'
@@ -1170,7 +1171,7 @@ sub generate_attachment_filename {
   my $attachment_filename = $main::locale->unquote_special_chars('HTML', $self->get_formname_translation());
   my $prefix              = $self->get_number_prefix_for_type();
 
-  if ($self->{preview} && (first { $self->{type} eq $_ } qw(invoice credit_note))) {
+  if ($self->{preview} && (first { $self->{type} eq $_ } qw(invoice invoice_for_advance_payment credit_note))) {
     $attachment_filename .= ' (' . $recipient_locale->text('Preview') . ')' . $self->get_extension_for_format();
 
   } elsif ($attachment_filename && $self->{"${prefix}number"}) {
@@ -2944,6 +2945,7 @@ sub save_status {
 # $main::locale->text('UNDO TRANSFER')
 # $main::locale->text('UNIMPORT')
 # $main::locale->text('invoice')
+# $main::locale->text('invoice_for_advance_payment')
 # $main::locale->text('proforma')
 # $main::locale->text('sales_order')
 # $main::locale->text('pick_list')
index cf4616f..614760c 100644 (file)
@@ -69,6 +69,9 @@ sub get_print_options {
     ($form->{type} eq 'invoice' && $form->{storno}) ? (
       opthash("storno_invoice",      $form->{PD}{storno_invoice},      $locale->text('Storno Invoice')),
     ) : undef,
+    ($form->{type} eq 'invoice_for_advance_payment') ? (
+      opthash("invoice_for_advance_payment", $form->{PD}{invoice_for_advance_payment},      $locale->text('Invoice for Advance Payment')),
+    ) : undef,
     ($form->{type} =~ /_delivery_order$/) ? (
       opthash($form->{type},         $form->{PD}{$form->{type}},       $locale->text('Delivery Order')),
       opthash('pick_list',           $form->{PD}{pick_list},           $locale->text('Pick List')),
index ce75809..ca43b49 100644 (file)
@@ -1205,6 +1205,11 @@ sub print_form {
   if ($form->{formname} eq "invoice") {
     $form->{label} = $locale->text('Invoice');
   }
+
+  if ($form->{formname} eq "invoice_for_advance_payment") {
+    $form->{label} = $locale->text('Invoice for Advance Payment');
+  }
+
   if ($form->{formname} eq 'sales_order') {
     $inv                  = "ord";
     $due                  = "req";
@@ -1302,7 +1307,7 @@ sub print_form {
   }
 
   $form->{TEMPLATE_DRIVER_OPTIONS} = { };
-  if (any { $form->{type} eq $_ } qw(sales_quotation sales_order sales_delivery_order invoice request_quotation purchase_order purchase_delivery_order credit_note)) {
+  if (any { $form->{type} eq $_ } qw(sales_quotation sales_order sales_delivery_order invoice invoice_for_advance_payment request_quotation purchase_order purchase_delivery_order credit_note)) {
     $form->{TEMPLATE_DRIVER_OPTIONS}->{variable_content_types} = $form->get_variable_content_types();
   }
 
index b6d6d34..a8b62a4 100644 (file)
@@ -249,6 +249,7 @@ sub prepare_invoice {
 
   } elsif ($form->{type} eq "invoice_for_advance_payment") {
     $form->{type}     = "invoice_for_advance_payment";
+    $form->{formname} = "invoice_for_advance_payment";
 
   } elsif ($form->{formname} eq "proforma" ) {
     $form->{type}     = "invoice";
index fcab597..1ffd12f 100755 (executable)
@@ -1876,6 +1876,7 @@ $self->{texts} = {
   'Invoice email and Contact Person' => 'E-Mail des Rechnungsempfängers und CC an Ansprechpartner',
   'Invoice email settings'      => 'E-Mail Rechnungsversand',
   'Invoice filter'              => 'Rechnungsfilter',
+  'Invoice for Advance Payment' => 'Anzahlungsrechnung',
   'Invoice for Advance Payment (one letter abbreviation)' => 'A',
   'Invoice for Advance Payment with Storno (abbreviation)' => 'A(S)',
   'Invoice for fees'            => 'Rechnung über Gebühren',
@@ -4440,6 +4441,7 @@ $self->{texts} = {
   'internal error (see details)' => 'Interner Fehler (siehe Details)!',
   'invoice'                     => 'Rechnung',
   'invoice mode or item mode'   => 'Rechnungsmodus oder Artikelmodus',
+  'invoice_for_advance_payment' => 'Anzahlungsrechnung',
   'invoice_list'                => 'debitorenbuchungsliste',
   'is'                          => 'ist',
   'is after'                    => 'ist nach dem',
index 5ee8737..7682db7 100644 (file)
@@ -1876,6 +1876,7 @@ $self->{texts} = {
   'Invoice email and Contact Person' => '',
   'Invoice email settings'      => '',
   'Invoice filter'              => '',
+  'Invoice for Advance Payment' => '',
   'Invoice for Advance Payment (one letter abbreviation)' => '',
   'Invoice for Advance Payment with Storno (abbreviation)' => '',
   'Invoice for fees'            => '',
@@ -4436,6 +4437,7 @@ $self->{texts} = {
   'internal error (see details)' => '',
   'invoice'                     => '',
   'invoice mode or item mode'   => '',
+  'invoice_for_advance_payment' => '',
   'invoice_list'                => '',
   'is'                          => '',
   'is after'                    => '',