Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c1dc55d0

Von Werner Hahn vor 5 Tagen hinzugefügt

  • ID c1dc55d07399bebf7dfad3026a0afe86333ba8d0
  • Vorgänger c55aa9ef
  • Nachfolger b0414115

Alter Auftrags/Angebotscontroller weitere quotations die gestört haben

rausgenommen

Unterschiede anzeigen:

SL/OE.pm
658 658
    $query = qq|SELECT nextval('id')|;
659 659
    ($form->{id}) = selectrow_query($form, $dbh, $query);
660 660

  
661
    $query = qq|INSERT INTO oe (id, ordnumber, employee_id, currency_id, taxzone_id) VALUES (?, '', ?, (SELECT currency_id FROM defaults), ?)|;
662
    do_query($form, $dbh, $query, $form->{id}, $form->{employee_id}, $form->{taxzone_id});
661
    $query = qq|INSERT INTO oe (id, ordnumber, employee_id, currency_id, taxzone_id, record_type) VALUES (?, '', ?, (SELECT currency_id FROM defaults), ?, ?)|;
662
    do_query($form, $dbh, $query, $form->{id}, $form->{employee_id}, $form->{taxzone_id}, $form->{type});
663 663
  }
664 664

  
665 665
  my $amount    = 0;
SL/TransNumber.pm
62 62
    $filters{trans_number}  = "ordnumber";
63 63
    $filters{numberfield}   = $type eq 'sales_order' ? "sonumber" : "ponumber";
64 64
    $filters{table}         = "oe";
65
    $filters{where}         = 'NOT COALESCE(quotation, FALSE)';
66
    $filters{where}        .= $type =~ /^sales/ ? ' AND (customer_id IS NOT NULL)' : ' AND (vendor_id IS NOT NULL)';
65
    $filters{where}         = "record_type = ?";
66
    $filters{values}        = [ $::form->{type} ];
67 67

  
68 68
  } elsif ($type =~ /^sales_order_intake$/) {
69 69
    $filters{trans_number}  = "ordnumber";
70 70
    $filters{numberfield}   = "soinumber";
71 71
    $filters{table}         = "oe";
72
    $filters{where}         = 'NOT COALESCE(quotation, FALSE)';
73
    $filters{where}        .= $type =~ /^sales/ ? ' AND (customer_id IS NOT NULL)' : ' AND (vendor_id IS NOT NULL)';
72
    $filters{where}         = "record_type = ?";
73
    $filters{values}        = $type;
74 74

  
75 75
  } elsif ($type =~ /^purchase_order_confirmation$/) {
76 76
    $filters{trans_number}  = "ordnumber";
......
83 83
    $filters{trans_number}  = "quonumber";
84 84
    $filters{numberfield}   = $type eq 'sales_quotation' ? "sqnumber" : "rfqnumber";
85 85
    $filters{table}         = "oe";
86
    $filters{where}         = 'COALESCE(quotation, FALSE)';
87
    $filters{where}        .= $type =~ /^sales/ ? ' AND (customer_id IS NOT NULL)' : ' AND (vendor_id IS NOT NULL)';
86
    $filters{where}         = "record_type = ?";
87
    $filters{values}        = $type;
88 88

  
89 89
  } elsif ($type =~ /^purchase_quotation_intake$/) {
90 90
    $filters{trans_number}  = "quonumber";
91 91
    $filters{numberfield}   = "pqinumber";
92 92
    $filters{table}         = "oe";
93
    $filters{where}         = 'COALESCE(quotation, FALSE) AND (vendor_id IS NOT NULL)';
93
    $filters{where}         = "record_type = ?";
94
    $filters{values}        = $type;
94 95

  
95 96
  } elsif ($type =~ /^(part|service|assembly|assortment)$/) {
96 97
    $filters{trans_number}  = "partnumber";

Auch abrufbar als: Unified diff