X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDB%2FInvoice.pm;h=4caafc0b003267b3aded43d3bdf5297eaaecbd36;hb=79dc6c16897945652994f9d2d354f1d6477d81a6;hp=fab4974f3490acfba58a044a4b92472c5fb93f88;hpb=96670fe82a38116ac10592a6ccbd34800f8ad9f8;p=kivitendo-erp.git diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index fab4974f3..4caafc0b0 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -555,6 +555,12 @@ sub abbreviation { return t8('Invoice (one letter abbreviation)'); } +sub oneline_summary { + my $self = shift; + + return sprintf("%s: %s %s (%s)", $self->abbreviation, $self->invnumber, $self->customer->name, $self->transdate->to_kivitendo); +} + sub date { goto &transdate; } @@ -577,6 +583,12 @@ sub link { return $html; } +sub mark_as_paid { + my ($self) = @_; + + $self->update_attributes(paid => $self->amount); +} + 1; __END__ @@ -760,6 +772,10 @@ Mandatory params are =back +=item C + +Marks the invoice as paid by setting its C member to the value of C. + =back =head1 TODO