Revision 90bb521a
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/RC.pm | ||
---|---|---|
93 | 93 |
($form->{beginningbalance}, $form->{category}) = |
94 | 94 |
selectrow_query($form, $dbh, $query, @values); |
95 | 95 |
|
96 |
my %oid = ('Pg' => 'ac.acc_trans_id', |
|
97 |
'Oracle' => 'ac.rowid'); |
|
98 | 96 |
@values = (); |
99 | 97 |
$query = |
100 | 98 |
qq|SELECT c.name, ac.source, ac.transdate, ac.cleared, | . |
101 | 99 |
qq| ac.fx_transaction, ac.amount, a.id, | . |
102 |
qq| $oid{$myconfig->{dbdriver}} AS oid | .
|
|
100 |
qq| ac.acc_trans_id AS oid | .
|
|
103 | 101 |
qq|FROM customer c, acc_trans ac, ar a, chart ch | . |
104 | 102 |
qq|WHERE c.id = a.customer_id | . |
105 | 103 |
qq| AND ac.cleared = '0' | . |
... | ... | |
123 | 121 |
|
124 | 122 |
qq|SELECT v.name, ac.source, ac.transdate, ac.cleared, | . |
125 | 123 |
qq| ac.fx_transaction, ac.amount, a.id, | . |
126 |
qq| $oid{$myconfig->{dbdriver}} AS oid | .
|
|
124 |
qq| ac.acc_trans_id AS oid | .
|
|
127 | 125 |
qq|FROM vendor v, acc_trans ac, ap a, chart ch | . |
128 | 126 |
qq|WHERE v.id = a.vendor_id | . |
129 | 127 |
qq| AND ac.cleared = '0' | . |
... | ... | |
148 | 146 |
|
149 | 147 |
qq|SELECT g.description, ac.source, ac.transdate, ac.cleared, | . |
150 | 148 |
qq| ac.fx_transaction, ac.amount, g.id, | . |
151 |
qq| $oid{$myconfig->{dbdriver}} AS oid | .
|
|
149 |
qq| ac.acc_trans_id AS oid | .
|
|
152 | 150 |
qq|FROM gl g, acc_trans ac, chart ch | . |
153 | 151 |
qq|WHERE g.id = ac.trans_id | . |
154 | 152 |
qq| AND ac.cleared = '0' | . |
... | ... | |
186 | 184 |
my $dbh = $form->dbconnect($myconfig); |
187 | 185 |
|
188 | 186 |
my ($query, $i); |
189 |
my %oid = ('Pg' => 'acc_trans_id', |
|
190 |
'Oracle' => 'rowid'); |
|
191 | 187 |
|
192 | 188 |
# clear flags |
193 | 189 |
for $i (1 .. $form->{rowcount}) { |
194 | 190 |
if ($form->{"cleared_$i"}) { |
195 | 191 |
$query = |
196 | 192 |
qq|UPDATE acc_trans SET cleared = '1' | . |
197 |
qq|WHERE $oid{$myconfig->{dbdriver}} = ?|;
|
|
193 |
qq|WHERE acc_trans_id = ?|;
|
|
198 | 194 |
do_query($form, $dbh, $query, $form->{"oid_$i"}); |
199 | 195 |
|
200 | 196 |
# clear fx_transaction |
201 | 197 |
if ($form->{"fxoid_$i"}) { |
202 | 198 |
$query = |
203 | 199 |
qq|UPDATE acc_trans SET cleared = '1' | . |
204 |
qq|WHERE $oid{$myconfig->{dbdriver}} = ?|;
|
|
200 |
qq|WHERE acc_trans_id = ?|;
|
|
205 | 201 |
do_query($form, $dbh, $query, $form->{"fxoid_$i"}); |
206 | 202 |
} |
207 | 203 |
} |
Auch abrufbar als: Unified diff
Alle Vorkommen von dbdriver, sid, Oracle entfernt
...und gegen das hardcodierte Werte für PostgreSQL ersetzt.