Changing Pay-To Vendor No. before posting invoice ?

dlauwersdlauwers Member Posts: 127
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

  • jannestigjannestig Member Posts: 1,000
    Without knowing any localisations i may need to know which affect this workflow but why don't you just recieve only against the order and create the invoice seperately use get reciepts lines functionality ?

    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.
  • dlauwersdlauwers Member Posts: 127
    Dear Jannestig,

    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
  • jannestigjannestig Member Posts: 1,000
    :oops:

    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?
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Here's what we recommend our customer to do:

    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. :D
  • jannestigjannestig Member Posts: 1,000
    HI Alex i think you missed the point there

    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
  • jannestigjannestig Member Posts: 1,000
    Just a thought

    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,
  • Alex_ChowAlex_Chow Member Posts: 5,063
    edited 2007-10-23
    No, I didn't miss the point and I know exactly what I'm talking about

    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...
  • jannestigjannestig Member Posts: 1,000
    ah well i was on v 5, so maybe your solution does work in the earlier one then :D

    Oh well despite the tasty egg on my face i learnt something new, since he is in version 4 it probably will :D
  • Alex_ChowAlex_Chow Member Posts: 5,063
    jannestig wrote:
    ah well i was on v 5, so maybe your solution does work in the earlier one then :D

    Oh well despite the tasty egg on my face i learnt something new, since he is in version 4 it probably will :D

    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.
  • dlauwersdlauwers Member Posts: 127
    Hi guys,

    Thanks for your replies !

    I have tried this
    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

    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
    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 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
  • flfl Member Posts: 184
    Yes , that's possible. I had the same request a long time ago (on version 3.70). So I added a function called "change pay-to" on the button function of the purchase receipt. Then I did start following code :

    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.
    Francois
    Consultant-Developper

    http://www.CreaChain.com
  • dlauwersdlauwers Member Posts: 127
    Thanks fl [-o<

    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
  • jannestigjannestig Member Posts: 1,000
    To try the item charge line do the following

    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
Sign In or Register to comment.