Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0c4b5126

Von Sven Schöling vor fast 12 Jahren hinzugefügt

  • ID 0c4b51268cd7b4dd912442e6024543fadc56f740
  • Vorgänger 8eca5e84
  • Nachfolger cde799ca

Revert "Fehler beim Schreiben von tax_id"

This reverts commit 94915eda8e84805b5745b81fefc67be9ecde55f8.

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|  ?, ?, ?, ?, ?)|;
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))|;
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"}, conv_i($form->{"tax_id_$i"}));
217
                   $project_id, $form->{"taxkey_$i"}, $form->{AP_amounts}{"amount_$i"}, conv_date($form->{transdate}));
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|  ?, ?, ?, ?, ?)|;
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))|;
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"}, conv_i($form->{"tax_id_$i"}));
229
                     $project_id, $form->{"taxkey_$i"}, $form->{AP_amounts}{"tax_$i"}, conv_date($form->{transdate}));
230 230
          do_query($form, $dbh, $query, @values);
231 231
        }
232 232

  

Auch abrufbar als: Unified diff