Revision 39f3d12c
Von Moritz Bunkus vor etwa 18 Jahren hinzugefügt
SL/DATEV.pm | ||
---|---|---|
83 | 83 |
$main::lxdebug->enter_sub(); |
84 | 84 |
|
85 | 85 |
my ($self, $myconfig, $form) = @_; |
86 |
my $rc;
|
|
86 |
my @rc;
|
|
87 | 87 |
|
88 | 88 |
if ($form->{exporttype} == 0) { |
89 |
$rc = &kne_buchungsexport($myconfig, $form);
|
|
89 |
@rc = &kne_buchungsexport($myconfig, $form);
|
|
90 | 90 |
} else { |
91 |
$rc = &kne_stammdatenexport($myconfig, $form);
|
|
91 |
@rc = &kne_stammdatenexport($myconfig, $form);
|
|
92 | 92 |
} |
93 | 93 |
|
94 | 94 |
$main::lxdebug->leave_sub(); |
95 | 95 |
|
96 |
return $rc;
|
|
96 |
return @rc;
|
|
97 | 97 |
} |
98 | 98 |
|
99 | 99 |
sub obe_export { |
... | ... | |
583 | 583 |
|
584 | 584 |
my ($myconfig, $form) = @_; |
585 | 585 |
|
586 |
my $export_path = "datev/"; |
|
586 |
my @filenames; |
|
587 |
|
|
588 |
my $export_path = $main::userspath . "/"; |
|
587 | 589 |
my $filename = "ED00000"; |
588 | 590 |
my $evfile = "EV01"; |
589 | 591 |
my @ed_versionsets; |
... | ... | |
611 | 613 |
my $buchungssatz = ""; |
612 | 614 |
$filename++; |
613 | 615 |
my $ed_filename = $export_path . $filename; |
616 |
push(@filenames, $filename); |
|
614 | 617 |
open(ED, "> $ed_filename") or die "can't open outputfile: $!\n"; |
615 | 618 |
$header = &make_kne_data_header($myconfig, $form, $fromto); |
616 | 619 |
$remaining_bytes -= length($header); |
... | ... | |
822 | 825 |
#Make EV Verwaltungsdatei |
823 | 826 |
$ev_header = &make_ev_header($form, $fileno); |
824 | 827 |
$ev_filename = $export_path . $evfile; |
828 |
push(@filenames, $evfile); |
|
825 | 829 |
open(EV, "> $ev_filename") or die "can't open outputfile: EV01\n"; |
826 | 830 |
print(EV $ev_header); |
827 | 831 |
|
... | ... | |
829 | 833 |
print(EV $ed_versionset[$file]); |
830 | 834 |
} |
831 | 835 |
close(EV); |
832 |
print qq|<br>Done. <br></body> |
|
833 |
</html> |
|
836 |
print qq|<br>Done. <br> |
|
834 | 837 |
|; |
835 | 838 |
### |
836 | 839 |
$main::lxdebug->leave_sub(); |
840 |
|
|
841 |
return @filenames; |
|
837 | 842 |
} |
838 | 843 |
|
839 | 844 |
sub kne_stammdatenexport { |
... | ... | |
842 | 847 |
my ($myconfig, $form) = @_; |
843 | 848 |
$form->{abrechnungsnr} = "99"; |
844 | 849 |
|
845 |
my $export_path = "datev/"; |
|
850 |
$form->header; |
|
851 |
print qq| |
|
852 |
<html> |
|
853 |
<body>Export in Bearbeitung<br> |
|
854 |
|; |
|
855 |
|
|
856 |
my @filenames; |
|
857 |
|
|
858 |
my $export_path = $main::userspath . "/"; |
|
846 | 859 |
my $filename = "ED00000"; |
847 | 860 |
my $evfile = "EV01"; |
848 | 861 |
my @ed_versionsets; |
... | ... | |
854 | 867 |
my $buchungssatz = ""; |
855 | 868 |
$filename++; |
856 | 869 |
my $ed_filename = $export_path . $filename; |
870 |
push(@filenames, $filename); |
|
857 | 871 |
open(ED, "> $ed_filename") or die "can't open outputfile: $!\n"; |
858 | 872 |
$header = &make_kne_data_header($myconfig, $form, ""); |
859 | 873 |
$remaining_bytes -= length($header); |
... | ... | |
911 | 925 |
|
912 | 926 |
$ev_header = &make_ev_header($form, $fileno); |
913 | 927 |
$ev_filename = $export_path . $evfile; |
928 |
push(@filenames, $evfile); |
|
914 | 929 |
open(EV, "> $ev_filename") or die "can't open outputfile: EV01\n"; |
915 | 930 |
print(EV $ev_header); |
916 | 931 |
|
... | ... | |
922 | 937 |
$dbh->disconnect; |
923 | 938 |
### |
924 | 939 |
|
940 |
print qq|<br>Done. <br> |
|
941 |
|; |
|
942 |
|
|
925 | 943 |
$main::lxdebug->leave_sub(); |
944 |
|
|
945 |
return @filenames; |
|
926 | 946 |
} |
927 | 947 |
|
928 | 948 |
1; |
Auch abrufbar als: Unified diff
Der Datevexport wird nicht mehr in Dateien im datev/-Verzeichnis geschrieben, sondern dem Benutzer als ZIP-Archiv zum Download angeboten.