Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1f225563

Von Moritz Bunkus vor etwa 5 Jahren hinzugefügt

OE.pm: Form-Werte nicht direkt in SQL-Queries schreiben

Unterschiede anzeigen:

SL/OE.pm
1083 1083
    my $transdate = $form->{transdate} ? $dbh->quote($form->{transdate}) : "current_date";
1084 1084

  
1085 1085
    $form->{taxzone_id} = 0 unless ($form->{taxzone_id});
1086
    unshift @values, ($form->{taxzone_id}) x 2;
1086 1087

  
1087 1088
    # retrieve individual items
1088 1089
    # this query looks up all information about the items
......
1105 1106
         JOIN parts p ON (o.parts_id = p.id)
1106 1107
         JOIN oe ON (o.trans_id = oe.id)
1107 1108
         LEFT JOIN chart c1 ON ((SELECT inventory_accno_id                   FROM buchungsgruppen WHERE id=p.buchungsgruppen_id) = c1.id)
1108
         LEFT JOIN chart c2 ON ((SELECT tc.income_accno_id FROM taxzone_charts tc WHERE tc.taxzone_id = '$form->{taxzone_id}' and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c2.id)
1109
         LEFT JOIN chart c3 ON ((SELECT tc.expense_accno_id FROM taxzone_charts tc WHERE tc.taxzone_id = '$form->{taxzone_id}' and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c3.id)
1109
         LEFT JOIN chart c2 ON ((SELECT tc.income_accno_id  FROM taxzone_charts tc WHERE tc.taxzone_id = ? and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c2.id)
1110
         LEFT JOIN chart c3 ON ((SELECT tc.expense_accno_id FROM taxzone_charts tc WHERE tc.taxzone_id = ? and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c3.id)
1110 1111
         LEFT JOIN project pr ON (o.project_id = pr.id)
1111 1112
         LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id) | .
1112 1113
      ($form->{id}

Auch abrufbar als: Unified diff