Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0320615c

Von Udo Spallek vor fast 19 Jahren hinzugefügt

  • ID 0320615ced8e118ae991226f969342a057327a0b
  • Vorgänger f1e5fd2d
  • Nachfolger 32ebe005

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
    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
    }
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 474
       
475 475
    #    print(STDERR Dumper($ref));
476 476
    push @{ $form->{GL} }, $ref;

Auch abrufbar als: Unified diff