X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/1c181c11d5637d4388b138942f2edcd3c97e23c4..418a7036d511164bbfd0395084cd7158c4ab32d0:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index 610f545eb..cc9881413 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2590,6 +2590,19 @@ sub all_vc { $main::lxdebug->leave_sub(); } +sub new_lastmtime { + my ($self, $table, $option) = @_; + + return unless $self->{id}; + croak ("wrong call, no valid table defined") unless $table =~ /^(oe|ar|ap|delivery_orders|parts)$/; + + my $query = "SELECT mtime, itime FROM " . $table . " WHERE id = ?"; + my $ref = selectfirst_hashref_query($self, $self->get_standard_dbh, $query, $self->{id}); + $ref->{mtime} ||= $ref->{itime}; + $self->{lastmtime} = $ref->{mtime}; + $main::lxdebug->message(LXDebug->DEBUG2(),"new lastmtime=".$self->{lastmtime}); +} + sub mtime_ischanged { my ($self, $table, $option) = @_;