From 9a795b8553bd43a379646bc6244c618e570556e9 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 16 Feb 2007 10:19:15 +0000 Subject: [PATCH] "GIFI"-Verwaltungsfunktionen entfernt. --- SL/AM.pm | 108 ---------------------- bin/mozilla/am.pl | 225 ---------------------------------------------- locale/de/all | 6 -- locale/de/am | 16 ---- 4 files changed, 355 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index d1c281a8d..f455e65a2 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -300,114 +300,6 @@ sub delete_account { 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(); diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 5868fa201..d25eb7e30 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -635,231 +635,6 @@ sub delete_account { $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|| . $locale->text('GIFI') . qq||; - $column_header{description} = - qq|| . $locale->text('Description') . qq||; - - $form->header; - $colspan = $#column_index + 1; - - print qq| - - - - - - - - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; - - # escape callback - $callback = $form->escape($callback); - - foreach $ca (@{ $form->{ALL} }) { - - $i++; - $i %= 2; - - print qq| -|; - - $column_data{accno} = - qq||; - $column_data{description} = qq||; - - map { print "$column_data{$_}\n" } @column_index; - - print "\n"; - } - - print qq| - - - -
$form->{title}
{script}?action=edit_gifi&coa=1&accno=$ca->{accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}$ca->{description} 

- - - -|; - - $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| - - -
{script}> - -{accno}> - - - - - - - - - - - - - -
$form->{title}
- - - - - - - - - -
| . $locale->text('GIFI') . qq|{accno}>
| . $locale->text('Description') . qq|
-

-|; - - $lxdebug->leave_sub(); -} - -sub gifi_footer { - $lxdebug->enter_sub(); - - print qq| - - - -{path}> -{login}> -{password}> - -
|; - - if ($form->{coa}) { - print qq| - -|; - - if ($form->{accno} && $form->{orphaned}) { - print qq||; - } - } - - print qq| -
- - - -|; - - $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(); diff --git a/locale/de/all b/locale/de/all index e387fed80..b68905b54 100644 --- a/locale/de/all +++ b/locale/de/all @@ -90,7 +90,6 @@ $self->{texts} = { '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', @@ -272,7 +271,6 @@ aktualisieren wollen?', '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', @@ -413,7 +411,6 @@ gestartet', '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', @@ -489,9 +486,6 @@ gestartet', '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', diff --git a/locale/de/am b/locale/de/am index 4fe809685..150abad91 100644 --- a/locale/de/am +++ b/locale/de/am @@ -47,7 +47,6 @@ $self->{texts} = { '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', @@ -89,7 +88,6 @@ $self->{texts} = { 'Code missing!' => 'kode fehlt!', 'Company' => 'Firma', 'Continue' => 'Weiter', - 'Copy to COA' => 'In Kontenplan kopieren', 'Cost Center' => 'Kostenstelle', 'Costs' => 'Kosten', 'Customer Number' => 'Kundennummer', @@ -116,7 +114,6 @@ $self->{texts} = { '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', @@ -142,10 +139,6 @@ $self->{texts} = { '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', @@ -343,7 +336,6 @@ $self->{subs} = { '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', @@ -359,13 +351,11 @@ $self->{subs} = { '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', @@ -382,7 +372,6 @@ $self->{subs} = { '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', @@ -394,15 +383,12 @@ $self->{subs} = { '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', @@ -421,7 +407,6 @@ $self->{subs} = { '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', @@ -446,7 +431,6 @@ $self->{subs} = { 'erfassen' => 'add', 'konto_erfassen' => 'add_account', 'weiter' => 'continue', - 'in_kontenplan_kopieren' => 'copy_to_coa', 'löschen' => 'delete', 'bearbeiten' => 'edit', 'kontodaten_bearbeiten' => 'edit_account', -- 2.20.1