Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 66397dc3

Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt

  • ID 66397dc3af1ba0bfa4806ab4b5c1f1bb4df9b95c
  • Vorgänger 6d270ae6
  • Nachfolger cf8f39f5

Anzahlungs-Rg.: eigener Typ for Schlussrechnung (final_invoice (F))

Unterschiede anzeigen:

SL/Controller/PriceSource.pm
84 84
    request_quotation       => 'OrderItem',
85 85
    invoice                 => 'InvoiceItem',
86 86
    invoice_for_advance_payment => 'InvoiceItem',
87
    final_invoice           => 'InvoiceItem',
87 88
    purchase_invoice        => 'InvoiceItem',
88 89
    credit_note             => 'InvoiceItem',
89 90
    purchase_delivery_order => 'DeliveryOrderItem',
SL/DB/Invoice.pm
541 541
  return 'ar_transaction'     if !$self->invoice;
542 542
  return 'invoice_for_advance_payment_storno' if $self->type eq 'invoice_for_advance_payment' && $self->amount < 0 &&  $self->storno;
543 543
  return 'invoice_for_advance_payment'        if $self->type eq 'invoice_for_advance_payment';
544
  return 'final_invoice'                      if $self->type eq 'final_invoice';
544 545
  return 'credit_note'        if $self->type eq 'credit_note' && $self->amount < 0 && !$self->storno;
545 546
  return 'invoice_storno'     if $self->type ne 'credit_note' && $self->amount < 0 &&  $self->storno;
546 547
  return 'credit_note_storno' if $self->type eq 'credit_note' && $self->amount > 0 &&  $self->storno;
......
562 563
  return t8('Credit Note') . "(" . t8('Storno') . ")" if $self->invoice_type eq 'credit_note_storno';
563 564
  return t8('Invoice for Advance Payment')            if $self->invoice_type eq 'invoice_for_advance_payment';
564 565
  return t8('Invoice for Advance Payment') . "(" . t8('Storno') . ")" if $self->invoice_type eq 'invoice_for_advance_payment_storno';
566
  return t8('Final Invoice')                          if $self->invoice_type eq 'final_invoice';
565 567
  return t8('Invoice');
566 568
}
567 569

  
......
578 580
  return t8('Credit note (one letter abbreviation)') . "(" . t8('Storno (one letter abbreviation)') . ")"  if $self->invoice_type eq 'credit_note_storno';
579 581
  return t8('Invoice for Advance Payment (one letter abbreviation)')  if $self->invoice_type eq 'invoice_for_advance_payment';
580 582
  return t8('Invoice for Advance Payment with Storno (abbreviation)') if $self->invoice_type eq 'invoice_for_advance_payment_storno';
583
  return t8('Final Invoice (one letter abbreviation)')                if $self->invoice_type eq 'final_invoice';
581 584
  return t8('Invoice (one letter abbreviation)');
582 585
}
583 586

  
SL/Form.pm
1089 1089
    invoice                 => $main::locale->text('Invoice'),
1090 1090
    invoice_copy            => $main::locale->text('Invoice Copy'),
1091 1091
    invoice_for_advance_payment => $main::locale->text('Invoice for Advance Payment'),
1092
    final_invoice           => $main::locale->text('Final Invoice'),
1092 1093
    pick_list               => $main::locale->text('Pick List'),
1093 1094
    proforma                => $main::locale->text('Proforma Invoice'),
1094 1095
    purchase_order          => $main::locale->text('Purchase Order'),
......
1131 1132
  my ($self) = @_;
1132 1133

  
1133 1134
  my $prefix =
1134
      (first { $self->{type} eq $_ } qw(invoice invoice_for_advance_payment credit_note)) ? 'inv'
1135
      (first { $self->{type} eq $_ } qw(invoice invoice_for_advance_payment final_invoice credit_note)) ? 'inv'
1135 1136
    : ($self->{type} =~ /_quotation$/)                        ? 'quo'
1136 1137
    : ($self->{type} =~ /_delivery_order$/)                   ? 'do'
1137 1138
    : ($self->{type} =~ /letter/)                             ? 'letter'
......
1170 1171
  my $attachment_filename = $main::locale->unquote_special_chars('HTML', $self->get_formname_translation());
1171 1172
  my $prefix              = $self->get_number_prefix_for_type();
1172 1173

  
1173
  if ($self->{preview} && (first { $self->{type} eq $_ } qw(invoice invoice_for_advance_payment credit_note))) {
1174
  if ($self->{preview} && (first { $self->{type} eq $_ } qw(invoice invoice_for_advance_payment final_invoice credit_note))) {
1174 1175
    $attachment_filename .= ' (' . $recipient_locale->text('Preview') . ')' . $self->get_extension_for_format();
1175 1176

  
1176 1177
  } elsif ($attachment_filename && $self->{"${prefix}number"}) {
......
2914 2915
# $main::locale->text('UNIMPORT')
2915 2916
# $main::locale->text('invoice')
2916 2917
# $main::locale->text('invoice_for_advance_payment')
2918
# $main::locale->text('final_invoice')
2917 2919
# $main::locale->text('proforma')
2918 2920
# $main::locale->text('sales_order')
2919 2921
# $main::locale->text('pick_list')
SL/Helper/PrintOptions.pm
72 72
    ($form->{type} eq 'invoice_for_advance_payment') ? (
73 73
      opthash("invoice_for_advance_payment", $form->{PD}{invoice_for_advance_payment},      $locale->text('Invoice for Advance Payment')),
74 74
    ) : undef,
75
    ($form->{type} eq 'final_invoice') ? (
76
      opthash("final_invoice", $form->{PD}{final_invoice},             $locale->text('Final Invoice')),
77
    ) : undef,
75 78
    ($form->{type} =~ /_delivery_order$/) ? (
76 79
      opthash($form->{type},         $form->{PD}{$form->{type}},       $locale->text('Delivery Order')),
77 80
      opthash('pick_list',           $form->{PD}{pick_list},           $locale->text('Pick List')),
SL/IC.pm
736 736

  
737 737
  # transdate madness.
738 738
  my $transdate = "";
739
  if ( (any {$form->{type} eq $_} qw(invoice credit_note invoice_for_advance_payment)) or ($form->{script} eq 'ir.pl') ) {
739
  if ( (any {$form->{type} eq $_} qw(invoice credit_note invoice_for_advance_payment final_invoice)) or ($form->{script} eq 'ir.pl') ) {
740 740
    # use deliverydate for sales and purchase invoice, if it exists
741 741
    # also use deliverydate for credit notes
742 742
    $transdate = $form->{tax_point} || $form->{deliverydate} || $form->{invdate};
SL/IS.pm
1061 1061
  # entsprechend auch beim Bestimmen des Steuerschlüssels in Taxkey.pm berücksichtigen
1062 1062
  my $taxdate = $form->{tax_point} ||$form->{deliverydate} || $form->{invdate};
1063 1063

  
1064
  # better type? maybe define Invoice->invoice_type
1065
  if (!$already_booked && $form->{type} ne 'invoice_for_advance_payment') {
1064
  if (!$already_booked && $form->{type} eq 'final_invoice') {
1066 1065
    my $invoices_for_advance_payment = $self->_get_invoices_for_advance_payment($form->{convert_from_ar_ids} || $form->{id});
1067 1066
    if (scalar @$invoices_for_advance_payment > 0) {
1068 1067
      # reverse booking for invoices for advance payment
SL/TransNumber.pm
15 15
 scalar => [ qw(type id number save dbh dbh_provided business_id) ],
16 16
);
17 17

  
18
my @SUPPORTED_TYPES = qw(invoice invoice_for_advance_payment credit_note customer vendor sales_delivery_order purchase_delivery_order sales_order purchase_order sales_quotation request_quotation part service assembly assortment letter);
18
my @SUPPORTED_TYPES = qw(invoice invoice_for_advance_payment final_invoice credit_note customer vendor sales_delivery_order purchase_delivery_order sales_order purchase_order sales_quotation request_quotation part service assembly assortment letter);
19 19

  
20 20
sub new {
21 21
  my $class = shift;
......
37 37
  my $type    = $self->type;
38 38
  my %filters = ( where => '' );
39 39

  
40
  if (any { $_ eq $type } qw(invoice invoice_for_advance_payment credit_note)) {
40
  if (any { $_ eq $type } qw(invoice invoice_for_advance_payment final_invoice credit_note)) {
41 41
    $filters{trans_number}  = "invnumber";
42 42
    $filters{numberfield}   = $type eq 'credit_note' ? "cnnumber" : "invnumber";
43 43
    $filters{table}         = "ar";
bin/mozilla/ar.pl
1204 1204
        $is_storno        ? $locale->text("Storno (one letter abbreviation)") :
1205 1205
                            $locale->text("Invoice for Advance Payment (one letter abbreviation)");
1206 1206

  
1207
    } elsif ($ar->{type} eq 'final_invoice') {
1208
      $ar->{type} = t8('Final Invoice (one letter abbreviation)');
1209

  
1207 1210
    } else {
1208 1211
      $ar->{type} =
1209 1212
        $has_storno       ? $locale->text("Invoice with Storno (abbreviation)") :
bin/mozilla/io.pl
1210 1210
    $form->{label} = $locale->text('Invoice for Advance Payment');
1211 1211
  }
1212 1212

  
1213
  if ($form->{formname} eq "final_invoice") {
1214
    $form->{label} = $locale->text('Final Invoice');
1215
  }
1216

  
1213 1217
  if ($form->{formname} eq 'sales_order') {
1214 1218
    $inv                  = "ord";
1215 1219
    $due                  = "req";
......
1307 1311
  }
1308 1312

  
1309 1313
  $form->{TEMPLATE_DRIVER_OPTIONS} = { };
1310
  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)) {
1314
  if (any { $form->{type} eq $_ } qw(sales_quotation sales_order sales_delivery_order invoice invoice_for_advance_payment final_invoice request_quotation purchase_order purchase_delivery_order credit_note)) {
1311 1315
    $form->{TEMPLATE_DRIVER_OPTIONS}->{variable_content_types} = $form->get_variable_content_types();
1312 1316
  }
1313 1317

  
......
1891 1895
    request_quotation       => 'OrderItem',
1892 1896
    invoice                 => 'InvoiceItem',
1893 1897
    invoice_for_advance_payment => 'InvoiceItem',
1898
    final_invoice           => 'InvoiceItem',
1894 1899
    credit_note             => 'InvoiceItem',
1895 1900
    purchase_invoice        => 'InvoiceItem',
1896 1901
    purchase_delivery_order => 'DeliveryOrderItem',
bin/mozilla/is.pl
95 95
  } elsif ($form->{type} eq "invoice_for_advance_payment") {
96 96
    $form->{title} = $locale->text('Add Invoice for Advance Payment');
97 97

  
98
  } elsif ($form->{type} eq "final_invoice") {
99
    $form->{title} = $locale->text('Final Invoice');
100

  
98 101
  } else {
99 102
    $form->{title} = $locale->text('Add Sales Invoice');
100 103

  
......
143 146
    $form->{title} = $locale->text('Edit Invoice for Advance Payment');
144 147
    $form->{title} = $locale->text('Edit Storno Invoice for Advance Payment') if $form->{storno};
145 148

  
149
  } elsif ($form->{type} eq "final_invoice") {
150
    $form->{title} = $locale->text('Edit Final Invoice');
151

  
146 152
  } else {
147 153
    $form->{title} = $locale->text('Edit Sales Invoice');
148 154
    $form->{title} = $locale->text('Edit Storno Invoice')     if $form->{storno};
......
253 259
    $form->{type}     = "invoice_for_advance_payment";
254 260
    $form->{formname} = "invoice_for_advance_payment";
255 261

  
262
  } elsif ($form->{type} eq "final_invoice") {
263
    $form->{type}     = "final_invoice";
264
    $form->{formname} = "final_invoice";
265

  
256 266
  } elsif ($form->{formname} eq "proforma" ) {
257 267
    $form->{type}     = "invoice";
258 268

  
......
1204 1214

  
1205 1215
  $form->{convert_from_ar_ids} = $form->{id};
1206 1216
  $form->{id}                  = '';
1207
  $form->{type}                = 'invoice';
1217
  $form->{type}                = 'final_invoice';
1208 1218
  $form->{title}               = t8('Edit Final Invoice');
1209 1219
  $form->{paidaccounts}        = 1;
1210 1220
  $form->{invdate}             = $form->current_date(\%myconfig);
locale/de/all
1541 1541
  'Filter parts'                => 'Artikel filtern',
1542 1542
  'Filter record template'      => 'Filter für Buchungsvorlagen',
1543 1543
  'Final Invoice'               => 'Schlussrechnung',
1544
  'Final Invoice (one letter abbreviation)' => 'F',
1544 1545
  'Financial Controlling'       => 'Finanzcontrolling',
1545 1546
  'Financial Controlling Report' => 'Finanzcontrollingbericht',
1546 1547
  'Financial Overview'          => 'Finanzübersicht',
......
4370 4371
  'filename'                    => 'Dateiname',
4371 4372
  'filename has not uploadable characters ' => 'Bitte Dateinamen ändern. Er hat für den Upload nicht verwendbare Sonderzeichen ',
4372 4373
  'filesize too big: '          => 'Datei zu groß: ',
4374
  'final_invoice'               => 'Schlussrechnung',
4373 4375
  'flat-rate position'          => 'Pauschalposition',
4374 4376
  'follow_up_list'              => 'wiedervorlageliste',
4375 4377
  'for'                         => 'für',
locale/en/all
1541 1541
  'Filter parts'                => '',
1542 1542
  'Filter record template'      => '',
1543 1543
  'Final Invoice'               => '',
1544
  'Final Invoice (one letter abbreviation)' => '',
1544 1545
  'Financial Controlling'       => '',
1545 1546
  'Financial Controlling Report' => '',
1546 1547
  'Financial Overview'          => '',
......
4369 4370
  'filename'                    => '',
4370 4371
  'filename has not uploadable characters ' => '',
4371 4372
  'filesize too big: '          => '',
4373
  'final_invoice'               => '',
4372 4374
  'flat-rate position'          => '',
4373 4375
  'follow_up_list'              => '',
4374 4376
  'for'                         => '',
templates/print/marei/final_invoice.tex
1
invoice.tex

Auch abrufbar als: Unified diff