Openbravo Issue Tracking System - Modules
View Issue Details
0034318ModulesPayment Aging Balance Reportpublic2016-10-27 13:252016-10-28 15:16
vmromanos 
vmromanos 
normalminoralways
closedfixed 
5
 
 
2016-06-29
https://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/8b5c51b059369333dc5607bfdcd0b0476bb21f27 [^]
Production - QA Approved
aferraz
0034318: Supplier Reference stopped working
The document number displayed in the Payables Aging Schedule can show either the invoice/payment number or the supplier reference. This can be configured at Organization | Information tab, in the field: Purchase Invoice's Reference for Payment Description.

When that field is set to "Supplier Reference", the document no. shown in the payables report must show the supplier reference, and if blank, the invoice document number.


This feature stopped working.
Log into F&B client
Create a Purchase invoice for Region Norte organization for 2 months ago. Leave the Supplier Reference empty.
Enter any line and process it. Do not pay it
Go to Organization window. Select Region Norte organization
Go to Information tab and select Supplier Reference inside the Purchase Invoice's Reference for Payment Description field
Open the Payables Aging Schedule window, select Region Norte organization, Show details = Y and leave the default value in the rest of fields.
Press search button.
Find the invoice previously created. Verify the document no. is equal to the invoice number. OK
Browse to that invoice and enter any value in the Supplier Reference field. Save it.
Launch the Payables Aging Schedule report again. The document no. should be the value entered in the Supplier Reference field, but instead it's the invoice number.
No tags attached.
caused by defect 0033262 closed markmm82 To show "Supplier reference" for credit payments (same as invoices) in case Organization is configured for that 
Issue History
2016-10-27 13:25vmromanosNew Issue
2016-10-27 13:25vmromanosAssigned To => vmromanos
2016-10-27 13:25vmromanosRegression date => 2016-06-29
2016-10-27 13:25vmromanosRegression introduced by commit => https://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/8b5c51b059369333dc5607bfdcd0b0476bb21f27 [^]
2016-10-27 13:25vmromanosRegression level => Production - QA Approved
2016-10-27 13:26vmromanosRelationship addedcaused by 0033262
2016-10-27 13:29vmromanosNote Added: 0090954
2016-10-27 13:34vmromanosStatusnew => scheduled
2016-10-27 13:42vmromanosReview Assigned To => aferraz
2016-10-27 13:43hgbotCheckin
2016-10-27 13:43hgbotNote Added: 0090955
2016-10-27 13:43hgbotStatusscheduled => resolved
2016-10-27 13:43hgbotResolutionopen => fixed
2016-10-27 13:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/3fc3b54d7cf8c314737fb1c1d62e25b1f25a8887 [^]
2016-10-27 13:44vmromanosNote Added: 0090956
2016-10-28 15:16aferrazNote Added: 0090999
2016-10-28 15:16aferrazNote Added: 0091000
2016-10-28 15:16aferrazStatusresolved => closed

Notes
(0090954)
vmromanos   
2016-10-27 13:29   
Test plan:

Create a Purchase invoice for Region Norte organization for 2 months ago. Leave the Supplier Reference empty.
Enter any line and process it. Do not pay it
Go to Organization window. Select Region Norte organization
Go to Information tab and select Supplier Reference inside the Purchase Invoice's Reference for Payment Description field
Open the Payables Aging Schedule window, select Region Norte organization, Show details = Y and leave the default value in the rest of fields.
Press search button.
Find the invoice previously created. Verify the document no. is equal to the invoice number.
Browse to that invoice and enter any value in the Supplier Reference field. Save it.
Launch the Payables Aging Schedule report again. Verify the document no. is equal to the Supplier Reference introduced before.
Go to Organization window. Select Region Norte organization
Go to Information tab and select Invoice Document Number inside the Purchase Invoice's Reference for Payment Description field.
Launch the Payables Aging Schedule report again.
Find the invoice previously created. Verify the document no. is equal to the invoice number.
(0090955)
hgbot   
2016-10-27 13:43   
Repository: erp/mods/org.openbravo.agingbalance
Changeset: 3fc3b54d7cf8c314737fb1c1d62e25b1f25a8887
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Oct 27 13:42:07 2016 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/3fc3b54d7cf8c314737fb1c1d62e25b1f25a8887 [^]

Fixed bug 34318: Supplier Reference stopped working

The fp.referenceno <> '' and i.poreference <> '' are wrongly evaluated by the database. In case any of these fields is not null, the database will evaluate these expressions as false. Thus the AGING_GETDOCNO function is never called and the report always shows the invoice number.

Removing those expressions fixes the issue.

---
M src-db/database/sourcedata/AD_MODULE.xml
M src/org/openbravo/agingbalance/ad_reports/AgingDao_data.xsql
---
(0090956)
vmromanos   
2016-10-27 13:44   
Fixed in module version 3.1.1701 (or higher)
(0090999)
aferraz   
2016-10-28 15:16   
Bug is only reproducible in Oracle.
(0091000)
aferraz   
2016-10-28 15:16   
Code review + Testing OK