13. August 2009 10:24
Code
  IF ContriStructMulti.RUNMODAL = ACTION::OK THEN
  BEGIN
    RecContact.RESET;
    CurrForm.SETSELECTIONFILTER(RecContact);
    IF NOT RecContact.MARKEDONLY THEN
    BEGIN
      RecContact.GET("No.");
      ContriStructMulti.SetContrStrucRights(RecContact);
    END ELSE
    BEGIN
      CurrForm.SETSELECTIONFILTER(Rec);
      IF FIND('-') THEN
      BEGIN
        REPEAT
          RecContact.GET("No.");
          ContriStructMulti.SetContrStrucRights(RecContact);
        UNTIL NEXT = 0;
      END;
      MARKEDONLY(FALSE);
      CLEARMARKS;
    END;
  END;
13. August 2009 10:49
13. August 2009 11:22
IF CustStructure.GET(p_recContact.GetCustomer, codeStructure) THEN
BEGIN
  IF useContribution THEN
    IF CustStructure.Contributionposting <> Contributionposting THEN
    BEGIN
      CustStructure.Contributionposting := Contributionposting;
      CustStructure.MODIFY(FALSE);
    END;
  IF useDonation THEN
    IF CustStructure.Donationposting <> Donationposting THEN
    BEGIN
      CustStructure.Donationposting := Donationposting;
      CustStructure.MODIFY(FALSE);
    END;
  IF useEmpty THEN
    IF CustStructure.Emptyposting <> Emptyposting THEN
    BEGIN
      CustStructure.Emptyposting := Emptyposting;
      CustStructure.MODIFY(FALSE);
    END;
END ELSE
BEGIN
  CustStructure.INIT;
  CustStructure."Customer No." := p_recContact.GetCustomer;
  CustStructure."Structure No." := codeStructure;
  IF useContribution THEN
    CustStructure.Contributionposting := Contributionposting
  ELSE
    CustStructure.Contributionposting := FALSE;
  IF useDonation THEN
    CustStructure.Donationposting := Donationposting
  ELSE
    CustStructure.Donationposting := FALSE;
  IF useEmpty THEN
    CustStructure.Emptyposting := Emptyposting
  ELSE
    CustStructure.Emptyposting := FALSE;
  CustStructure.INSERT(TRUE);
END;
IF CustStructure.GET(p_recContact.GetCustomer+'k', codeStructure) THEN
BEGIN
  IF useContribution THEN
    IF CustStructure.Contributionposting <> Contributionposting THEN
    BEGIN
      CustStructure.Contributionposting := Contributionposting;
      CustStructure.MODIFY(FALSE);
    END;
  IF useDonation THEN
    IF CustStructure.Donationposting <> Donationposting THEN
    BEGIN
      CustStructure.Donationposting := Donationposting;
      CustStructure.MODIFY(FALSE);
    END;
  IF useEmpty THEN
    IF CustStructure.Emptyposting <> Emptyposting THEN
    BEGIN
      CustStructure.Emptyposting := Emptyposting;
      CustStructure.MODIFY(FALSE);
    END;
END ELSE
BEGIN
  CustStructure.INIT;
  CustStructure."Customer No." := p_recContact.GetCustomer+'k';
  CustStructure."Structure No." := codeStructure;
  IF useContribution THEN
    CustStructure.Contributionposting := Contributionposting
  ELSE
    CustStructure.Contributionposting := FALSE;
  IF useDonation THEN
    CustStructure.Donationposting := Donationposting
  ELSE
    CustStructure.Donationposting := FALSE;
  IF useEmpty THEN
    CustStructure.Emptyposting := Emptyposting
  ELSE
    CustStructure.Emptyposting := FALSE;
  CustStructure.INSERT(TRUE);
END;
13. August 2009 11:47
13. August 2009 12:06
 Schön dich/euch hier zu treffen!
  Schön dich/euch hier zu treffen!   
 13. August 2009 12:22