Detailed Cust. Ledg. Entry

toootooo Member Posts: 138
I have the below code but it's giving me an error as so:
Type conversion is not possible because 1 of the operators contains an invalid type.

Boolean + Option
Can anyone advise please?
IF ("Entry No." = DetailedCustLedgerEntry."Cust. Ledger Entry No.") +
    (DetailedCustLedgerEntry."Entry Type"::"Payment Tolerance") THEN
      PmtTolerance := DetailedCustLedgerEntry.Amount * -1
ELSE
  PmtTolerance := 0;

Answers

  • kapamaroukapamarou Member Posts: 1,152
    IF ("Entry No." = DetailedCustLedgerEntry."Cust. Ledger Entry No.") +
        (DetailedCustLedgerEntry."Entry Type" = DetailedCustLedgerEntry."Entry Type"::"Payment Tolerance") THEN
          PmtTolerance := DetailedCustLedgerEntry.Amount * -1
    ELSE
      PmtTolerance := 0;
    
  • toootooo Member Posts: 138
    kapamarou wrote:
    IF ("Entry No." = DetailedCustLedgerEntry."Cust. Ledger Entry No.") +
        (DetailedCustLedgerEntry."Entry Type" = DetailedCustLedgerEntry."Entry Type"::"Payment Tolerance") THEN
          PmtTolerance := DetailedCustLedgerEntry.Amount * -1
    ELSE
      PmtTolerance := 0;
    
    I get what you mean there but its giving me a strange error now:
    Type conversion is not possible because 1 of the operators contains an invalid type.

    Boolean + Boolean
  • kapamaroukapamarou Member Posts: 1,152
    IF ("Entry No." = DetailedCustLedgerEntry."Cust. Ledger Entry No.") AND    (DetailedCustLedgerEntry."Entry Type" = DetailedCustLedgerEntry."Entry Type"::"Payment Tolerance") THEN
          PmtTolerance := DetailedCustLedgerEntry.Amount * -1
    ELSE
      PmtTolerance := 0;
    

    Sorry...
  • toootooo Member Posts: 138
    Thanks for that, worked fine.
Sign In or Register to comment.