Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 94915eda

Von Niclas Zimmermann vor fast 12 Jahren hinzugefügt

  • ID 94915eda8e84805b5745b81fefc67be9ecde55f8
  • Vorgänger a4fce26e
  • Nachfolger 07291915

Fehler beim Schreiben von tax_id

Bei Kreditorenbuchungen wurde noch die falsche Steuer-id geschrieben,
wenn man den Steuersatz in einer Position selbst anpasst.

Unterschiede anzeigen:

SL/AP.pm
211 211
          qq|INSERT INTO acc_trans | .
212 212
          qq|  (trans_id, chart_id, amount, transdate, project_id, taxkey, tax_id)| .
213 213
          qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), | .
214
          qq|  ?, ?, ?, ?, (SELECT tax_id FROM taxkeys WHERE taxkey_id= (SELECT taxkey_id  FROM chart WHERE accno = ?) AND startdate <= ? ORDER BY startdate DESC LIMIT 1))|;
214
          qq|  ?, ?, ?, ?, ?)|;
215 215
        @values = ($form->{id}, $form->{AP_amounts}{"amount_$i"},
216 216
                   $form->{"amount_$i"}, conv_date($form->{transdate}),
217
                   $project_id, $form->{"taxkey_$i"}, $form->{AP_amounts}{"amount_$i"}, conv_date($form->{transdate}));
217
                   $project_id, $form->{"taxkey_$i"}, conv_i($form->{"tax_id_$i"}));
218 218
        do_query($form, $dbh, $query, @values);
219 219

  
220 220
        if ($form->{"tax_$i"} != 0) {
......
223 223
            qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, | .
224 224
            qq|  project_id, taxkey, tax_id) | .
225 225
            qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), | .
226
            qq|  ?, ?, ?, ?, (SELECT tax_id FROM taxkeys WHERE taxkey_id= (SELECT taxkey_id  FROM chart WHERE accno = ?) AND startdate <= ? ORDER BY startdate DESC LIMIT 1))|;
226
            qq|  ?, ?, ?, ?, ?)|;
227 227
          @values = ($form->{id}, $form->{AP_amounts}{"tax_$i"},
228 228
                     $form->{"tax_$i"}, conv_date($form->{transdate}),
229
                     $project_id, $form->{"taxkey_$i"}, $form->{AP_amounts}{"tax_$i"}, conv_date($form->{transdate}));
229
                     $project_id, $form->{"taxkey_$i"}, conv_i($form->{"tax_id_$i"}));
230 230
          do_query($form, $dbh, $query, @values);
231 231
        }
232 232

  

Auch abrufbar als: Unified diff