Revision 0a7acc87
Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
241 | 241 |
$query = |
242 | 242 |
qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, taxkey, tax_id, chart_link) | . |
243 | 243 |
qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, | . |
244 |
qq| (SELECT taxkey_id FROM chart WHERE accno = ?),| .
|
|
245 |
qq| (SELECT tax_id| .
|
|
246 |
qq| FROM taxkeys| .
|
|
247 |
qq| WHERE chart_id= (SELECT id | .
|
|
248 |
qq| FROM chart| .
|
|
249 |
qq| WHERE accno = ?)| .
|
|
250 |
qq| AND startdate <= ?| .
|
|
244 |
qq| (SELECT taxkey_id FROM chart WHERE accno = ?),| . |
|
245 |
qq| (SELECT tax_id| . |
|
246 |
qq| FROM taxkeys| . |
|
247 |
qq| WHERE chart_id= (SELECT id | . |
|
248 |
qq| FROM chart| . |
|
249 |
qq| WHERE accno = ?)| . |
|
250 |
qq| AND startdate <= ?| . |
|
251 | 251 |
qq| ORDER BY startdate DESC LIMIT 1),| . |
252 | 252 |
qq| (SELECT c.link FROM chart c WHERE c.accno = ?))|; |
253 | 253 |
@values = ($form->{id}, $form->{AP_amounts}{payables}, $form->{payables}, |
... | ... | |
299 | 299 |
qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, project_id, taxkey, tax_id, chart_link) | . |
300 | 300 |
qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, | . |
301 | 301 |
qq| (SELECT taxkey_id FROM chart WHERE accno = ?),| . |
302 |
qq| (SELECT tax_id| .
|
|
303 |
qq| FROM taxkeys| .
|
|
304 |
qq| WHERE chart_id= (SELECT id | .
|
|
305 |
qq| FROM chart| .
|
|
306 |
qq| WHERE accno = ?)| .
|
|
307 |
qq| AND startdate <= ?| .
|
|
302 |
qq| (SELECT tax_id| . |
|
303 |
qq| FROM taxkeys| . |
|
304 |
qq| WHERE chart_id= (SELECT id | . |
|
305 |
qq| FROM chart| . |
|
306 |
qq| WHERE accno = ?)| . |
|
307 |
qq| AND startdate <= ?| . |
|
308 | 308 |
qq| ORDER BY startdate DESC LIMIT 1),| . |
309 | 309 |
qq| (SELECT c.link FROM chart c WHERE c.accno = ?))|; |
310 | 310 |
@values = ($form->{id}, $form->{AP_payables}, $amount, |
... | ... | |
320 | 320 |
$query = |
321 | 321 |
qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, source, memo, project_id, taxkey, tax_id, chart_link) | . |
322 | 322 |
qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, ?, ?, ?, | . |
323 |
qq| (SELECT taxkey_id FROM chart WHERE accno = ?), | .
|
|
323 |
qq| (SELECT taxkey_id FROM chart WHERE accno = ?), | . |
|
324 | 324 |
qq| (SELECT tax_id| . |
325 |
qq| FROM taxkeys| .
|
|
326 |
qq| WHERE chart_id= (SELECT id | .
|
|
327 |
qq| FROM chart| .
|
|
328 |
qq| WHERE accno = ?)| .
|
|
329 |
qq| AND startdate <= ?| .
|
|
325 |
qq| FROM taxkeys| . |
|
326 |
qq| WHERE chart_id= (SELECT id | . |
|
327 |
qq| FROM chart| . |
|
328 |
qq| WHERE accno = ?)| . |
|
329 |
qq| AND startdate <= ?| . |
|
330 | 330 |
qq| ORDER BY startdate DESC LIMIT 1),| . |
331 | 331 |
qq| (SELECT c.link FROM chart c WHERE c.accno = ?))|; |
332 | 332 |
@values = ($form->{id}, $form->{"AP_paid_account_$i"}, $form->{"paid_$i"}, |
... | ... | |
345 | 345 |
qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey, tax_id, chart_link) | . |
346 | 346 |
qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, | . |
347 | 347 |
qq| (SELECT taxkey_id FROM chart WHERE accno = ?), | . |
348 |
qq| (SELECT tax_id| .
|
|
349 |
qq| FROM taxkeys| .
|
|
350 |
qq| WHERE chart_id= (SELECT id | .
|
|
351 |
qq| FROM chart| .
|
|
352 |
qq| WHERE accno = ?)| .
|
|
353 |
qq| AND startdate <= ?| .
|
|
348 |
qq| (SELECT tax_id| . |
|
349 |
qq| FROM taxkeys| . |
|
350 |
qq| WHERE chart_id= (SELECT id | . |
|
351 |
qq| FROM chart| . |
|
352 |
qq| WHERE accno = ?)| . |
|
353 |
qq| AND startdate <= ?| . |
|
354 | 354 |
qq| ORDER BY startdate DESC LIMIT 1),| . |
355 | 355 |
qq| (SELECT c.link FROM chart c WHERE c.accno = ?))|; |
356 | 356 |
@values = ($form->{id}, $form->{"AP_paid_account_$i"}, $amount, |
... | ... | |
372 | 372 |
qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey, tax_id, chart_link) | . |
373 | 373 |
qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, | . |
374 | 374 |
qq| (SELECT taxkey_id FROM chart WHERE accno = ?)| . |
375 |
qq| (SELECT tax_id| .
|
|
376 |
qq| FROM taxkeys| .
|
|
377 |
qq| WHERE chart_id= (SELECT id | .
|
|
378 |
qq| FROM chart| .
|
|
379 |
qq| WHERE accno = ?)| .
|
|
380 |
qq| AND startdate <= ?| .
|
|
375 |
qq| (SELECT tax_id| . |
|
376 |
qq| FROM taxkeys| . |
|
377 |
qq| WHERE chart_id= (SELECT id | . |
|
378 |
qq| FROM chart| . |
|
379 |
qq| WHERE accno = ?)| . |
|
380 |
qq| AND startdate <= ?| . |
|
381 | 381 |
qq| ORDER BY startdate DESC LIMIT 1),| . |
382 | 382 |
qq| (SELECT c.link FROM chart c WHERE c.accno = ?))|; |
383 |
@values = ($form->{id},
|
|
383 |
@values = ($form->{id}, |
|
384 | 384 |
($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno}, |
385 | 385 |
$amount, conv_date($form->{"datepaid_$i"}), $project_id, |
386 | 386 |
($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno}, |
Auch abrufbar als: Unified diff
Trailing Whitespaces entfernen
Dieser Commit entfernt lediglich Leerzeichen am Ende der Zeilen.