Revision 00b6dc22
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/Controller/Gdpdu.pm | ||
---|---|---|
use SL::Helper::Flash;
|
||
|
||
use Rose::Object::MakeMethods::Generic (
|
||
'scalar --get_set_init' => [ qw(from to tables) ],
|
||
'scalar --get_set_init' => [ qw(from to) ],
|
||
);
|
||
|
||
__PACKAGE__->run_before('check_auth');
|
||
... | ... | |
location => $::instance_conf->get_address,
|
||
from => $self->from,
|
||
to => $self->to,
|
||
tables => $self->tables,
|
||
all_tables => !@{ $self->tables } && $::form->{all_tables},
|
||
all_tables => $::form->{all_tables},
|
||
);
|
||
|
||
my $filename = $gdpdu->generate_export;
|
||
... | ... | |
|
||
my $error = 0;
|
||
|
||
if ($::form->{tables}) {
|
||
$self->tables([ keys %{ $::form->{tables} } ]);
|
||
# theese three get inferred
|
||
push @{ $self->tables }, 'invoice' if $::form->{tables}{ar} || $::form->{tables}{ap};
|
||
push @{ $self->tables }, 'orderitems' if $::form->{tables}{oe};
|
||
push @{ $self->tables }, 'delivery_order_items' if $::form->{tables}{delivery_orders};
|
||
}
|
||
|
||
if (!@{ $self->tables } && !$::form->{all_tables}) {
|
||
flash('error', t8('No, I really do need checked tables to export.'));
|
||
$error = 1;
|
||
}
|
||
|
||
if (!$::form->{from}) {
|
||
my $epoch = DateTime->new(day => 1, month => 1, year => 1900);
|
||
flash('info', t8('No start date given, setting to #1', $epoch->to_kivitendo));
|
||
... | ... | |
|
||
sub init_from { DateTime->from_kivitendo($::form->{from}) }
|
||
sub init_to { DateTime->from_kivitendo($::form->{to}) }
|
||
sub init_tables { [ ] }
|
||
|
||
1;
|
Auch abrufbar als: Unified diff
GDPDU: DATEV-ähnlicher Buchungsexport Rohversion