Error : No Setup exists for this Amount.(SO Authorization)

subrata.baurisubrata.bauri Member Posts: 21
Happy New Year!

I have faced some problem when sending a Sales Order to Authorization.
The error message is: "No Setup exists for this Amount.".

Noticed some wrong coding in the codeunit ID 13700 Multilevel Authorization.
Details given below.



IF "Transaction Type" = "Transaction Type"::Sale THEN BEGIN
SalesSetup.GET;
IF SalesSetup."Authorization Required" THEN BEGIN
WFAmount := 0;
IsValid := FALSE;
SalesHeader.GET("Document Type","Document No.");
WFPurchLine.SETRANGE("Document Type","Document Type");
WFPurchLine.SETRANGE("Document No.","Document No.");
IF WFPurchLine.FIND('-') THEN
REPEAT
WFAmount := WFAmount + WFPurchLine."Amount To Vendor" + WFPurchLine."TDS Amount";
UNTIL WFPurchLine.NEXT = 0;

//Comment
//WFPurchLine should be "Sales Line" Table
//WFPurchLine."Amount To Vendor" should be Amount
//To Customer of the Sales Line Table
//WFPurchLine."TDS Amount" should be "TDS/TCS Amount" of the
//Sales Line Table

//Customized code
IF "Transaction Type" = "Transaction Type"::Sale THEN BEGIN
SalesSetup.GET;
IF SalesSetup."Authorization Required" THEN BEGIN
WFAmount := 0;
IsValid := FALSE;
SalesHeader.GET("Document Type","Document No.");
WFSalesLine.SETRANGE("Document Type","Document Type");
WFSalesLine.SETRANGE("Document No.","Document No.");
IF WFSalesLine.FIND('-') THEN
REPEAT
WFAmount := WFAmount + WFSalesLine."Amount To Customer" + WFSalesLine."TDS/TCS Amount";
UNTIL WFPurchLine.NEXT = 0;

//Comment WFSalesLine (Record Variable) referes to the table Sales Line

Comments

  • ssinglassingla Member Posts: 2,973
    I dont think there is any need of modification. the standard code will work fine though primafacie it look as a :bug:
    CA Sandeep Singla
    http://ssdynamics.co.in
Sign In or Register to comment.