Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007033Openbravo ERP07. Sales managementpublic2009-01-20 18:252009-03-02 11:04
RenateNieuwkoop 
gorkaion 
highmajorhave not tried
closedfixed 
5
2.40 
2.50beta 
Core
No
0007033: Postgres: Payment term generated incorrect Payment date in Sales Invoice
Our students use the university platform for the BFT training and it's 2.40 Community version with Postgres Database.
I have 2.40 training locally with Oracle and I didn't have the same issue.

As per the snapshot, the payment term is one month, the checkbox 'next business day' is selected, yet for a Sales Invoice dated 20-1-2009, the due date in the Payment is 22-2-2009, which is a Sunday. The expected due date would be 20-2-2009, which is one month after 20-1-2009 and is a business day.


How to recreate the issue:
Enter a Sales Order for a customer, add a line with a product.
Go to 'Generate Invoices' and select the BP on the SO.
Check the Sales Invoice:
Sales Management || Transactions || Sales Invoice || Header

In the Sales Invoice, click the payment term link:
Master Data Management || Business Partner Setup || Payment Term || Header
commsup_sprint6
depends on backport 0007260 closed gorkaion Postgres: Payment term generated incorrect Payment date in Sales Invoice 
related to feature request 0007626 acknowledged rmorley Inprove the calendar management including the definition of labor days 
jpg 200109Paymenttermsnap1.jpg (215,304) 2009-01-20 18:25
https://issues.openbravo.com/file_download.php?file_id=683&type=bug
jpg
Issue History
2009-01-20 18:25RenateNieuwkoopNew Issue
2009-01-20 18:25RenateNieuwkoopAssigned To => rafaroda
2009-01-20 18:25RenateNieuwkoopsf_bug_id0 => 2524163
2009-01-20 18:25RenateNieuwkoopFile Added: 200109Paymenttermsnap1.jpg
2009-01-30 11:50rafarodaDescription Updated
2009-01-30 11:50rafarodaProposed Solution updated
2009-01-30 11:52psarobeStatusnew => scheduled
2009-01-30 11:52psarobeNote Added: 0012879
2009-01-30 11:52psarobefix_in_branch => trunk
2009-01-30 11:52rafarodaAssigned Torafaroda => gorkaion
2009-02-02 06:19pjuvaraPrioritynormal => high
2009-02-02 06:19pjuvarafix_in_branchtrunk =>
2009-02-18 13:43svnbotCheckin
2009-02-18 13:43svnbotNote Added: 0013650
2009-02-18 13:43svnbotStatusscheduled => resolved
2009-02-18 13:43svnbotResolutionopen => fixed
2009-02-18 13:43svnbotsvn_revision => 13311
2009-02-18 13:52gorkaionRelationship addedrelated to 0007626
2009-02-19 12:53gorkaionTag Attached: commsup_sprint6
2009-03-02 11:04sureshbabuRegression testing => No
2009-03-02 11:04sureshbabuStatusresolved => closed
2009-03-02 11:04sureshbabuNote Added: 0014213
2009-03-02 11:04sureshbabuFixed in Version => trunk

Notes
(0012879)
psarobe   
2009-01-30 11:52   
Hi Renate,

If you don't mark next business day then it works fine. So it seems that there is a problem with that check.
(0013650)
svnbot   
2009-02-18 13:43   
Repository: openbravo
Revision: 13311
Author: gorkaion
Date: 2009-02-18 13:43:09 +0100 (Wed, 18 Feb 2009)

Fixed bug 7033. Modified the day of the week calculation to ensure that saturday and sunday are always days 6 and 7.

---
U trunk/src-db/database/model/functions/C_PAYMENTDUEDATE.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=13311&sc=1 [^]
(0014213)
sureshbabu   
2009-03-02 11:04   
Retested in context 79.125.56.185/openbravotrunk