Menu

#1974 PaymentTerm DueDate Bug

Core
closed-fixed
9
2010-05-11
2009-07-10
No

Function paymenttermduedate in PostgreSQL does not function well. I fixed that by changing the line:

-NoDays := EXTRACT(epoch FROM TRUNC(DocDate) - FirstDay);
+NoDays := EXTRACT(DAY FROM DocDate);

My testing Payment Term is :

FixMonthCutOff=15
FixMonthDay=24
FixMontOffset=0

Regards,

Armen Rizal

Discussion

  • Carlos Ruiz

    Carlos Ruiz - 2010-04-27

    Committed revision 12158.
    http://adempiere.svn.sourceforge.net/viewvc/adempiere?view=rev&revision=12158

    I did a small change on Armen's suggestion,
    instead of
    NoDays := EXTRACT(DAY FROM DocDate);
    I changed to
    NoDays := EXTRACT(day FROM TRUNC(DocDate) - FirstDay);

    to make it consistent with oracle version.

    Regards,

    Carlos Ruiz

     
  • Carlos Ruiz

    Carlos Ruiz - 2010-04-27
    • milestone: 898871 --> Core
    • priority: 5 --> 9
    • assigned_to: hengsin --> globalqss
    • status: open --> pending-fixed
     
  • Tony Snook

    Tony Snook - 2010-04-27

    Merged to trunk with Revision: 12165
    http://adempiere.svn.sourceforge.net/adempiere/?rev=12165&view=rev

    Log Message:
    -----------
    Merge bug fixes from release to trunk
    merge 12158, 12159

    Regards,
    Tony

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.