Returns Management Bug

The code snippet below is from Codeunit 99002504. The problem with the original is that the Unit Price from the Credit Decision or the original Invoice was overwritten by the Unit Price from the Item Card. The fix given here prevents that from happening. cheers, Matt.


//<Begin ModID> ****** </Begin ModID>
//<CompanyName> Kelar Corporation - Burlington </CompanyName>
//<Author> Matt Benvenuti </Author>
//<InstallDate> 2001-09-13 </InstallDate>

// commented out Unit Price because Validate overwrites value anyway

//        SalesLine."Unit Price" := ReturnLine."Inv. Unit Price" * ReturnLine."Qty. Per. Ret. UOM";
//<End ModID> ****** </End ModID>

        SalesLine.VALIDATE("Unit of Measure",ReturnLine.UOM);
        SalesLine.VALIDATE("Unit of Measure Code",ReturnLine.UOM);
        IF SalesInvoiceLine.GET(ReturnLine."Inv. No.",
                                ReturnLine."Inv. Line No.") THEN BEGIN
          SalesLine."Tax Group Code" := SalesInvoiceLine."Tax Group Code";
          SalesLine."Department Code" := SalesInvoiceLine."Department Code";
          SalesLine."Project Code" := SalesInvoiceLine."Project Code";
        END;
        SalesLine.VALIDATE(Quantity,ReturnLine."Qty. Ret. To-Date");

//<Begin ModID> ****** </Begin ModID>
//<CompanyName> Kelar Corporation - Burlington </CompanyName>
//<Author> Matt Benvenuti </Author>
//<InstallDate> 2001-09-13 </InstallDate>

// overwrite Unit Price with the ReturnLine value

        SalesLine."Unit Price" := ReturnLine."Inv. Unit Price" * ReturnLine."Qty. Per. Ret. UOM";
//<End ModID> ****** </End ModID>

Matt, Which version was the problem in? Has it been reported to Navision so they can fix it? Dave Studebaker das@libertyforever Liberty Grove Software A Navision Services Partner

Oops, sorry about the details lacking in the post. I’m using CA 2.60B, Adv. Distr. (obviously, based on the object number). The latest improvement applied is 15, which I know means little outside of Canada. I have posted this as a Bug Report to Navision just before I posted the message on this forum. I have received no reply as yet. As an aside, the last ‘issue’ I posted with them I was told would not be fixed until Attain was released. Although I use the CA database, Navision support is still provided via Navision US. cheers,