updating automatically posting date

GDGD Member Posts: 49
hello to everyone,

i have a problem with posting date in invoices. when you create a sales order with posting date, order date and document date (ie 25/09/2005), in case you want to produce an invoice after 3 days the system does not update automatically the posting date of the invoice to the current date!!!!

you have to manually change the posting date in order to post the invoice with the correct date

do you have any clue how to avoid the manually situation?

gd

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    edited 2005-09-27
    You can try to use the batch report for invoicing instead of invoicinig manualy. This report has an option of replacing the posting date.

    If you don't want that you have to make a change in the posting routine.

    Codeunit 80 has a function SetPostingDate. If you call this with a new date before you run it the posting date will be replaced.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    A simple solution would be to add following lines in the OnAfterGetCurrRecord-trigger of the Sales Order form:
    IF "Posting Date" <> TODAY THEN
      "Posting Date" := TODAY;
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    IF "Posting Date" <> TODAY THEN
      "Posting Date" := TODAY;
    

    Yes, that is also an option, maybe I am thinking to complex, but that is what I get paid for :D
  • GDGD Member Posts: 49
    the problem that if i do something in the sales order form is that i can not reprint this document again.

    in codeunit 80 do you think is more safe?

    in the section setPostingDate i put somenting

    ReplacePostingDate := WorkDate;
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    I think best is to leave CU 80 as is and to change the Codeunit "Sales-Post (Yes/No)"

    Put in someting like

    SalesPost.setPostingDate(TRUE, FALSE, WORKDATE);

    before the

    SalesPost.RUN.
  • GDGD Member Posts: 49
    thanks....it seems works fine
  • SavatageSavatage Member Posts: 7,142
    GD wrote:
    the problem that if i do something in the sales order form is that i can not reprint this document again.

    Just curious....... :-k
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Yes, me to actualy. I don't think this is standard navision is it? :o
  • SavatageSavatage Member Posts: 7,142
    A simple solution would be to add following lines in the OnAfterGetCurrRecord-trigger of the Sales Order form:
    IF "Posting Date" <> TODAY THEN
      "Posting Date" := TODAY;
    

    Something I noticed is that when I go into the order the posting date IS updated to TODAY. But when I click the order LIST the posting date displayed is still the old date.

    So it's not updating something?
  • DenSterDenSter Member Posts: 8,307
    The record still needs to be written to the database, so it looks like this does not happen when you pull up the list from an unmodified record. I bet if you select the next order down and page back up it will change.
  • 2tje2tje Member Posts: 80
    Just a curious question for the financial people.
    Should Navision not always adjust the Posting Date to the Workdate, or at least have a setup for this?
    So, eg. also for Purchase, posting a Pick, etc.
    Example.

    Create a Sales Order on 25-1-1, create a Pick on 26-1-1, post the pick on 27-1-1. The Posting Date in the Entry's and Historic Documents should be 27-1 ????
  • David_CoxDavid_Cox Member Posts: 509
    2tje wrote:
    Just a curious question for the financial people.
    Should Navision not always adjust the Posting Date to the Workdate, or at least have a setup for this?
    So, eg. also for Purchase, posting a Pick, etc.
    Example.

    Create a Sales Order on 25-1-1, create a Pick on 26-1-1, post the pick on 27-1-1. The Posting Date in the Entry's and Historic Documents should be 27-1 ????

    No!
    Because in a Purchase the Invoice Posting Date is the VAT Liability Tax point Date, which comes from the Vendors Invoice and will have been passed, by the time the Invoice is Posted, Same with the Sales the Posting Date is the VAT liability Date.

    And you need the Invoices to fall into the right VAT Period.

    B.T.W I am not a Finance person, but I belive all Navision developers should have a reasonable understanding of basic accounting before attempting any coding changes around the Finance posting. :?
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • 2tje2tje Member Posts: 80
    David,

    I am not a finance specialist either.
    I understand your point of the VAT liability, but what is wrong with changing the Posting Date on eg. the Sales Order? In Navision it can be done manually in between 2 deliveries out of the same Order! So, then what will be wrong with the Shipments and Invoices created out of this Order?
  • Francis_MalengierFrancis_Malengier Member Posts: 28
    Hello,

    what we did in some projects is just clear the posting date when an invoice is created. This way you leave the option open to use the posting date you want.
    Sometimes (e.i. beginning of the month) you might want to post an invoice in the previous month.


    greets
  • David_CoxDavid_Cox Member Posts: 509
    2tje wrote:
    David,

    I am not a finance specialist either.
    I understand your point of the VAT liability, but what is wrong with changing the Posting Date on eg. the Sales Order? In Navision it can be done manually in between 2 deliveries out of the same Order! So, then what will be wrong with the Shipments and Invoices created out of this Order?

    My point was more Automation is all well and good, but things are not always as simple from an accounting perspective, the original poster wants to automate the updating of the posting date to today on a Sale, but what if we have a situation where the sales Invoices should have been posted the night before (VAT Period End), the sales clerk comes in next day and posts the Invoices, not thinking about the posting date because the system deals with that?
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
Sign In or Register to comment.