1 #=====================================================================
 
   6 #   Email: p.reetz@linet-services.de
 
   7 #     Web: http://www.lx-office.org
 
  10 # This program is free software; you can redistribute it and/or modify
 
  11 # it under the terms of the GNU General Public License as published by
 
  12 # the Free Software Foundation; either version 2 of the License, or
 
  13 # (at your option) any later version.
 
  15 # This program is distributed in the hope that it will be useful,
 
  16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 
  17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  18 # GNU General Public License for more details.
 
  19 # You should have received a copy of the GNU General Public License
 
  20 # along with this program; if not, write to the Free Software
 
  21 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
  22 #======================================================================
 
  26 #======================================================================
 
  34 sub continue { &{ $form->{nextsub} } };
 
  39   $lxdebug->enter_sub();
 
  42   $form->{title} = $locale->text("DATEX - Export Assistent");
 
  45   DATEV->get_datev_stamm(\%myconfig, \%$form); 
 
  51 <form method=post action=$form->{script}>
 
  56     <th class=listtop>$form->{title}</th>
 
  59     <th align=left>|.$locale->text("DATEV Angaben").qq|</th>
 
  66           <td align=left nowrap>|.$locale->text("Beraternummer").qq|</td>
 
  67           <td><input name=beraternr size=10 maxlength=7 value="$form->{beraternr}"></td>
 
  69           <td align=left nowrap>|.$locale->text("DFV-Kennzeichen").qq|</td>
 
  70           <td><input name=dfvkz size=5 maxlength=2 value="$form->{dfvkz}"></td>
 
  73           <td align=left nowrap>|.$locale->text("Beratername").qq|</td>
 
  74           <td><input name=beratername size=10 maxlength=9 value="$form->{beratername}"></td>
 
  76           <td align=left nowrap>|.$locale->text("Password").qq|</td>
 
  77           <td><input name=passwort size=5 maxlength=4 value="$form->{passwort}"></td>
 
  80           <td align=left nowrap>|.$locale->text("Mandantennummer").qq|</td>
 
  81           <td><input name=mandantennr size=10 maxlength=5 value="$form->{mandantennr}"></td>
 
  83           <td align=left nowrap>|.$locale->text("Datenträgernummer").qq|</td>
 
  84           <td><input name=datentraegernr size=5 maxlength=3 value="$form->{datentraegernr}"></td>
 
  87           <td><input checked name=kne type=checkbox class=checkbox value=1> |.$locale->text("Kontonummernerweiterung (KNE)").qq|</td>
 
  90           <td align=left nowrap>|.$locale->text("Abrechnungsnummer").qq|</td>
 
  91           <td><input name=abrechnungsnr size=5 maxlength=3 value="$form->{abrechnungsnr}"></td>
 
  94           <td><input name=exporttype type=radio class=radio value=0 checked> |.$locale->text("Export Buchungsdaten").qq|</td>
 
  97           <td><input name=exporttype type=radio class=radio value=1> |.$locale->text("Export Stammdaten").qq|</td>
 
 104     <td><hr size=3 noshade></td>
 
 108 <input type=hidden name=nextsub value=export2>
 
 110 <input type=hidden name=path value=$form->{path}>
 
 111 <input type=hidden name=login value=$form->{login}>
 
 112 <input type=hidden name=password value=$form->{password}>
 
 115 <input type=submit class=submit name=action value="|.$locale->text('Continue').qq|">
 
 121   $lxdebug->leave_sub();
 
 125   $lxdebug->enter_sub();
 
 127   if ($form->{exporttype}==0) {
 
 128     &export_bewegungsdaten();
 
 129   } else {&export_stammdaten();}
 
 130   $lxdebug->leave_sub();
 
 133 sub export_bewegungsdaten {
 
 134   $lxdebug->enter_sub();
 
 137   $form->{title} = $locale->text("DATEX - Export Assistent");
 
 139   $form->{allemonate}=qq|<option value=1>|.$locale->text('January').qq|</option>
 
 140                          <option value=2>|.$locale->text('February').qq|</option>
 
 141                          <option value=3>|.$locale->text('March').qq|</option>
 
 142                          <option value=4>|.$locale->text('April').qq|</option>
 
 143                          <option value=5>|.$locale->text('May').qq|</option>
 
 144                          <option value=6>|.$locale->text('June').qq|</option>
 
 145                          <option value=7>|.$locale->text('July').qq|</option>
 
 146                          <option value=8>|.$locale->text('August').qq|</option>
 
 147                          <option value=9>|.$locale->text('September').qq|</option>
 
 148                          <option value=10>|.$locale->text('October').qq|</option>
 
 149                          <option value=11>|.$locale->text('November').qq|</option>
 
 150                          <option value=12>|.$locale->text('December').qq|</option>|;
 
 152     $form->{allequartale}=qq|<option selected value=1>|.$locale->text('I').qq|</option>
 
 153                          <option value=2>|.$locale->text('II').qq|</option>
 
 154                          <option value=3>|.$locale->text('III').qq|</option>
 
 155                          <option value=4>|.$locale->text('IV').qq|</option>|;
 
 161 <form method=post action=$form->{script}>
 
 166     <th class=listtop>$form->{title}</th>
 
 169     <th align=left>|.$locale->text("Zeitraum").qq|</th>
 
 176           <td align=left><input checked name=zeitraum class=radio type=radio value=monat> </td><td align=left>|.$locale->text('Monat').qq|</td>
 
 179           <td align=left><select name=monat>$form->{allemonate}</select></td>
 
 182           <td align=left><input name=zeitraum class=radio type=radio value=quartal> </td><td align=left>|.$locale->text('Quartal').qq|</td>
 
 185           <td align=left><select name=quartal>$form->{allequartale}</select></td>
 
 188           <td align=left><input name=zeitraum class=radio type=radio value=zeit> </td><td align=left>|.$locale->text('Datum von').qq|</td>
 
 189           <td align=left><input name=transdatefrom size=8></td>
 
 190           <td align=left>|.$locale->text('bis').qq|</td>
 
 191           <td align=left><input name=transdateto size=8></td>           
 
 197     <td><hr size=3 noshade></td>
 
 201 <input type=hidden name=beraternr value="$form->{beraternr}">
 
 202 <input type=hidden name=dfvkz value="$form->{dfvkz}">
 
 203 <input type=hidden name=beratername value="$form->{beratername}">
 
 204 <input type=hidden name=passwort value="$form->{passwort}">
 
 205 <input type=hidden name=mandantennr value="$form->{mandantennr}">
 
 206 <input type=hidden name=datentraegernr value="$form->{datentraegernr}">
 
 207 <input type=hidden name=kne value="$form->{kne}">
 
 208 <input type=hidden name=abrechnungsnr value="$form->{abrechnungsnr}">
 
 210 <input type=hidden name=exporttype value="$form->{exporttype}">
 
 212 <input type=hidden name=nextsub value=export3>
 
 214 <input type=hidden name=path value=$form->{path}>
 
 215 <input type=hidden name=login value=$form->{login}>
 
 216 <input type=hidden name=password value=$form->{password}>
 
 219 <input type=submit class=submit name=action value="|.$locale->text('Continue').qq|">
 
 226   $lxdebug->leave_sub();
 
 229 sub export_stammdaten {
 
 230   $lxdebug->enter_sub();
 
 233   $form->{title} = $locale->text("DATEX - Export Assistent");
 
 241 <form method=post action=$form->{script}>
 
 244     <th class=listtop>$form->{title}</th>
 
 247     <th align=left>|.$locale->text("Konten").qq|</th>
 
 254           <td align=left>|.$locale->text('Von Konto: ').qq|</td>
 
 255           <td align=left><input name=accnofrom size=8 maxlength=8></td>
 
 258           <td align=left>|.$locale->text('Bis Konto: ').qq|</td>
 
 259           <td align=left><input name=accnoto size=8 maxlength=8></td>
 
 265     <td><hr size=3 noshade></td>
 
 268 <input type=hidden name=beraternr value="$form->{beraternr}">
 
 269 <input type=hidden name=dfvkz value="$form->{dfvkz}">
 
 270 <input type=hidden name=beratername value="$form->{beratername}">
 
 271 <input type=hidden name=passwort value="$form->{passwort}">
 
 272 <input type=hidden name=mandantennr value="$form->{mandantennr}">
 
 273 <input type=hidden name=datentraegernr value="$form->{datentraegernr}">
 
 274 <input type=hidden name=kne value="$form->{kne}">
 
 275 <input type=hidden name=abrechnungsnr value="$form->{abrechnungsnr}">
 
 277 <input type=hidden name=exporttype value="$form->{exporttype}">
 
 279 <input type=hidden name=nextsub value=export3>
 
 281 <input type=hidden name=path value=$form->{path}>
 
 282 <input type=hidden name=login value=$form->{login}>
 
 283 <input type=hidden name=password value=$form->{password}>
 
 286 <input type=submit class=submit name=action value="|.$locale->text('Continue').qq|">
 
 293   $lxdebug->leave_sub();
 
 298   $lxdebug->enter_sub();
 
 300   DATEV->save_datev_stamm(\%myconfig, \%$form);
 
 303   if (DATEV->kne_export(\%myconfig, \%$form)) {
 
 304   $form->redirect($locale->text('KNE Export erfolgreich!'))}
 
 306   if (DATEV->obe_export(\%myconfig, \%$form)) { 
 
 307   $form->redirect($locale->text('OBE Export erfolgreich!'));}
 
 309   $lxdebug->leave_sub();