Problem : Approval Credit Limit NAV 5.00

S0918423470S0918423470 Member Posts: 159
Hi all,

To tell you the truth, NAV 5.00 has many problem with logic of code. ](*,)

I have a trouble :bug: :bug: :bug:

With Sales process, we dont need to approval by Amout only need to approval by Credit Limit. So i only enable this template.
If the Customer is over the Credit Limit Amt, it's ok we must Approve.
But if the Customer is under the Credit Limit Amt, no need approval, but also can not release the Order. :bug: :bug: :bug: :bug: :bug:

The second, i setup more Approval Limit template to be able aprrove or do something. But this is not a good way. Because i check Unlimit Sales Amount if if the Customer is under the Credit Limit Amt, it's released it's ok.

But If if the Customer is Over the Credit Limit Amt, all approval entries created not have status OPEN only Approved and Created.

:bug: :bug: :bug:

Anybody help me??
[-o<
Thanks.

Comments

  • DarkSideDarkSide Member Posts: 46
    I've been working on document approvals a little lately and I know it's a little confusing. But, I think your issue is a setup issue - which is a good thing.

    I tested this and it should work:

    Template Setup:
    Approval Type = Approver
    Document Type = Order
    Limit Type = Credit Limit
    Additional Approvers = Yes (See Setup Below)
    Enabled = Yes
    Table = 36

    Approver Setup:
    User ID = SUPERVISOR (In other words, NOT the user creating order)

    I'm not sure if it matters but SUPERVISOR has Unlimited Sales Approval checked.

    With these settings the approval process worked as intended and I could not release the order until it was approved.

    Let me know if it works.
    My mommy says I'm special
  • LibertyMountainLibertyMountain Member Posts: 94
    I have not been able to make this work either. Here are my expectations:

    1. A customer service representative takes an order for a customer.
    2. The rep sends the order through the approval process.
    3. If the customer is past due (even by a small amount) or if this order puts the customer over their credit limit, then the order should be sent for approval (i.e. "pending approval").
    4. Any one of the "additional approvers" can approve the document for release.

    I have enabled the S-O-CREDITLIMT template. I have made the approval type <blank>, and added two additional approvers. Here is what happens when the rep sends the order for approval:

    - if the customer is not past due, nor over the credit limit, the order is automatically released to the warehouse. (this is the behavior I expect).

    - if the customer is past due, or over their credit limit, NAV executes this code:

    IF AboveCreditLimitAmountLCY < 0 THEN BEGIN
    ERROR(Text029,SalesHeader."Document Type");

    and returns this error:

    >> The 'Order' cannot be sent for approval.
    >> The available credit limit exceeds the maximum amount.

    (this is not the behavior I expect).

    I expect that the order should go to "pending approval", and show up on a list of documents pending approval, so that a credit supervisor/manager can review the order and approve/reject it.

    What am I missing here in the setup? Am I hoping the application will perform in a way it was not intended? Thank you for any help.
  • mart1n0mart1n0 Member Posts: 123
    Do you use NAV 5.0 or NAV 5.0 SP1?

    I had problems making this work in 5.0 SP1 while credit limits worked perfectly fine for me in 5.0.
    After entering a ticket they asked me to change the following:
    The issue with credit limit was discovered by our developers after freezing the code for Service Pack 1. Unfortunately it wasn't possible to fix it in SP1. But our developers have corrected this functionality and below you can find correction code.
    To install this hotfix, change the code in the FindApproverSales function in the "Approvals Management" Codeunit (439) as follows.

    Old Code:
    AppTemplate."Approval Type"::" ": BEGIN
                AboveCreditLimitAmountLCY := CheckCreditLimit(SalesHeader);
                InsertEntries := FALSE;
                IF AppTemplate."Limit Type" = AppTemplate."Limit Type"::"Credit Limits" THEN BEGIN
                  IF (AboveCreditLimitAmountLCY > 0) OR (Cust."Credit Limit (LCY)" = 0) THEN BEGIN
                    ApproverId := USERID;
                    MakeApprovalEntry(
                      DATABASE::"Sales Header",SalesHeader."Document Type",SalesHeader."No.",'',
                      ApprovalSetup,ApproverId,AppTemplate."Approval Code",UserSetup,ApprovalAmount,ApprovalAmountLCY,
    

    New Code:
    AppTemplate."Approval Type"::" ": BEGIN
                AboveCreditLimitAmountLCY := CheckCreditLimit(SalesHeader);
                InsertEntries := FALSE;
                Cust.GET(SalesHeader."Bill-to Customer No."); //New line
                IF AppTemplate."Limit Type" = AppTemplate."Limit Type"::"Credit Limits" THEN BEGIN
                  IF (AboveCreditLimitAmountLCY > 0) OR (Cust."Credit Limit (LCY)" = 0) THEN BEGIN
                    ApproverId := USERID;
                    MakeApprovalEntry(
                      DATABASE::"Sales Header",SalesHeader."Document Type",SalesHeader."No.",'',
                      ApprovalSetup,ApproverId,AppTemplate."Approval Code",UserSetup,ApprovalAmount,ApprovalAmountLCY,
    

    For me this did the trick. Also be aware that for approvals additinional approvals are needed.
    In the current design NAV doesn't support "Approval" approval type for "Credit Limits". I will deliver your suggestion to Program Manager for Document Approval.
Sign In or Register to comment.