Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 76c486e3

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID 76c486e3bf157e844b0cf11828d55dae2cb7e439
  • Vorgänger 3d967be3
  • Nachfolger c510d88b

Und wieder ein Schwung strict.

Unterschiede anzeigen:

SL/BP.pm
36 36

  
37 37
use SL::DBUtils;
38 38

  
39
use strict;
40

  
39 41
sub get_vc {
40 42
  $main::lxdebug->enter_sub();
41 43

  
......
56 58
  my $vc = $form->{vc} eq "customer" ? "customer" : "vendor";
57 59
  my $arap_type = defined($arap{$form->{type}}) ? $arap{$form->{type}} : 'ar';
58 60

  
59
  $query =
61
  my $query =
60 62
    qq|SELECT count(*) | .
61 63
    qq|FROM (SELECT DISTINCT ON (vc.id) vc.id FROM $vc vc, $arap_type a, status s | .
62 64
    qq|  WHERE a.${vc}_id = vc.id  AND s.trans_id = a.id AND s.formname = ? | .
......
72 74
      qq|WHERE a.${vc}_id = vc.id AND s.trans_id = a.id AND s.formname = ? | .
73 75
      qq|  AND s.spoolfile IS NOT NULL|;
74 76

  
75
    $sth = $dbh->prepare($query);
77
    my $sth = $dbh->prepare($query);
76 78
    $sth->execute($form->{type}) || $form->dberror($query . " ($form->{type})");
77 79

  
78 80
    $form->{"all_${vc}"} = [];
79
    while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
81
    while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
80 82
      push @{ $form->{"all_${vc}"} }, $ref;
81 83
    }
82 84
    $sth->finish;
......
103 105
  $sth->execute($form->{type}) || $form->dberror($query . " ($form->{type})");
104 106

  
105 107
  $form->{accounts} = [];
106
  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
108
  while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
107 109
    push @{ $form->{accounts} }, $ref;
108 110
  }
109 111

  
......
192 194
    }
193 195
  }
194 196

  
195
  my @a = (transdate, $invnumber, name);
197
  my @a = ("transdate", $invnumber, "name");
196 198
  my $sortorder = join ', ', $form->sort_columns(@a);
197 199

  
198 200
  if (grep({ $_ eq $form->{sort} }
......
207 209
    $form->dberror($query . " (" . join(", ", @values) . ")");
208 210

  
209 211
  $form->{SPOOL} = [];
210
  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
212
  while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
211 213
    push @{ $form->{SPOOL} }, $ref;
212 214
  }
213 215

  
......
279 281
      open(OUT, $output) or $form->error("$output : $!");
280 282

  
281 283
      $form->{"spoolfile_$i"} =~ s|.*/||;
282
      $spoolfile = qq|$spool/$form->{"spoolfile_$i"}|;
284
      my $spoolfile = qq|$spool/$form->{"spoolfile_$i"}|;
283 285

  
284 286
      # send file to printer
285 287
      open(IN, $spoolfile) or $form->error("$spoolfile : $!");

Auch abrufbar als: Unified diff