NAV 4.0sp3 BE
Hi,
A customer is asking if there is a quicker way to change a Pay-To vendor No. before an invoice is posted ?
What do they do: They order some items from a vendor, not knowing that the Buy-From and Pay-To vendor are not the same. They receive the goods and use them.
Many days later, the invoice is received and then the customer sees that the Pay-To vendor is not the same as the Buy-From vendor. So he tries to change it on the Purchase order, but that is not allowed because the items are received and allready used in sales/production. ](*,)
So the only thing left to do is post the invoice
as-is and create a Credit Memo marked as correction and post it, and make a new Invoice with the correct Pay-To vendor by copying the lines from the first posted invoice and post the new invoice.
This all works, but takes time
. And it seems that they have this problem quite often.
1) Is there a way to speed up this operation ?
Why can we not alter the Pay-To vendor No. when we did not have created or posted the invoice ? We can re-open the order and change other info !
OR
2) Is it possible to create a function on the form of a posted invoice that would automatically create a new credit memo/invoice for that posted invoice with one click of a button ?
If there is no other way in changing the Pay-To vendor than via a Credit Memo, the second question could be a way to let them work faster.
Could you experts give me some feedback please ?
Thanks
Danny
Comments
This is standard and would be exactly what they are asking for i imagine the only other task they would have to do is delete the fully recieved purchase orderes which is a batch job under administration.
Thanks for your answer.
There running the Belgium edition of NAV 4 if that is wat you mean by localisation.
If the goods are received by a warehouse Receipt then they do not show up in the get reciept lines. I tested this and you only see the lines that are valid for the Pay-To vendor. But because they have been received on another Pay-To Vendor you cannot select these lines.
And if you first import the lines on the invoice via reciepts line functionality, you cannot change the Pay-To Vendor after that because of a conflict of Pay-To vendor on the lines and the header.
So unless I have forgotten something in my test, this does not give a possible solution :-k
Maybe I forgot to mention that the customer works with Warehouse reception. :-$
Danny
Oh yes i forgot about that i was remembering when we removed that code,
The only way to charge another vendor like that is to use an item charge
create an invoice for the order item by item etc and then selection item charge assignment, this will let you pick any reciept against any vendor you want, split the cost or assign ir as you want,
Then post it
This works of course you still have the issue of an univoiced order and i think you will have to test to see how costs are affected.
But in the end you may find you should tell the client they have to pay for a mod or work out who they have to pay when placing an order.
What is the main reason they do not have this information before hand is it due to something like they have pay the invoice to a shipping company etc?
1. Create a Purchase Invoice to the vendor you want to pay to
2. Use the Get Receipt Line function
3. When the get receipt line screen comes up, click on the Table Filter
4. Filter on the Vendor you originally received the product from
5. Highlight and select the items you want to invoice
I've tested this out and it works fine. The great thing is that it doesn't affect costing as well.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
the scenario is
Order
buy from V = a
pay to vendor = a or b
Stock Recieved
Invoice
Pay to vendor = c
you can follow your steps but you will always get the message "the pay to Vendor No. must be the same on the invoice and reciept"
I am not sure how you got this to work maybe us version is different, but thats definately not the solution assignment an item charge to the recept line for the exact cost would do it though but a pretty tedious way to do so :S
You may have to play around with it but a really simple method would be to change the vendor card on the invoicing tab change the pay to vendor before raising the invoice to the vendor you want,
This would mean you can pick the vendor who was receipted against and use the get reciepts function but the payment would be put to the correct vendor.
This is a quick way of doing it but if you already had existing pay to vendors you would have to make sure to change them back,
However, I just tried this on the 5.0 database, and it gives an error... You could've done this in versions prior to Navision 4.0. I guess they took it out...
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Oh well despite the tasty egg on my face i learnt something new, since he is in version 4 it probably will
I guess I should spend some time on why they put in an error message in 5.0. For some reason, situations like this happen more often than it should for our customers.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Thanks for your replies !
I have tried this
But I get an error like Jannestig said.
I also tried to change the Pay-To Vendor on the vendor card just before I create an invoice from an order.
This does not work either, the Pay-to Vendor is taken from the order, it seems that the Pay-To Vendor that is on the Vendor card is only used when you enter the Buy-From Vendor No. to fill in the Pay-To Vendor on the Trigger.
When I tried to create a new invoice and changed the Pay-To Vendor No. and then use the function copy document to get the lines from the original order, it does not copy those lines because the Pay-To Vendor is not the same as I have set on the header of the invoice. So no solution here either !
When I try this
Then I get an error "Type must be Charge (Item) in Purchase Line Document Type ....." Do I first have to add an Item charge to the invoice or how does this work ? I don't know if (even if this works) is a solution because if you have to type 100 lines with all details, you can make a lot of mistakes. Then making a credit Memo is faster.
So for now, no easy or faster solution than making a credit Memo ?
Could we make some modifications (we are partner) to some code to allow this in a safe and correct way ?
Thanks
Danny
variables:
frm=form vendor list
vend = record vendor
recPRH = record purchase receipt header
recRPL = record purchase receipt line
recPO = record purchase header
recPOL = record purchase line
code:
CLEAR(frm);
frm.LOOKUPMODE(TRUE);
IF frm.RUNMODAL=ACTION::LookupOK THEN BEGIN
frm.GETRECORD(Vend);
recPRH.RESET;
recPRH.SETRANGE(recPRH."Order No.","Order No.");
IF recPRH.FIND('-') THEN REPEAT
recPRH."Pay-to Vendor No.":=Vend."No.";
recPRH."Pay-to Name":=Vend.Name;
recPRH."Pay-to Name 2":=Vend."Name 2";
recPRH."Pay-to Address":=Vend.Address;
recPRH."Pay-to Address 2":=Vend."Address 2";
recPRH."Pay-to City":=Vend.City;
recPRH."Pay-to Contact":=Vend.Contact;
recPRH."Pay-to Post Code":=Vend."Post Code";
recPRH."Pay-to County":=Vend.County;
recPRH."Pay-to Country Code":=Vend."Country Code";
recPRH.MODIFY;
recPRL.RESET;
recPRL.SETRANGE(recPRL."Document No.",recPRH."No.");
IF recPRL.FIND('-') THEN
recPRL.MODIFYALL(recPRL."Pay-to Vendor No.",Vend."No.");
UNTIL recPRH.NEXT=0;
recPO.RESET;
recPO.SETRANGE(recPO."Document Type",recPO."Document Type"::Order);
recPO.SETRANGE(recPO."No.","Order No.");
IF recPO.FIND('-') THEN BEGIN
recPO."Pay-to Vendor No.":=Vend."No.";
recPO."Pay-to Name":=Vend.Name;
recPO."Pay-to Name 2":=Vend."Name 2";
recPO."Pay-to Adddress":=Vend.Address;
recPO."Pay-to Address 2":=Vend."Address 2";
recPO."Pay-to City":=Vend.City;
recPO."Pay-to Contact":=Vend.Contact;
recPO."Pay-to Post Code":=Vend."Post Code";
recPO."Pay-to County":=Vend.County;
recPO."Pay-to Country Code":=Vend."Country Code";
recPO.MODIFY;
END;
recPOL.RESET;
recPOL.SETRANGE(recPOL."Document Type",recPOL."Document Type"::Order);
recPOL.SETRANGE(recPOL."Document No.","Order No.");
IF recPOL.FIND('-') THEN
recPOL.MODIFYALL(recPOL."Pay-to Vendor No.",Vend."No.");
END;
Security:
You have to add rights to this form that purchase receipt header and lines can be modified (but that should be no problem for you as a partner).
This works fine for more then 3 years, so.
Consultant-Developper
http://www.CreaChain.com
This will safe me some time, but most important I know that I can change the Pay-To this way in a safe manner.
I have tested the code and it works like charm \:D/
One thing needs to be extended I think. If I change the Pay-to vendor to a foreign vendor in another country. The VAT Bus. Posting Group should also change. This is not copied from the new Pay-To Vendor.
I guess i have to do more work on this one, because it impacts the order lines etc... They have to be re-generated. As long if you did not receive any goods, you can open the order and change it. That was the same as with the Pay-To.
Do we have to update the lines (or not) to represent the new VAT Bus. Posting Group ?
I think maybe even more fields need te be updated in case that there is a Payment Terms, Due Date,....
We are some steps closer, thanks to fl =D> but my feeling says we need to go a little further to complete it !
Hope you guys with more experience in the inners of NAV than I, may have more ideas ?
Thanks
Danny
1) create invoice to the Vendor you want
2)enter an item charge line with quanity 1 and amount equal to the original order amount
3) select line item charge assignment
4) Functions 'get reciept lines'
5) choose reciept
6) distribute the cost as you wish
You can write the cost on line by line or just the whole amount depending upon your needs.
The change pay to vendor on the item card of the original vendor who the reciept was original billed to works,
I have only tested these in 5 though
Coding maybe best the best long term soultion for you as FL as shown you