return $rc;
}
-sub gifi_accounts {
- $main::lxdebug->enter_sub();
-
- my ($self, $myconfig, $form) = @_;
-
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
-
- my $query = qq|SELECT accno, description
- FROM gifi
- ORDER BY accno|;
-
- $sth = $dbh->prepare($query);
- $sth->execute || $form->dberror($query);
-
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
- push @{ $form->{ALL} }, $ref;
- }
-
- $sth->finish;
- $dbh->disconnect;
-
- $main::lxdebug->leave_sub();
-}
-
-sub get_gifi {
- $main::lxdebug->enter_sub();
-
- my ($self, $myconfig, $form) = @_;
-
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
-
- my $query = qq|SELECT g.accno, g.description
- FROM gifi g
- WHERE g.accno = '$form->{accno}'|;
- my $sth = $dbh->prepare($query);
- $sth->execute || $form->dberror($query);
-
- my $ref = $sth->fetchrow_hashref(NAME_lc);
-
- map { $form->{$_} = $ref->{$_} } keys %$ref;
-
- $sth->finish;
-
- # check for transactions
- $query = qq|SELECT count(*) FROM acc_trans a, chart c, gifi g
- WHERE c.gifi_accno = g.accno
- AND a.chart_id = c.id
- AND g.accno = '$form->{accno}'|;
- $sth = $dbh->prepare($query);
- $sth->execute || $form->dberror($query);
-
- ($form->{orphaned}) = $sth->fetchrow_array;
- $sth->finish;
- $form->{orphaned} = !$form->{orphaned};
-
- $dbh->disconnect;
-
- $main::lxdebug->leave_sub();
-}
-
-sub save_gifi {
- $main::lxdebug->enter_sub();
-
- my ($self, $myconfig, $form) = @_;
-
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
-
- $form->{description} =~ s/\'/\'\'/g;
-
- # id is the old account number!
- if ($form->{id}) {
- $query = qq|UPDATE gifi SET
- accno = '$form->{accno}',
- description = '$form->{description}'
- WHERE accno = '$form->{id}'|;
- } else {
- $query = qq|INSERT INTO gifi
- (accno, description)
- VALUES ('$form->{accno}', '$form->{description}')|;
- }
- $dbh->do($query) || $form->dberror($query);
-
- $dbh->disconnect;
-
- $main::lxdebug->leave_sub();
-}
-
-sub delete_gifi {
- $main::lxdebug->enter_sub();
-
- my ($self, $myconfig, $form) = @_;
-
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
-
- # id is the old account number!
- $query = qq|DELETE FROM gifi
- WHERE accno = '$form->{id}'|;
- $dbh->do($query) || $form->dberror($query);
-
- $dbh->disconnect;
-
- $main::lxdebug->leave_sub();
-}
-
sub warehouses {
$main::lxdebug->enter_sub();
$lxdebug->leave_sub();
}
-sub list_gifi {
- $lxdebug->enter_sub();
-
- @{ $form->{fields} } = (accno, description);
- $form->{table} = "gifi";
- $form->{sortorder} = "accno";
-
- AM->gifi_accounts(\%myconfig, \%$form);
-
- $form->{title} = $locale->text('GIFI');
-
- # construct callback
- $callback =
- "$form->{script}?action=list_gifi&path=$form->{path}&login=$form->{login}&password=$form->{password}";
-
- @column_index = qw(accno description);
-
- $column_header{accno} = qq|<th>| . $locale->text('GIFI') . qq|</a></th>|;
- $column_header{description} =
- qq|<th>| . $locale->text('Description') . qq|</a></th>|;
-
- $form->header;
- $colspan = $#column_index + 1;
-
- print qq|
-<body>
-
-<table width=100%>
- <tr>
- <th class=listtop colspan=$colspan>$form->{title}</th>
- </tr>
- <tr height="5"></tr>
- <tr class=listheading>
-|;
-
- map { print "$column_header{$_}\n" } @column_index;
-
- print qq|
-</tr>
-|;
-
- # escape callback
- $callback = $form->escape($callback);
-
- foreach $ca (@{ $form->{ALL} }) {
-
- $i++;
- $i %= 2;
-
- print qq|
-<tr valign=top class=listrow$i>|;
-
- $column_data{accno} =
- qq|<td><a href=$form->{script}?action=edit_gifi&coa=1&accno=$ca->{accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}</td>|;
- $column_data{description} = qq|<td>$ca->{description} </td>|;
-
- map { print "$column_data{$_}\n" } @column_index;
-
- print "</tr>\n";
- }
-
- print qq|
- <tr>
- <td colspan=$colspan><hr size=3 noshade></td>
- </tr>
-</table>
-
-</body>
-</html>
-|;
-
- $lxdebug->leave_sub();
-}
-
-sub add_gifi {
- $lxdebug->enter_sub();
-
- $form->{title} = "Add";
-
- # construct callback
- $form->{callback} =
- "$form->{script}?action=list_gifi&path=$form->{path}&login=$form->{login}&password=$form->{password}";
-
- $form->{coa} = 1;
-
- &gifi_header;
- &gifi_footer;
-
- $lxdebug->leave_sub();
-}
-
-sub edit_gifi {
- $lxdebug->enter_sub();
-
- $form->{title} = "Edit";
-
- AM->get_gifi(\%myconfig, \%$form);
-
- &gifi_header;
- &gifi_footer;
-
- $lxdebug->leave_sub();
-}
-
-sub gifi_header {
- $lxdebug->enter_sub();
-
- $form->{title} = $locale->text("$form->{title} GIFI");
-
- # $locale->text('Add GIFI')
- # $locale->text('Edit GIFI')
-
- $form->{description} =~ s/\"/"/g;
-
- $form->header;
-
- print qq|
-<body>
-
-<form method=post action=$form->{script}>
-
-<input type=hidden name=id value=$form->{accno}>
-<input type=hidden name=type value=gifi>
-
-<table width=100%>
- <tr>
- <th class=listtop>$form->{title}</th>
- </tr>
- <tr height="5"></tr>
- <tr>
- <td>
- <table>
- <tr>
- <th align=right>| . $locale->text('GIFI') . qq|</th>
- <td><input name=accno size=20 value=$form->{accno}></td>
- </tr>
- <tr>
- <th align=right>| . $locale->text('Description') . qq|</th>
- <td><input name=description size=60 value="$form->{description}"></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan=2><hr size=3 noshade></td>
- </tr>
-</table>
-|;
-
- $lxdebug->leave_sub();
-}
-
-sub gifi_footer {
- $lxdebug->enter_sub();
-
- print qq|
-
-<input name=callback type=hidden value="$form->{callback}">
-
-<input type=hidden name=path value=$form->{path}>
-<input type=hidden name=login value=$form->{login}>
-<input type=hidden name=password value=$form->{password}>
-
-<br><input type=submit class=submit name=action value="|
- . $locale->text('Save') . qq|">|;
-
- if ($form->{coa}) {
- print qq|
-<input type=submit class=submit name=action value="|
- . $locale->text('Copy to COA') . qq|">
-|;
-
- if ($form->{accno} && $form->{orphaned}) {
- print qq|<input type=submit class=submit name=action value="|
- . $locale->text('Delete') . qq|">|;
- }
- }
-
- print qq|
- </form>
-
-</body>
-</html>
-|;
-
- $lxdebug->leave_sub();
-}
-
-sub save_gifi {
- $lxdebug->enter_sub();
-
- $form->isblank("accno", $locale->text('GIFI missing!'));
- AM->save_gifi(\%myconfig, \%$form);
- $form->redirect($locale->text('GIFI saved!'));
-
- $lxdebug->leave_sub();
-}
-
-sub copy_to_coa {
- $lxdebug->enter_sub();
-
- $form->isblank("accno", $locale->text('GIFI missing!'));
-
- AM->save_gifi(\%myconfig, \%$form);
-
- delete $form->{id};
- $form->{gifi_accno} = $form->{accno};
- $form->{title} = "Add";
- $form->{charttype} = "A";
-
- &account_header;
- &form_footer;
-
- $lxdebug->leave_sub();
-}
-
-sub delete_gifi {
- $lxdebug->enter_sub();
-
- AM->delete_gifi(\%myconfig, \%$form);
- $form->redirect($locale->text('GIFI deleted!'));
-
- $lxdebug->leave_sub();
-}
-
sub add_department {
$lxdebug->enter_sub();
'Add Department' => 'Abteilung erfassen',
'Add Dunning' => 'Mahnung erzeugen',
'Add Exchangerate' => 'Wechselkurs erfassen',
- 'Add GIFI' => 'GIFI erfassen',
'Add General Ledger Transaction' => 'Dialogbuchen',
'Add Group' => 'Warengruppe erfassen',
'Add Language' => 'Sprache hinzufügen',
'Continue' => 'Weiter',
'Contra' => 'gegen',
'Copies' => 'Kopien',
- 'Copy to COA' => 'In Kontenplan kopieren',
'Cost Center' => 'Kostenstelle',
'Costs' => 'Kosten',
'Could not copy %s to %s. Reason: %s' => 'Die Datei "%s" konnte nicht nach "%s" kopiert werden. Grund: %s',
'Edit Department' => 'Abteilung bearbeiten',
'Edit Dunning' => 'Mahnungen konfigurieren',
'Edit Dunning Process Config' => 'Mahnwesenkonfiguration bearbeiten',
- 'Edit GIFI' => 'GIFI editieren',
'Edit General Ledger Transaction' => 'Buchung im Hauptbuch bearbeiten',
'Edit Group' => 'Warengruppe editieren',
'Edit Language' => 'Sprache bearbeiten',
'Fristsetzung' => 'Fristsetzung',
'From' => 'Von',
'GIFI' => 'GIFI',
- 'GIFI deleted!' => 'GIFI gelöscht!',
- 'GIFI missing!' => 'GIFI fehlt!',
- 'GIFI saved!' => 'GIFI gespeichert!',
'GL Transaction' => 'Dialogbuchung',
'General Ledger' => 'Finanzbuchhaltung',
'Geschäftsvolumen' => 'Geschäftsvolumen',
'Add Buchungsgruppe' => 'Buchungsgruppe erfassen',
'Add Business' => 'Kunden-/Lieferantentyp erfassen',
'Add Department' => 'Abteilung erfassen',
- 'Add GIFI' => 'GIFI erfassen',
'Add Language' => 'Sprache hinzufügen',
'Add Lead' => 'Kundenquelle erfassen',
'Add Payment Terms' => 'Zahlungskonditionen hinzufügen',
'Code missing!' => 'kode fehlt!',
'Company' => 'Firma',
'Continue' => 'Weiter',
- 'Copy to COA' => 'In Kontenplan kopieren',
'Cost Center' => 'Kostenstelle',
'Costs' => 'Kosten',
'Customer Number' => 'Kundennummer',
'Edit Buchungsgruppe' => 'Buchungsgruppe bearbeiten',
'Edit Business' => 'Kunden-/Lieferantentyp bearbeiten',
'Edit Department' => 'Abteilung bearbeiten',
- 'Edit GIFI' => 'GIFI editieren',
'Edit Language' => 'Sprache bearbeiten',
'Edit Lead' => 'Kundenquelle bearbeiten',
'Edit Payment Terms' => 'Zahlungskonditionen bearbeiten',
'Foreign Exchange Gain' => 'Wechselkurserträge',
'Foreign Exchange Loss' => 'Wechselkursaufwendungen',
'Form details (second row)' => 'Formulardetails (zweite Positionszeile)',
- 'GIFI' => 'GIFI',
- 'GIFI deleted!' => 'GIFI gelöscht!',
- 'GIFI missing!' => 'GIFI fehlt!',
- 'GIFI saved!' => 'GIFI gespeichert!',
'Gültig ab' => 'Gültig ab',
'Heading' => 'Überschrift',
'Hide by default' => 'Standardmäßig verstecken',
'add_buchungsgruppe' => 'add_buchungsgruppe',
'add_business' => 'add_business',
'add_department' => 'add_department',
- 'add_gifi' => 'add_gifi',
'add_language' => 'add_language',
'add_lead' => 'add_lead',
'add_payment' => 'add_payment',
'calculate_qty' => 'calculate_qty',
'config' => 'config',
'continue' => 'continue',
- 'copy_to_coa' => 'copy_to_coa',
'delete' => 'delete',
'delete_account' => 'delete_account',
'delete_buchungsgruppe' => 'delete_buchungsgruppe',
'delete_business' => 'delete_business',
'delete_department' => 'delete_department',
- 'delete_gifi' => 'delete_gifi',
'delete_language' => 'delete_language',
'delete_lead' => 'delete_lead',
'delete_payment' => 'delete_payment',
'edit_buchungsgruppe' => 'edit_buchungsgruppe',
'edit_business' => 'edit_business',
'edit_department' => 'edit_department',
- 'edit_gifi' => 'edit_gifi',
'edit_language' => 'edit_language',
'edit_lead' => 'edit_lead',
'edit_payment' => 'edit_payment',
'employee_selection_internal' => 'employee_selection_internal',
'form_footer' => 'form_footer',
'format_dates' => 'format_dates',
- 'gifi_footer' => 'gifi_footer',
- 'gifi_header' => 'gifi_header',
'language_header' => 'language_header',
'lead_header' => 'lead_header',
'list_account' => 'list_account',
'list_buchungsgruppe' => 'list_buchungsgruppe',
'list_business' => 'list_business',
'list_department' => 'list_department',
- 'list_gifi' => 'list_gifi',
'list_language' => 'list_language',
'list_lead' => 'list_lead',
'list_payment' => 'list_payment',
'save_business' => 'save_business',
'save_department' => 'save_department',
'save_form' => 'save_form',
- 'save_gifi' => 'save_gifi',
'save_language' => 'save_language',
'save_lead' => 'save_lead',
'save_payment' => 'save_payment',
'erfassen' => 'add',
'konto_erfassen' => 'add_account',
'weiter' => 'continue',
- 'in_kontenplan_kopieren' => 'copy_to_coa',
'löschen' => 'delete',
'bearbeiten' => 'edit',
'kontodaten_bearbeiten' => 'edit_account',