Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 80f6efd0

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID 80f6efd0cd9de22d54ccc605808a74c9955e643c
  • Vorgänger 60e14abf
  • Nachfolger c621a918

strictness.

Ausserdem das "use strict" einheitlich unter die includes verschoben um
deutlich zu machen, dass das pragma die eingebundenen dateien nicht
checken soll.

Unterschiede anzeigen:

SL/DO.pm
43 43
use SL::RecordLinks;
44 44
use SL::IC;
45 45

  
46
use strict;
47

  
46 48
sub transactions {
47 49
  $main::lxdebug->enter_sub();
48 50

  
......
58 60

  
59 61
  my $vc = $form->{vc} eq "customer" ? "customer" : "vendor";
60 62

  
61
  $query =
63
  my $query =
62 64
    qq|SELECT dord.id, dord.donumber, dord.ordnumber, dord.transdate,
63 65
         ct.name, dord.${vc}_id, dord.globalproject_id,
64 66
         dord.closed, dord.delivered, dord.shippingpoint, dord.shipvia,
......
278 280
    $form->{"sellprice_$i"} = $form->parse_amount($myconfig, $form->{"sellprice_$i"});
279 281

  
280 282
    $price_factor = $price_factors{ $form->{"price_factor_id_$i"} } || 1;
281
    $linetotal    = $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"} / $price_factor, 2);
283
    my $linetotal    = $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"} / $price_factor, 2);
282 284

  
283 285
    $reqdate = ($form->{"reqdate_$i"}) ? $form->{"reqdate_$i"} : undef;
284 286

  
......
497 499

  
498 500
  my $spoolfile;
499 501
  my @spoolfiles = ();
502
  my @values;
500 503

  
501 504
  while (($spoolfile) = $sth->fetchrow_array) {
502 505
    push @spoolfiles, $spoolfile;
......
604 607
  $sth = prepare_execute_query($form, $dbh, $query, @do_ids);
605 608

  
606 609
  delete $form->{"${vc}_id"};
607
  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
610
  while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
608 611
    if ($form->{"${vc}_id"} && ($ref->{"${vc}_id"} != $form->{"${vc}_id"})) {
609 612
      $sth->finish();
610 613
      $main::lxdebug->leave_sub();
......
626 629
    $query = qq|SELECT s.* FROM shipto s WHERE s.trans_id = ? AND s.module = 'DO'|;
627 630
    $sth   = prepare_execute_query($form, $dbh, $query, $form->{id});
628 631

  
629
    $ref   = $sth->fetchrow_hashref(NAME_lc);
632
    $ref   = $sth->fetchrow_hashref("NAME_lc");
630 633
    delete $ref->{id};
631 634
    map { $form->{$_} = $ref->{$_} } keys %$ref;
632 635
    $sth->finish();
......
635 638
    $query = qq|SELECT s.printed, s.emailed, s.spoolfile, s.formname FROM status s WHERE s.trans_id = ?|;
636 639
    $sth   = prepare_execute_query($form, $dbh, $query, conv_i($form->{id}));
637 640

  
638
    while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
641
    while ($ref = $sth->fetchrow_hashref("NAME_lc")) {
639 642
      $form->{printed} .= "$ref->{formname} " if $ref->{printed};
640 643
      $form->{emailed} .= "$ref->{formname} " if $ref->{emailed};
641 644
      $form->{queued}  .= "$ref->{formname} $ref->{spoolfile} " if $ref->{spoolfile};
......
765 768
                    JOIN parts p ON (a.parts_id = p.id)
766 769
                    LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
767 770
                    WHERE a.bom = '1'
768
                      AND a.id = ? $sortorder|;
771
                      AND a.id = ?|;
769 772
  my $h_pg     = prepare_query($form, $dbh, $q_pg);
770 773

  
771 774
  my $q_bin_wh = qq|SELECT (SELECT description FROM bin       WHERE id = ?) AS bin,
......
787 790
       si_runningnumber si_number si_description
788 791
       si_warehouse si_bin si_chargenumber si_qty si_unit);
789 792

  
790
  map { $form->{TEMPLATE_ARRAYS}->{$_} = [] } (@arrays, @tax_arrays);
793
  map { $form->{TEMPLATE_ARRAYS}->{$_} = [] } (@arrays);
791 794

  
792 795
  push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
793 796

  
797
  $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS');
798
  my %price_factors = map { $_->{id} => $_->{factor} } @{ $form->{ALL_PRICE_FACTORS} };
799

  
794 800
  my $sameitem = "";
795 801
  foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
796 802
    $i = $item->[0];
......
837 843

  
838 844
      do_statement($form, $h_pg, $q_pg, conv_i($form->{"id_$i"}));
839 845

  
840
      while (my $ref = $h_pg->fetchrow_hashref(NAME_lc)) {
846
      while (my $ref = $h_pg->fetchrow_hashref("NAME_lc")) {
841 847
        if ($form->{groupitems} && $ref->{partsgroup} ne $sameitem) {
842 848
          map({ push(@{ $form->{$_} }, "") } grep({ $_ ne "description" } @arrays));
843 849
          $sameitem = ($ref->{partsgroup}) ? $ref->{partsgroup} : "--";
......
886 892

  
887 893
  my ($self, $dbh, $id) = @_;
888 894

  
895
  my $form     =  $main::form;
896

  
889 897
  my $query = qq|SELECT description FROM project WHERE id = ?|;
890 898
  my ($value) = selectrow_query($form, $dbh, $query, $id);
891 899

  
......
929 937

  
930 938
  my @parts_ids = 'ARRAY' eq ref $params{parts_id} ? @{ $params{parts_id} } : ($params{parts_id});
931 939
  my $form      = $main::form;
940
  my $myconfig  = \%main::myconfig;
932 941

  
933 942
  my $query     =
934 943
    qq|SELECT i.warehouse_id, i.bin_id, i.chargenumber, SUM(qty) AS qty, i.parts_id,

Auch abrufbar als: Unified diff