X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FInvoice.pm;h=2b4fd59ef9fa9ca305715ef3c42db5c501901041;hb=d8275f6e998ac5f51c6edd786f6e4ae9db6f577f;hp=54f5483e861066bfd600101de1a001fae35e0e32;hpb=2644d2a93d051b4040354c87c0410ebf494a15df;p=kivitendo-erp.git diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 54f5483e8..2b4fd59ef 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -16,6 +16,7 @@ use SL::DB::Helper::LinkedRecords; use SL::DB::Helper::PDF_A; use SL::DB::Helper::PriceTaxCalculator; use SL::DB::Helper::PriceUpdater; +use SL::DB::Helper::SalesPurchaseInvoice; use SL::DB::Helper::TransNumberGenerator; use SL::DB::Helper::ZUGFeRD; use SL::Locale::String qw(t8); @@ -539,6 +540,9 @@ sub invoice_type { my ($self) = @_; return 'ar_transaction' if !$self->invoice; + return 'invoice_for_advance_payment_storno' if $self->type eq 'invoice_for_advance_payment' && $self->amount < 0 && $self->storno; + return 'invoice_for_advance_payment' if $self->type eq 'invoice_for_advance_payment'; + return 'final_invoice' if $self->type eq 'final_invoice'; # stornoed credit_notes are still credit notes and not invoices return 'credit_note' if $self->type eq 'credit_note' && $self->amount < 0; return 'invoice_storno' if $self->type ne 'credit_note' && $self->amount < 0 && $self->storno; @@ -559,6 +563,9 @@ sub displayable_type { 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 for Advance Payment') if $self->invoice_type eq 'invoice_for_advance_payment'; + return t8('Invoice for Advance Payment') . "(" . t8('Storno') . ")" if $self->invoice_type eq 'invoice_for_advance_payment_storno'; + return t8('Final Invoice') if $self->invoice_type eq 'final_invoice'; return t8('Invoice'); } @@ -573,6 +580,9 @@ sub abbreviation { return t8('Credit note (one letter abbreviation)') if $self->invoice_type eq 'credit_note'; return t8('Invoice (one letter abbreviation)') . "(" . t8('Storno (one letter abbreviation)') . ")" if $self->invoice_type eq 'invoice_storno'; return t8('Credit note (one letter abbreviation)') . "(" . t8('Storno (one letter abbreviation)') . ")" if $self->invoice_type eq 'credit_note_storno'; + return t8('Invoice for Advance Payment (one letter abbreviation)') if $self->invoice_type eq 'invoice_for_advance_payment'; + return t8('Invoice for Advance Payment with Storno (abbreviation)') if $self->invoice_type eq 'invoice_for_advance_payment_storno'; + return t8('Final Invoice (one letter abbreviation)') if $self->invoice_type eq 'final_invoice'; return t8('Invoice (one letter abbreviation)'); }