X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=cc988141303b0d07f95cf59d553fae0e3601b989;hb=b47574cb2bdd79d3c172f67d94d3eada4bd3f981;hp=610f545eb117d911f9b7325bb0f766fba45a2d8e;hpb=1c181c11d5637d4388b138942f2edcd3c97e23c4;p=kivitendo-erp.git 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) = @_;