Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4e8e33e9

Von G. Richardson vor fast 4 Jahren hinzugefügt

  • ID 4e8e33e9c0a98f10551a4ae18597dc724e621a13
  • Vorgänger a05cda74
  • Nachfolger c4cea463

AR/IR/OE - Steuerbeschreibung an Oberfläche / Druck aus tax_id holen

siehe Kommentare in SL/IS.pm

Wenn ein Steuerautomatikkonto mehrmals bei den Steuern auftaucht kann
man die Steuerbeschreibung nicht mehr eindeutig anhand der Kontonummer
(hier als taxnumber verwendet) bestimmen, von daher wird jetzt immer
auch die tax_id mit ausgelesen.

Hier gibt es noch ganz viel Refactoringpotential...

Unterschiede anzeigen:

SL/IR.pm
1071 1071
    # get tax rates and description
1072 1072
    my $accno_id = ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno};
1073 1073
    $query =
1074
      qq|SELECT c.accno, t.taxdescription, t.rate,
1074
      qq|SELECT c.accno, t.taxdescription, t.rate, t.id as tax_id,
1075 1075
                c.accno as taxnumber   -- taxnumber is same as accno, but still accessed as taxnumber in code
1076 1076
         FROM tax t
1077 1077
         LEFT JOIN chart c ON (c.id = t.chart_id)
......
1098 1098
        $form->{"$ptr->{accno}_rate"}         = $ptr->{rate};
1099 1099
        $form->{"$ptr->{accno}_description"}  = $ptr->{taxdescription};
1100 1100
        $form->{"$ptr->{accno}_taxnumber"}    = $ptr->{taxnumber};
1101
        $form->{"$ptr->{accno}_tax_id"}       = $ptr->{tax_id};
1101 1102
        $form->{taxaccounts}                 .= "$ptr->{accno} ";
1102 1103
      }
1103 1104

  
......
1341 1342
    # get tax rates and description
1342 1343
    my $accno_id = ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno};
1343 1344
    $query =
1344
      qq|SELECT c.accno, t.taxdescription, t.rate, c.accno as taxnumber
1345
      qq|SELECT c.accno, t.taxdescription, t.rate, c.accno as taxnumber, t.id as tax_id
1345 1346
         FROM tax t
1346 1347
         LEFT JOIN chart c on (c.id = t.chart_id)
1347 1348
         WHERE t.id IN
......
1372 1373
        $form->{"$ptr->{accno}_rate"}         = $ptr->{rate};
1373 1374
        $form->{"$ptr->{accno}_description"}  = $ptr->{taxdescription};
1374 1375
        $form->{"$ptr->{accno}_taxnumber"}    = $ptr->{taxnumber};
1376
        $form->{"$ptr->{accno}_tax_id"}       = $ptr->{tax_id};
1375 1377
        $form->{taxaccounts}                 .= "$ptr->{accno} ";
1376 1378
      }
1377 1379

  

Auch abrufbar als: Unified diff