Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 138255b0

Von Stephan Köhler vor etwa 19 Jahren hinzugefügt

  • ID 138255b0f5442d2f414bd702d88a4e600562a6b3
  • Vorgänger 0bb0eb67
  • Nachfolger 42fc1e70

Merge von 607-609 aus unstable: Bugfix zu UBL
-Unbalanced Ledger Workaround... Betr. Bugzilla ID 124
-Neuer Patch gegen den Unbalanced Ledger!
Betr. Bugzilla ID 124
-Neuer Patch gegen den Unbalanced Ledger!
Test ob Demodatenbank den Unbalanced ist...
Betr. Bugzilla ID 124

Unterschiede anzeigen:

SL/GL.pm
424 424
        $ref->{credit_taxkey}{$l} = $ref->{taxkey};
425 425
      }
426 426
    }
427

  
428
    while (abs($balance) >= 0.015) {
429
      my $ref2 = $sth->fetchrow_hashref(NAME_lc)
430
        || $form->error("Unbalanced ledger!");
431

  
432
      $balance =
433
        (int($balance * 100000) + int(100000 * $ref2->{amount})) / 100000;
434
      print(STDERR $balance, " BAlance\n");
435
      if ($ref2->{amount} < 0) {
436
        if ($ref2->{chart_id} > 0) {
437
          if ($ref->{debit_tax_accno}{$i} ne "") {
438
            $i++;
439
          }
440
          $ref->{debit_tax}{$i}       = $ref2->{amount} * -1;
441
          $ref->{debit_tax_accno}{$i} = $ref2->{accno};
442
        } else {
443
          if ($ref->{debit_accno}{$k} ne "") {
444
            $k++;
445
          }
446
          $ref->{debit}{$k}        = $ref2->{amount} * -1;
447
          $ref->{debit_accno}{$k}  = $ref2->{accno};
448
          $ref->{debit_taxkey}{$k} = $ref2->{taxkey};
449
        }
450
      } else {
451
        if ($ref2->{chart_id} > 0) {
452
          if ($ref->{credit_tax_accno}{$j} ne "") {
453
            $j++;
454
          }
455
          $ref->{credit_tax}{$j}       = $ref2->{amount};
456
          $ref->{credit_tax_accno}{$j} = $ref2->{accno};
457
        } else {
458
          if ($ref->{credit_accno}{$l} ne "") {
459
            $l++;
460
          }
461
          $ref->{credit}{$l}        = $ref2->{amount};
462
          $ref->{credit_accno}{$l}  = $ref2->{accno};
463
          $ref->{credit_taxkey}{$l} = $ref2->{taxkey};
464
        }
465
      }
466
    }
467

  
427
#    if ($form->{accno} eq ''){ # flo & udo: if general report,
428
#                               # then check balance
429
#      while (abs($balance) >= 0.015) {
430
#        my $ref2 = $sth->fetchrow_hashref(NAME_lc)
431
#          || $form->error("Unbalanced ledger!");
432
#
433
#        $balance =
434
#          (int($balance * 100000) + int(100000 * $ref2->{amount})) / 100000;
435
#        print(STDERR $balance, " BAlance\n");
436
#        print(STDERR $ref2->{amount}, " Ref2->amount\n");
437
#        if ($ref2->{amount} < 0) {
438
#          if ($ref2->{chart_id} > 0) {
439
#            if ($ref->{debit_tax_accno}{$i} ne "") {
440
#              $i++;
441
#            }
442
#            $ref->{debit_tax}{$i}       = $ref2->{amount} * -1;
443
#            $ref->{debit_tax_accno}{$i} = $ref2->{accno};
444
#          } else {
445
#            if ($ref->{debit_accno}{$k} ne "") {
446
#              $k++;
447
#            }
448
#            $ref->{debit}{$k}        = $ref2->{amount} * -1;
449
#            $ref->{debit_accno}{$k}  = $ref2->{accno};
450
#            $ref->{debit_taxkey}{$k} = $ref2->{taxkey};
451
#          }
452
#        } else {
453
#          if ($ref2->{chart_id} > 0) {
454
#            if ($ref->{credit_tax_accno}{$j} ne "") {
455
#              $j++;
456
#            }
457
#            $ref->{credit_tax}{$j}       = $ref2->{amount};
458
#            $ref->{credit_tax_accno}{$j} = $ref2->{accno};
459
#          } else {
460
#            if ($ref->{credit_accno}{$l} ne "") {
461
#              $l++;
462
#            }
463
#            $ref->{credit}{$l}        = $ref2->{amount};
464
#            $ref->{credit_accno}{$l}  = $ref2->{accno};
465
#            $ref->{credit_taxkey}{$l} = $ref2->{taxkey};
466
#          }
467
#        }
468
#      }
469
#    } else {
470
#      # if account-report, then calculate the Balance?!
471
#      # ToDo: Calculate the Balance
472
#      1;
473
#    }
474
       
468 475
    #    print(STDERR Dumper($ref));
469 476
    push @{ $form->{GL} }, $ref;
470 477
    $balance = 0;

Auch abrufbar als: Unified diff