Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0e0ff150

Von Jan Büren vor fast 14 Jahren hinzugefügt

  • ID 0e0ff15052f7cb7ed1a2b04235a8a217da97a183
  • Vorgänger 1dfec893
  • Nachfolger 0f831099

Standard-Auswahl für Umlaufvermögenskonto (Bank) mandantenweit setzen. Ferner yearend aus AM.pm entfernt und schliessende </options> für selectAP_paid Array hinzugefügt

Unterschiede anzeigen:

SL/AM.pm
1358 1358
  my $dbh      = $params{dbh} || $form->get_standard_dbh($myconfig);
1359 1359

  
1360 1360
  my %accnos;
1361
  map { ($accnos{$_}) = split(m/--/, $form->{$_}) } qw(inventory_accno income_accno expense_accno fxgain_accno fxloss_accno);
1361
  map { ($accnos{$_}) = split(m/--/, $form->{$_}) } qw(inventory_accno income_accno expense_accno fxgain_accno fxloss_accno ar_paid_accno);
1362 1362

  
1363 1363
  $form->{curr}  =~ s/ //g;
1364 1364
  my @currencies =  grep { $_ ne '' } split m/:/, $form->{curr};
......
1373 1373
        expense_accno_id   = (SELECT c.id FROM chart c WHERE c.accno = ?),
1374 1374
        fxgain_accno_id    = (SELECT c.id FROM chart c WHERE c.accno = ?),
1375 1375
        fxloss_accno_id    = (SELECT c.id FROM chart c WHERE c.accno = ?),
1376
        ar_paid_accno_id   = (SELECT c.id FROM chart c WHERE c.accno = ?),
1376 1377
        invnumber          = ?,
1377 1378
        cnnumber           = ?,
1378 1379
        sonumber           = ?,
......
1385 1386
        servicenumber      = ?,
1386 1387
        sdonumber          = ?,
1387 1388
        pdonumber          = ?,
1388
        yearend            = ?,
1389 1389
        curr               = ?,
1390 1390
        businessnumber     = ?,
1391 1391
        weightunit         = ?|;
1392 1392
  my @values = ($accnos{inventory_accno}, $accnos{income_accno}, $accnos{expense_accno},
1393
                $accnos{fxgain_accno},    $accnos{fxloss_accno},
1393
                $accnos{fxgain_accno},    $accnos{fxloss_accno}, $accnos{ar_paid_accno},
1394 1394
                $form->{invnumber},       $form->{cnnumber},
1395 1395
                $form->{sonumber},        $form->{ponumber},
1396 1396
                $form->{sqnumber},        $form->{rfqnumber},
1397 1397
                $form->{customernumber},  $form->{vendornumber},
1398 1398
                $form->{articlenumber},   $form->{servicenumber},
1399 1399
                $form->{sdonumber},       $form->{pdonumber},
1400
                $form->{yearend},         $currency,
1400
                $currency,
1401 1401
                $form->{businessnumber},  $form->{weightunit});
1402 1402
  do_query($form, $dbh, $query, @values);
1403 1403

  
......
1492 1492
  $form->{defaults}{IC_expense}   = $form->{defaults}{expense_accno_id};
1493 1493
  $form->{defaults}{FX_gain}      = $form->{defaults}{fxgain_accno_id};
1494 1494
  $form->{defaults}{FX_loss}      = $form->{defaults}{fxloss_accno_id};
1495
  $form->{defaults}{AR_paid}      = $form->{defaults}{ar_paid_accno_id};
1495 1496

  
1496 1497
  $form->{defaults}{weightunit} ||= 'kg';
1497 1498

  
......
1571 1572
      if $ref->{taxnumber};
1572 1573
    $form->{taxrates}{ $ref->{accno} }{rate} = $ref->{rate} if $ref->{rate};
1573 1574
  }
1575
  # Abfrage für Standard Umlaufvermögenskonto
1576
  $query =
1577
    qq|SELECT id, accno, description, link | .
1578
    qq|FROM chart | .
1579
    qq|WHERE link LIKE ? |.
1580
    qq|ORDER BY accno|;
1581
  $sth = prepare_execute_query($form, $dbh, $query, '%AR%');
1582
  $sth->execute || $form->dberror($query);#
1583
  while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
1584
    foreach my $item (split(/:/, $ref->{link})) {
1585
      if ($item eq "AR_paid") {
1586
        %{ $form->{IC}{AR_paid}{ $ref->{accno} } } = (
1587
                                             id          => $ref->{id},
1588
                                             description => $ref->{description}
1589
          );
1590
      }
1591
    }
1592
  }
1574 1593

  
1575 1594
  $sth->finish;
1576 1595
  $dbh->disconnect;

Auch abrufbar als: Unified diff