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

subrata.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
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
0
Comments
-
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.in0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions