Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d2ab3033

Von Jan Büren vor 12 Monaten hinzugefügt

  • ID d2ab303359734a26bed05bde52fe4f5f5191c763
  • Vorgänger 0f3c5d34
  • Nachfolger 8eafaf06

DATEV: neue Routine, die prüft ob jede Buchung auch eine Dokument besitzt

Unterschiede anzeigen:

SL/DATEV.pm
return 1;
# TODO maybe needed
}
sub check_all_bookings_have_documents {
my ($self) = shift;
my %params = @_;
die "Need from date" unless $params{from};
die "Need to date" unless $params{to};
$self->from($params{from});
$self->to($params{to});
my $fromto = $self->fromto;
# not all last month ar ap gl booking have an entry -> rent ?
my $query = <<"SQL";
my $query = qq|
select distinct trans_id,object_id from acc_trans
left join files on files.object_id=trans_id
where date_trunc('month', transdate) = date_trunc('month', current_date - interval '1 month')
where $fromto
and object_id is null
LIMIT 1
SQL
LIMIT 1|;
my ($booking_has_no_document) = selectrow_query($::form, SL::DB->client->dbh, $query);
return defined $booking_has_no_document ? 0 : 1;
}
sub _u8 {
my ($value) = @_;
return encode('UTF-8', $value // '');
......
The error message gives a short hint with the value of the (at least)
two mismatching number length domains.
=item check_document_export
Returns 1 if DMS feature is enabled and Backend is Filesystem
=item check_all_bookings_have_documents
Returns 1 if all transactions for this period have a document entry in files.
Therefore all transactions may be exported (type is not checked and DATEV
only accepts PDF).
=back
=head1 ATTRIBUTES

Auch abrufbar als: Unified diff