Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dceb9f20

Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt

  • ID dceb9f20c37fca889bb722293833a81cb876ac17
  • Vorgänger 3af5e2e0
  • Nachfolger 5ac0b1b2

Bugfix von chart_link und tax_id in acc_trans

Es gab noch einige Bugs bei VK- und EK-Rechnungen.

1. Der Steuerschlüssel wurde nicht richtig geschrieben.
2. tax_id war noch an einigen Stellen NULL.

Unterschiede anzeigen:

SL/IS.pm
870 870
                                       WHERE accno = ?) 
871 871
                      AND startdate <= ? 
872 872
                      ORDER BY startdate DESC LIMIT 1),
873
                     (SELECT taxkey_id  FROM chart WHERE accno = ?), ?,
873
                     (SELECT taxkey_id
874
                      FROM taxkeys 
875
                      WHERE chart_id= (SELECT id  
876
                                       FROM chart 
877
                                       WHERE accno = ?) 
878
                      AND startdate <= ? 
879
                      ORDER BY startdate DESC LIMIT 1),
880
                     ?,
874 881
                     (SELECT link FROM chart WHERE accno = ?))|;
875
        @values = (conv_i($trans_id), $accno, $form->{amount}{$trans_id}{$accno}, conv_date($form->{invdate}), $accno, conv_date($taxdate), $accno, conv_i($project_id), $accno);
882
        @values = (conv_i($trans_id), $accno, $form->{amount}{$trans_id}{$accno}, conv_date($form->{invdate}), $accno, conv_date($taxdate), $accno, conv_date($taxdate), conv_i($project_id), $accno);
876 883
        do_query($form, $dbh, $query, @values);
877 884
        $form->{amount}{$trans_id}{$accno} = 0;
878 885
      }
......
892 899
                                       WHERE accno = ?) 
893 900
                      AND startdate <= ? 
894 901
                      ORDER BY startdate DESC LIMIT 1),
895
                     (SELECT taxkey_id FROM chart WHERE accno = ?), ?,
902
                     (SELECT taxkey_id 
903
                      FROM taxkeys 
904
                      WHERE chart_id= (SELECT id 
905
                                       FROM chart 
906
                                       WHERE accno = ?) 
907
                      AND startdate <= ? 
908
                      ORDER BY startdate DESC LIMIT 1),
909
                     ?,
896 910
                     (SELECT link FROM chart WHERE accno = ?))|;
897
        @values = (conv_i($trans_id), $accno, $form->{amount}{$trans_id}{$accno}, conv_date($form->{invdate}), $accno, conv_date($taxdate), $accno, conv_i($project_id), $accno);
911
        @values = (conv_i($trans_id), $accno, $form->{amount}{$trans_id}{$accno}, conv_date($form->{invdate}), $accno, conv_date($taxdate), $accno, conv_date($taxdate), conv_i($project_id), $accno);
898 912
        do_query($form, $dbh, $query, @values);
899 913
      }
900 914
    }
......
949 963
                                     WHERE accno = ?) 
950 964
                    AND startdate <= ? 
951 965
                    ORDER BY startdate DESC LIMIT 1),
952
                   (SELECT taxkey_id FROM chart WHERE accno = ?), ?,
966
                   (SELECT taxkey_id 
967
                    FROM taxkeys 
968
                    WHERE chart_id= (SELECT id  
969
                                     FROM chart 
970
                                     WHERE accno = ?) 
971
                    AND startdate <= ? 
972
                    ORDER BY startdate DESC LIMIT 1),
973
                   ?,
953 974
                   (SELECT link FROM chart WHERE accno = ?))|;
954
        @values = (conv_i($form->{"id"}), $form->{AR}, $amount, $form->{"datepaid_$i"}, $form->{AR}, conv_date($taxdate), $form->{AR}, $project_id, $form->{AR});
975
        @values = (conv_i($form->{"id"}), $form->{AR}, $amount, $form->{"datepaid_$i"}, $form->{AR}, conv_date($taxdate), $form->{AR}, conv_date($taxdate), $project_id, $form->{AR});
955 976
        do_query($form, $dbh, $query, @values);
956 977
      }
957 978

  
......
969 990
                                   WHERE accno = ?) 
970 991
                  AND startdate <= ? 
971 992
                  ORDER BY startdate DESC LIMIT 1),
972
                 (SELECT taxkey_id FROM chart WHERE accno = ?), ?,
993
                 (SELECT taxkey_id 
994
                  FROM taxkeys 
995
                  WHERE chart_id= (SELECT id  
996
                                   FROM chart 
997
                                   WHERE accno = ?) 
998
                  AND startdate <= ? 
999
                  ORDER BY startdate DESC LIMIT 1),
1000
                 ?,
973 1001
                 (SELECT link FROM chart WHERE accno = ?))|;
974 1002
      @values = (conv_i($form->{"id"}), $accno, $form->{"paid_$i"}, $form->{"datepaid_$i"},
975
                 $gldate, $form->{"source_$i"}, $form->{"memo_$i"}, $accno, conv_date($taxdate), $accno, $project_id, $accno);
1003
                 $gldate, $form->{"source_$i"}, $form->{"memo_$i"}, $accno, conv_date($taxdate), $accno, conv_date($taxdate), $project_id, $accno);
976 1004
      do_query($form, $dbh, $query, @values);
977 1005

  
978 1006
      # exchangerate difference
......
1021 1049
                                   WHERE accno = ?) 
1022 1050
                  AND startdate <= ? 
1023 1051
                  ORDER BY startdate DESC LIMIT 1),
1024
                 (SELECT taxkey_id FROM chart WHERE accno = ?), ?,
1052
                 (SELECT taxkey_id 
1053
                  FROM taxkeys 
1054
                  WHERE chart_id= (SELECT id  
1055
                                   FROM chart 
1056
                                   WHERE accno = ?) 
1057
                  AND startdate <= ? 
1058
                  ORDER BY startdate DESC LIMIT 1),
1059
                 ?,
1025 1060
                 (SELECT link FROM chart WHERE accno = ?))|;
1026
        @values = (conv_i($form->{"id"}), $accno, $form->{fx}{$accno}{$transdate}, conv_date($transdate), $accno, conv_date($taxdate), $accno, conv_i($project_id), $accno);
1061
        @values = (conv_i($form->{"id"}), $accno, $form->{fx}{$accno}{$transdate}, conv_date($transdate), $accno, conv_date($taxdate), $accno, conv_date($taxdate), conv_i($project_id), $accno);
1027 1062
        do_query($form, $dbh, $query, @values);
1028 1063
      }
1029 1064
    }

Auch abrufbar als: Unified diff