Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 583f1f0f

Von Jan Büren vor mehr als 8 Jahren hinzugefügt

  • ID 583f1f0fb395147c5e6459d9c6569bdf8735ec3f
  • Vorgänger f3a02fb6
  • Nachfolger 95278e0a

Weitere Änderungen für den revert von 7735019
Damit ist das Ticket #144 erledigt.

Unterschiede anzeigen:

SL/OE.pm
658 658
                                  dbh          => $dbh);
659 659

  
660 660
      # link previous items with orderitems
661
      foreach (qw(orderitems invoice)) {
662
        if (!$form->{saveasnew} && !$form->{useasnew} && $form->{"converted_from_${_}_id_$i"}) {
661
      # assume we have a new workflow if we link from invoice or order to quotation
662
      # unluckily orderitems are used for quotation and orders - therefore one more
663
      # check to be sure NOT to link from order to quotation
664
      foreach (qw(orderitems)) {
665
        if (!$form->{saveasnew} && !$form->{useasnew} && $form->{"converted_from_${_}_id_$i"}
666
              && $form->{type} !~ 'quotation') {
663 667
          RecordLinks->create_links('dbh'        => $dbh,
664 668
                                    'mode'       => 'ids',
665 669
                                    'from_table' => $_,
......
762 766
  $form->{convert_from_oe_ids} =~ s/\s+$//;
763 767
  my @convert_from_oe_ids      =  split m/\s+/, $form->{convert_from_oe_ids};
764 768
  delete $form->{convert_from_oe_ids};
765
  if (scalar @convert_from_oe_ids) {
769
  if (!$form->{useasnew} && scalar @convert_from_oe_ids) {
766 770
    RecordLinks->create_links('dbh'        => $dbh,
767 771
                              'mode'       => 'ids',
768 772
                              'from_table' => 'oe',
......
920 924

  
921 925
  # if called in multi id mode, and still only got one id, switch back to single id
922 926
  if ($form->{"rowcount"} and $#ids == 0) {
923
   $form->{"id"} = $ids[0];
927
    $form->{"id"} = $ids[0];
924 928
    undef @ids;
925 929
    delete $form->{convert_from_oe_ids};
926 930
  }

Auch abrufbar als: Unified diff