Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 90bb521a

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 90bb521a25eeb37c5bbae1ff68c38e6c142b6e6b
  • Vorgänger b49ec094
  • Nachfolger 66c08b64

Alle Vorkommen von dbdriver, sid, Oracle entfernt

...und gegen das hardcodierte Werte für PostgreSQL ersetzt.

Unterschiede anzeigen:

SL/CA.pm
182 182

  
183 183
  my $sortorder = join ', ',
184 184
    $form->sort_columns(qw(transdate reference description));
185
  my $false = ($myconfig->{dbdriver} eq 'Pg') ? "FALSE" : q|'0'|;
186

  
187
  # Oracle workaround, use ordinal positions
188
  my %ordinal = (transdate   => 4,
189
                 reference   => 2,
190
                 description => 3);
191
  map { $sortorder =~ s/$_/$ordinal{$_}/ } keys %ordinal;
192 185

  
193 186
  my ($null, $department_id) = split(/--/, $form->{department});
194 187
  my ($dpt_where, $dpt_join, @department_values);
......
272 265
    # get all transactions
273 266
    $query =
274 267
      qq|SELECT a.id, a.reference, a.description, ac.transdate, ac.chart_id, | .
275
      qq|  $false AS invoice, ac.amount, 'gl' as module, | .
268
      qq|  FALSE AS invoice, ac.amount, 'gl' as module, | .
276 269
      qq§(SELECT accno||'--'||rate FROM tax LEFT JOIN chart ON (tax.chart_id=chart.id) WHERE tax.id = (SELECT tax_id FROM taxkeys WHERE taxkey_id = ac.taxkey AND taxkeys.startdate <= ac.transdate ORDER BY taxkeys.startdate DESC LIMIT 1)) AS taxinfo, ac.source || ' ' || ac.memo AS memo § .
277 270
      qq|FROM acc_trans ac, gl a | .
278 271
      $dpt_join .

Auch abrufbar als: Unified diff