Prepayment sales side
sneha
Member Posts: 191
Hi,
“Check. Prepmt. When posting” is not checked on Sales & Receivable setup.
I have created a new order, posted a prepayment Invoice. We haven’t received the amount for prepayment invoice, but still, wanted to ship the order. Is that possible? I am getting the below error when trying to ship.
“There are Unpaid prepayment Amounts on Order…….”
“Check. Prepmt. When posting” is not checked on Sales & Receivable setup.
I have created a new order, posted a prepayment Invoice. We haven’t received the amount for prepayment invoice, but still, wanted to ship the order. Is that possible? I am getting the below error when trying to ship.
“There are Unpaid prepayment Amounts on Order…….”
0
Comments
-
yes.0
-
chengalasettyvsrao wrote:yes.
Thanks for the reply. Could you please describe how it can be possible?0 -
Any thoughts?0
-
Even system throws the message( it is not a error message) , press Ok and do the ship/ Receipt.0
-
Below is the code from codeunit 439 and it is a error message.
SalesInvHeader.SETCURRENTKEY("Prepayment Order No.","Prepayment Invoice");
SalesInvHeader.SETRANGE("Prepayment Order No.",SalesHeader."No.");
SalesInvHeader.SETRANGE("Prepayment Invoice",TRUE);
IF SalesInvHeader.FINDSET THEN BEGIN
REPEAT
CustLedgerEntry.SETCURRENTKEY("Document No.");
CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Invoice);
CustLedgerEntry.SETRANGE("Document No.",SalesInvHeader."No.");
CustLedgerEntry.SETRANGE(Open,TRUE);
IF CustLedgerEntry.FIND('-') THEN
ERROR(STRSUBSTNO(Text001,SalesHeader."Document Type",SalesHeader."No."));
UNTIL (SalesInvHeader.NEXT = 0);
END;0 -
Any suggestion? Can I comment out the error message and can proceed for the shipment. If I do this, Any possible issues in future?0
-
sneha wrote:Below is the code from codeunit 439 and it is a error message.
SalesInvHeader.SETCURRENTKEY("Prepayment Order No.","Prepayment Invoice");
SalesInvHeader.SETRANGE("Prepayment Order No.",SalesHeader."No.");
SalesInvHeader.SETRANGE("Prepayment Invoice",TRUE);
IF SalesInvHeader.FINDSET THEN BEGIN
REPEAT
CustLedgerEntry.SETCURRENTKEY("Document No.");
CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Invoice);
CustLedgerEntry.SETRANGE("Document No.",SalesInvHeader."No.");
CustLedgerEntry.SETRANGE(Open,TRUE);
IF CustLedgerEntry.FIND('-') THEN
ERROR(STRSUBSTNO(Text001,SalesHeader."Document Type",SalesHeader."No."));
UNTIL (SalesInvHeader.NEXT = 0);
END;
I could not find above code in that codeunit ?0 -
chengalasettyvsrao wrote:I could not find above code in that codeunit ?
You should check again. The code exist in NAV 2009 SP1 version that is where I have checkedsneha wrote:Any suggestion? Can I comment out the error message and can proceed for the shipment. If I do this, Any possible issues in future?
Instead of commenting you should uncheck the field "Check Prepmt. when Posting" in sales setup. The purpose of the the functionality is that you can block the posting of Order if payment against prepayment invoice is not received.CA Sandeep Singla
http://ssdynamics.co.in0 -
Hi Sandeep,
Thanks! Yes, I verified the field “Check Prepmt. When Posting” in Sales & Receivables Setup and it is unchecked.
And, we are using Nav 5.0Sp1 Native. Here is what I am trying to achieve.
1. Created a order
2. Posted a prepayment Invoice
3. Changed the status of the order to open from Pending Prepayment, because prepayment has been delayed and user don’t want to stop the shipment.
4. Now trying to ship the order. Below is the code from the Post Button,
IF ApprovalMgt.PrePostApprovalCheck(Rec,PurchaseHeader) THEN BEGIN
IF ApprovalMgt.TestSalesPrepayment(Rec) THEN
ERROR(STRSUBSTNO(Text001,"Document Type","No."))
ELSE BEGIN
IF ApprovalMgt.TestSalesPayment(Rec) THEN
ERROR(STRSUBSTNO(Text002,"Document Type","No."))
ELSE
CODEUNIT.RUN(CODEUNIT::"Sales-Post (Yes/No)",Rec);
END;
END;
TestSalesPrepayment is a function in codeunit 439, and below is the code in that function.
SalesLines.SETRANGE("Document Type",SalesHeader."Document Type");
SalesLines.SETRANGE("Document No.",SalesHeader."No.");
SalesLines.SETFILTER("Prepmt. Line Amount",'<>%1',0);
IF SalesLines.FIND('-') THEN BEGIN
REPEAT
IF SalesLines."Prepmt. Amt. Inv." <> SalesLines."Prepmt. Line Amount" THEN
EXIT(TRUE);
UNTIL SalesLines.NEXT = 0;
END;
SalesInvHeader.SETCURRENTKEY("Prepayment Order No.","Prepayment Invoice");
SalesInvHeader.SETRANGE("Prepayment Order No.",SalesHeader."No.");
SalesInvHeader.SETRANGE("Prepayment Invoice",TRUE);
IF SalesInvHeader.FINDSET THEN BEGIN
REPEAT
CustLedgerEntry.SETCURRENTKEY("Document No.");
CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Invoice);
CustLedgerEntry.SETRANGE("Document No.",SalesInvHeader."No.");
CustLedgerEntry.SETRANGE(Open,TRUE);
IF CustLedgerEntry.FIND('-') THEN
ERROR(STRSUBSTNO(Text001,SalesHeader."Document Type",SalesHeader."No."));
UNTIL (SalesInvHeader.NEXT = 0);
END;
What could be wrong?0 -
if you remove the check mark in that field it will work.0
-
Dont remove the Check mark in that field, if your client required the Paymnets against the prepayment invoices for every sales order.
So in some cases your client ready to dispatch material without payment also. so In that case do some customization.
Add field called Allow ship to sales Order .
If it is Yes then allow the dispath without payment also.if it is no system will not allow to dispatch the material without payment.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions