Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 96dbc076

Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt

  • ID 96dbc0768869a53c1d146efbc0bd364c2ea9de63
  • Vorgänger a4d74009
  • Nachfolger aa0fece0

Entfernung von trailing whitespaces

Unterschiede anzeigen:

SL/AP.pm
240 240
    $query =
241 241
      qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, taxkey, tax_id, chart_link) | .
242 242
      qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, | .
243
      qq|        (SELECT taxkey_id FROM chart WHERE accno = ?),| . 
244
      qq|        (SELECT tax_id| . 
245
      qq|         FROM taxkeys| . 
246
      qq|         WHERE chart_id= (SELECT id | . 
247
      qq|                          FROM chart| . 
248
      qq|                          WHERE accno = ?)| . 
249
      qq|         AND startdate <= ?| . 
243
      qq|        (SELECT taxkey_id FROM chart WHERE accno = ?),| .
244
      qq|        (SELECT tax_id| .
245
      qq|         FROM taxkeys| .
246
      qq|         WHERE chart_id= (SELECT id | .
247
      qq|                          FROM chart| .
248
      qq|                          WHERE accno = ?)| .
249
      qq|         AND startdate <= ?| .
250 250
      qq|         ORDER BY startdate DESC LIMIT 1),| .
251 251
      qq|        (SELECT c.link FROM chart c WHERE c.accno = ?))|;
252 252
    @values = ($form->{id}, $form->{AP_amounts}{payables}, $form->{payables},
......
298 298
          qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, project_id, taxkey, tax_id, chart_link) | .
299 299
          qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, | .
300 300
          qq|        (SELECT taxkey_id FROM chart WHERE accno = ?),| .
301
          qq|        (SELECT tax_id| . 
302
          qq|         FROM taxkeys| . 
303
          qq|         WHERE chart_id= (SELECT id | . 
304
          qq|                          FROM chart| . 
305
          qq|                          WHERE accno = ?)| . 
306
          qq|         AND startdate <= ?| . 
301
          qq|        (SELECT tax_id| .
302
          qq|         FROM taxkeys| .
303
          qq|         WHERE chart_id= (SELECT id | .
304
          qq|                          FROM chart| .
305
          qq|                          WHERE accno = ?)| .
306
          qq|         AND startdate <= ?| .
307 307
          qq|         ORDER BY startdate DESC LIMIT 1),| .
308 308
          qq|        (SELECT c.link FROM chart c WHERE c.accno = ?))|;
309 309
        @values = ($form->{id}, $form->{AP_payables}, $amount,
......
319 319
      $query =
320 320
        qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, source, memo, project_id, taxkey, tax_id, chart_link) | .
321 321
        qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, ?, ?, ?, | .
322
        qq|        (SELECT taxkey_id FROM chart WHERE accno = ?), | . 
322
        qq|        (SELECT taxkey_id FROM chart WHERE accno = ?), | .
323 323
        qq|        (SELECT tax_id| .
324
        qq|         FROM taxkeys| . 
325
        qq|         WHERE chart_id= (SELECT id | . 
326
        qq|                          FROM chart| . 
327
        qq|                          WHERE accno = ?)| . 
328
        qq|         AND startdate <= ?| . 
324
        qq|         FROM taxkeys| .
325
        qq|         WHERE chart_id= (SELECT id | .
326
        qq|                          FROM chart| .
327
        qq|                          WHERE accno = ?)| .
328
        qq|         AND startdate <= ?| .
329 329
        qq|         ORDER BY startdate DESC LIMIT 1),| .
330 330
        qq|        (SELECT c.link FROM chart c WHERE c.accno = ?))|;
331 331
      @values = ($form->{id}, $form->{"AP_paid_account_$i"}, $form->{"paid_$i"},
......
344 344
          qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey, tax_id, chart_link) | .
345 345
          qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, | .
346 346
          qq|        (SELECT taxkey_id FROM chart WHERE accno = ?), | .
347
          qq|        (SELECT tax_id| . 
348
          qq|         FROM taxkeys| . 
349
          qq|         WHERE chart_id= (SELECT id | . 
350
          qq|                          FROM chart| . 
351
          qq|                          WHERE accno = ?)| . 
352
          qq|         AND startdate <= ?| . 
347
          qq|        (SELECT tax_id| .
348
          qq|         FROM taxkeys| .
349
          qq|         WHERE chart_id= (SELECT id | .
350
          qq|                          FROM chart| .
351
          qq|                          WHERE accno = ?)| .
352
          qq|         AND startdate <= ?| .
353 353
          qq|         ORDER BY startdate DESC LIMIT 1),| .
354 354
          qq|        (SELECT c.link FROM chart c WHERE c.accno = ?))|;
355 355
        @values = ($form->{id}, $form->{"AP_paid_account_$i"}, $amount,
......
371 371
          qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey, tax_id, chart_link) | .
372 372
          qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, | .
373 373
          qq|        (SELECT taxkey_id FROM chart WHERE accno = ?)| .
374
          qq|        (SELECT tax_id| . 
375
          qq|         FROM taxkeys| . 
376
          qq|         WHERE chart_id= (SELECT id | . 
377
          qq|                          FROM chart| . 
378
          qq|                          WHERE accno = ?)| . 
379
          qq|         AND startdate <= ?| . 
374
          qq|        (SELECT tax_id| .
375
          qq|         FROM taxkeys| .
376
          qq|         WHERE chart_id= (SELECT id | .
377
          qq|                          FROM chart| .
378
          qq|                          WHERE accno = ?)| .
379
          qq|         AND startdate <= ?| .
380 380
          qq|         ORDER BY startdate DESC LIMIT 1),| .
381 381
          qq|        (SELECT c.link FROM chart c WHERE c.accno = ?))|;
382
        @values = ($form->{id}, 
382
        @values = ($form->{id},
383 383
                   ($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno},
384 384
                   $amount, conv_date($form->{"datepaid_$i"}), $project_id,
385 385
                   ($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno},
SL/AR.pm
191 191
    # add recievables
192 192
    $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, taxkey, tax_id, chart_link)
193 193
                 VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, (SELECT taxkey_id FROM chart WHERE accno = ?),
194
                 (SELECT tax_id 
195
                  FROM taxkeys 
196
                  WHERE chart_id= (SELECT id  
197
                                   FROM chart 
198
                                   WHERE accno = ?) 
199
                  AND startdate <= ? 
194
                 (SELECT tax_id
195
                  FROM taxkeys
196
                  WHERE chart_id= (SELECT id
197
                                   FROM chart
198
                                   WHERE accno = ?)
199
                  AND startdate <= ?
200 200
                  ORDER BY startdate DESC LIMIT 1),
201 201
                 (SELECT c.link FROM chart c WHERE c.accno = ?))|;
202 202
    @values = (conv_i($form->{id}), $form->{AR_amounts}{receivables}, conv_i($form->{receivables}), conv_date($form->{transdate}),
......
239 239
        # add receivable
240 240
        $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, project_id, taxkey, tax_id, chart_link)
241 241
                     VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, (SELECT taxkey_id FROM chart WHERE accno = ?),
242
                     (SELECT tax_id 
243
                      FROM taxkeys 
244
                      WHERE chart_id= (SELECT id 
245
                                       FROM chart 
246
                                       WHERE accno = ?) 
247
                      AND startdate <= ? 
242
                     (SELECT tax_id
243
                      FROM taxkeys
244
                      WHERE chart_id= (SELECT id
245
                                       FROM chart
246
                                       WHERE accno = ?)
247
                      AND startdate <= ?
248 248
                      ORDER BY startdate DESC LIMIT 1),
249 249
                     (SELECT c.link FROM chart c WHERE c.accno = ?))|;
250 250
        @values = (conv_i($form->{id}), $form->{AR}{receivables}, $amount, conv_date($form->{"datepaid_$i"}), $project_id, $form->{AR}{receivables}, $form->{AR}{receivables}, conv_date($form->{"datepaid_$i"}),
......
260 260
        $amount = $form->{"paid_$i"} * -1;
261 261
        $query  = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, source, memo, project_id, taxkey, tax_id, chart_link)
262 262
                     VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, ?, ?, ?, (SELECT taxkey_id FROM chart WHERE accno = ?),
263
                     (SELECT tax_id 
264
                      FROM taxkeys 
265
                      WHERE chart_id= (SELECT id 
266
                                       FROM chart 
267
                                       WHERE accno = ?) 
268
                      AND startdate <= ? 
263
                     (SELECT tax_id
264
                      FROM taxkeys
265
                      WHERE chart_id= (SELECT id
266
                                       FROM chart
267
                                       WHERE accno = ?)
268
                      AND startdate <= ?
269 269
                      ORDER BY startdate DESC LIMIT 1),
270 270
                     (SELECT c.link FROM chart c WHERE c.accno = ?))|;
271 271
        @values = (conv_i($form->{id}), $form->{AR}{"paid_$i"}, $amount, conv_date($form->{"datepaid_$i"}), $gldate, $form->{"source_$i"}, $form->{"memo_$i"}, $project_id, $form->{AR}{"paid_$i"},
......
278 278
        if ($amount != 0) {
279 279
          $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey, tax_id, chart_link)
280 280
                       VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, (SELECT taxkey_id FROM chart WHERE accno = ?),
281
                       (SELECT tax_id 
282
                        FROM taxkeys 
283
                        WHERE chart_id= (SELECT id  
284
                                         FROM chart 
285
                                         WHERE accno = ?) 
286
                        AND startdate <= ? 
281
                       (SELECT tax_id
282
                        FROM taxkeys
283
                        WHERE chart_id= (SELECT id
284
                                         FROM chart
285
                                         WHERE accno = ?)
286
                        AND startdate <= ?
287 287
                        ORDER BY startdate DESC LIMIT 1),
288 288
                       (SELECT c.link FROM chart c WHERE c.accno = ?))|;
289 289
          @values = (conv_i($form->{id}), $form->{AR}{"paid_$i"}, $amount, conv_date($form->{"datepaid_$i"}), $project_id, $form->{AR}{"paid_$i"},
......
298 298
          my $accno = ($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno};
299 299
          $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey, tax_id, chart_link)
300 300
                       VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, (SELECT taxkey_id FROM chart WHERE accno = ?),
301
                       (SELECT tax_id 
302
                        FROM taxkeys 
303
                        WHERE chart_id= (SELECT id  
304
                                         FROM chart 
305
                                         WHERE accno = ?) 
306
                        AND startdate <= ? 
301
                       (SELECT tax_id
302
                        FROM taxkeys
303
                        WHERE chart_id= (SELECT id
304
                                         FROM chart
305
                                         WHERE accno = ?)
306
                        AND startdate <= ?
307 307
                        ORDER BY startdate DESC LIMIT 1),
308 308
                       (SELECT c.link FROM chart c WHERE c.accno = ?))|;
309 309
          @values = (conv_i($form->{id}), $accno, $amount, conv_date($form->{"datepaid_$i"}), $project_id, $accno, $accno, conv_date($form->{"datepaid_$i"}), $accno);
SL/IR.pm
1212 1212

  
1213 1213
  my $transdate = "";
1214 1214
  if ($form->{type} eq "invoice") {
1215
    $transdate = $form->{deliverydate} ? $dbh->quote($form->{deliverydate}) 
1216
               : $form->{invdate} ? $dbh->quote($form->{invdate}) 
1215
    $transdate = $form->{deliverydate} ? $dbh->quote($form->{deliverydate})
1216
               : $form->{invdate} ? $dbh->quote($form->{invdate})
1217 1217
               : "current_date";
1218 1218
  } else {
1219 1219
    $transdate = $form->{transdate} ? $dbh->quote($form->{transdate}) : "current_date";

Auch abrufbar als: Unified diff