X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FInvoice.pm;h=44b81dfd09cd9ebc46dfa07eb830597297565578;hb=953f63b08d7894b6dea55f8361e983ba09e6e4fb;hp=fab4974f3490acfba58a044a4b92472c5fb93f88;hpb=0b84f51fd598e4b5a1cb139aa582297d089b1602;p=kivitendo-erp.git diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index fab4974f3..44b81dfd0 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -555,6 +555,13 @@ sub abbreviation { return t8('Invoice (one letter abbreviation)'); } +sub oneline_summary { + my $self = shift; + + return sprintf("%s: %s %s %s (%s)", $self->abbreviation, $self->invnumber, $self->customer->name, + $::form->format_amount(\%::myconfig, $self->amount,2), $self->transdate->to_kivitendo); +} + sub date { goto &transdate; } @@ -577,6 +584,12 @@ sub link { return $html; } +sub mark_as_paid { + my ($self) = @_; + + $self->update_attributes(paid => $self->amount); +} + 1; __END__ @@ -760,6 +773,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