Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6f7c3b10

Von Sven Schöling vor mehr als 14 Jahren hinzugefügt

  • ID 6f7c3b1044f67c26a7c7355e991224a7bab733f9
  • Vorgänger 1228aa97
  • Nachfolger a87dd0ec

Typo und Bugs in retrieve_accounts gefixt. Veraltete Aufrufsyntax von retrieve_accounts gefixt.

Unterschiede anzeigen:

SL/IC.pm
1485 1485
  my $dbh      = $form->get_standard_dbh;
1486 1486
  my %args     = @_;     # part_id => index
1487 1487

  
1488
  my ($query, $sth);
1489

  
1490 1488
  $form->{taxzone_id} *= 1;
1491 1489

  
1492 1490
  # transdate madness.
......
1527 1525
    WHERE p.id = ?
1528 1526
SQL
1529 1527

  
1530
  my $sth_tx = prepare_query($::form, $dbh, <<SQL);
1528
  my $sth_tax = prepare_query($::form, $dbh, <<SQL);
1531 1529
    SELECT c.accno, t.taxdescription AS description, t.rate, t.taxnumber
1532 1530
    FROM tax t
1533 1531
    LEFT JOIN chart c ON c.id = t.chart_id
......
1539 1537
SQL
1540 1538

  
1541 1539
  while (my ($part_id, $index) = each %args) {
1542
    my $ref = $sth_accno->fetchrow_hashref($part_id) or next;
1540
    $sth_accno->execute($part_id);
1541
    my $ref = $sth_accno->fetchrow_hashref or next;
1543 1542

  
1544 1543
    $ref->{"inventory_accno_id"} = undef unless $ref->{"is_part"};
1545 1544

  
......
1553 1552
    $form->{"${_}_accno_$index"} = $accounts{"${_}_accno"} for qw(inventory income expense);
1554 1553

  
1555 1554
    my $inc_exp = $form->{"vc"} eq "customer" ? "income" : "expense";
1556
    $ref = $sth->fetchrow_hashref($accounts{"${inc_exp}_accno_id"}, quote_db_date($transdate)) or next;
1555
    $sth_tax->execute($accounts{"${inc_exp}_accno_id"}, quote_db_date($transdate));
1556
    $ref = $sth_tax->fetchrow_hashref or next;
1557 1557

  
1558 1558
    $form->{"taxaccounts_$index"} = $ref->{"accno"};
1559 1559
    $form->{"taxaccounts"} .= "$ref->{accno} "if $form->{"taxaccounts"} !~ /$ref->{accno}/;
......
1561 1561
    $form->{"$ref->{accno}_${_}"} = $ref->{$_} for qw(rate description taxnumber);
1562 1562
  }
1563 1563

  
1564
  $sth_accno->finish;
1565
  $sth_tax->finish;
1566

  
1564 1567
  $::lxdebug->leave_sub(2);
1565 1568
}
1566 1569

  
bin/mozilla/io.pl
1979 1979

  
1980 1980
  for (my $i = 1; $i <= $form->{"rowcount"}; $i++) {
1981 1981
    if ($form->{"id_$i"}) {
1982
      IC->retrieve_accounts(\%myconfig, $form, $form->{"id_$i"}, $i, 1);
1982
      IC->retrieve_accounts(\%myconfig, $form, $form->{"id_$i"}, $i);
1983 1983
    }
1984 1984
  }
1985 1985

  
bin/mozilla/oe.pl
1897 1897
  $form->{"taxaccounts"} = "";
1898 1898

  
1899 1899
  for my $i (1 .. $form->{"rowcount"}) {
1900
    IC->retrieve_accounts(\%myconfig, $form, $form->{"id_$i"}, $i, 1) if $form->{"id_$i"};
1900
    IC->retrieve_accounts(\%myconfig, $form, $form->{"id_$i"}, $i) if $form->{"id_$i"};
1901 1901
  }
1902 1902

  
1903 1903
  $form->{rowcount}++;

Auch abrufbar als: Unified diff