Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c364e43e

Von Peter Schulgin vor mehr als 7 Jahren hinzugefügt

  • ID c364e43efab3ac6f0f0c20cd6f8f89a85ab45280
  • Vorgänger b36f0864
  • Nachfolger 96593e93

Revert "Artikel-Klassifizierung"

This reverts commit 5067d7bd31514962af9730b33323b831d87164f8.

Unterschiede anzeigen:

SL/IR.pm
1020 1020
        i.description, i.longdescription, i.qty, i.fxsellprice AS sellprice, i.parts_id AS id, i.unit, i.deliverydate, i.project_id, i.serialnumber,
1021 1021
        i.price_factor_id, i.price_factor, i.marge_price_factor, i.discount, i.active_price_source, i.active_discount_source,
1022 1022
        p.partnumber, p.part_type, pr.projectnumber, pg.partsgroup
1023
        ,p.classification_id
1024 1023

  
1025 1024
        FROM invoice i
1026 1025
        JOIN parts p ON (i.parts_id = p.id)
......
1280 1279
         p.notes AS partnotes, p.notes AS longdescription, p.not_discountable,
1281 1280
         p.inventory_accno_id, p.price_factor_id,
1282 1281
         p.ean,
1283
         p.classification_id,
1284 1282

  
1285 1283
         pfac.factor AS price_factor,
1286 1284

  
......
1296 1294
         c3.new_chart_id                  AS expense_new_chart,
1297 1295
         date($transdate) - c3.valid_from AS expense_valid,
1298 1296

  
1299
         pt.used_for_purchase AS used_for_purchase,
1300 1297
         pg.partsgroup
1301 1298

  
1302 1299
       FROM parts p
......
1313 1310
           FROM taxzone_charts tc
1314 1311
           WHERE tc.taxzone_id = '$taxzone_id' and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c3.id)
1315 1312
       LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id)
1316
       LEFT JOIN parts_classifications pt ON (pt.id = p.classification_id)
1317 1313
       LEFT JOIN price_factors pfac ON (pfac.id = p.price_factor_id)
1318 1314
       WHERE $where|;
1319 1315
  my $sth = prepare_execute_query($form, $dbh, $query, @values);
......
1332 1328
  map { push @{ $_ }, prepare_query($form, $dbh, $_->[0]) } @translation_queries;
1333 1329

  
1334 1330
  $form->{item_list} = [];
1335
  my $has_wrong_pclass = 0;
1336 1331
  while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
1337 1332

  
1338 1333
    if ($mm_by_id{$ref->{id}}) {
......
1343 1338
    if (($::form->{"partnumber_$i"} ne '') && ($ref->{ean} eq $::form->{"partnumber_$i"})) {
1344 1339
      push @{ $ref->{matches} ||= [] }, $::locale->text('EAN') . ': ' . $ref->{ean};
1345 1340
    }
1346
    $ref->{type_and_classific} = $::request->presenter->type_abbreviation($ref->{part_type}).
1347
                                 $::request->presenter->classification_abbreviation($ref->{classification_id});
1348 1341

  
1349
    if (! $ref->{used_for_purchase} ) {
1350
       $has_wrong_pclass = 2;
1351
       next;
1352
    }
1353 1342
    # In der Buchungsgruppe ist immer ein Bestandskonto verknuepft, auch wenn
1354 1343
    # es sich um eine Dienstleistung handelt. Bei Dienstleistungen muss das
1355 1344
    # Buchungskonto also aus dem Ergebnis rausgenommen werden.
......
1419 1408
  $sth->finish();
1420 1409
  $_->[1]->finish for @translation_queries;
1421 1410

  
1422
  $form->{is_wrong_pclass} = $has_wrong_pclass;
1423 1411
  foreach my $item (@{ $form->{item_list} }) {
1424 1412
    my $custom_variables = CVar->get_custom_variables(module   => 'IC',
1425 1413
                                                      trans_id => $item->{id},
1426 1414
                                                      dbh      => $dbh,
1427 1415
                                                     );
1428
    $form->{is_wrong_pclass} = 0; # one correct type
1416

  
1429 1417
    map { $item->{"ic_cvar_" . $_->{name} } = $_->{value} } @{ $custom_variables };
1430 1418
  }
1431 1419

  

Auch abrufbar als: Unified diff