]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Invoice.pm
DB Transaktionen - Fehler nach oben durchreichen
[mfinanz.git] / SL / DB / Invoice.pm
index 753ca3c5a88ffcd3e2a7a25f39d7e1656fa2ae0e..0ef8d614e842f68c3d7927c94ea8890e17ba916e 100644 (file)
@@ -165,7 +165,6 @@ sub new_from {
   $terms = $source->customer->payment_terms if !defined $terms && $source->customer;
 
   my %args = ( map({ ( $_ => $source->$_ ) } qw(customer_id taxincluded shippingpoint shipvia notes intnotes salesman_id cusordnumber ordnumber department_id
-                                                shipto_id
                                                 cp_id language_id taxzone_id globalproject_id transaction_description currency_id delivery_term_id), @columns),
                transdate   => DateTime->today_local,
                gldate      => DateTime->today_local,
@@ -578,6 +577,12 @@ sub link {
   return $html;
 }
 
+sub mark_as_paid {
+  my ($self) = @_;
+
+  $self->update_attributes(paid => $self->amount);
+}
+
 1;
 
 __END__
@@ -761,6 +766,10 @@ Mandatory params are
 
 =back
 
+=item C<mark_as_paid>
+
+Marks the invoice as paid by setting its C<paid> member to the value of C<amount>.
+
 =back
 
 =head1 TODO