details:   https://code.openbravo.com/erp/devel/pi/rev/35d365d804ad
changeset: 25486:35d365d804ad
user:      Unai Martirena <unai.martirena <at> openbravo.com>
date:      Thu Dec 04 11:31:24 2014 +0100
summary:   Fixes Issue 28238: Cost Adjustment of Landed Cost type properly 
created.

Receipt tab of Landed Cost has been designed to work in the following way:
* either a Goods Receipt header is selected in 'Goods Receipt' field -> this 
option implies that specified landed cost are distributed among all Goods 
Receipt lines.
* or a Goods Receipt header is selected in Goods Receipt field and a Goods 
Receipt line 'of the very same Goods Receipt' is selected in the field 'Goods 
Receipt Line' -> this option implies that specified landed cost are distribute 
just for the Goods receipt line selected.
Above behaviour implies that Goods Receipt lines field lists only goods receipt 
lines of the goods receipt selected in Goods Receipt field. In order to do this 
a where clause has been added in Goods Receipt Lines selector to only display 
lines of the selected header, if no header is selected, no lines would be 
displayed.

details:   https://code.openbravo.com/erp/devel/pi/rev/cc0f6b428be8
changeset: 25487:cc0f6b428be8
user:      Unai Martirena <unai.martirena <at> openbravo.com>
date:      Thu Dec 04 11:37:10 2014 +0100
summary:   Fixes Issue 28301: Cost is properly calculated after two backdated 
transactions.

The problem was in updateBDCostingTimeRange function. While updating the 
backdated average costing time, if a previous costing record was found, the 
future ending date was assigned to backdated costing record, not to the current 
costing, leaving as current costing the backdated costing record, and this is 
wrong.

diffstat:

 src-db/database/sourcedata/OBUISEL_SELECTOR.xml      |  1 +
 src/org/openbravo/costing/AverageCostAdjustment.java |  4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 90e159b4e6e4 -r cc0f6b428be8 
src-db/database/sourcedata/OBUISEL_SELECTOR.xml
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR.xml   Tue Dec 02 13:44:23 
2014 +0530
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR.xml   Thu Dec 04 11:37:10 
2014 +0100
@@ -768,6 +768,7 @@
 <!--DE0239D3891D434E889A48916A7CAF88-->  <NAME><![CDATA[M_InOutLine no 
combo]]></NAME>
 <!--DE0239D3891D434E889A48916A7CAF88-->  
<AD_REFERENCE_ID><![CDATA[224C53E343404771A44494C2AD51DAF3]]></AD_REFERENCE_ID>
 <!--DE0239D3891D434E889A48916A7CAF88-->  
<AD_TABLE_ID><![CDATA[320]]></AD_TABLE_ID>
+<!--DE0239D3891D434E889A48916A7CAF88-->  
<WHERECLAUSE><![CDATA[e.shipmentReceipt.id = @inpmInoutId@]]></WHERECLAUSE>
 <!--DE0239D3891D434E889A48916A7CAF88-->  
<OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--DE0239D3891D434E889A48916A7CAF88-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DE0239D3891D434E889A48916A7CAF88-->  
<SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
diff -r 90e159b4e6e4 -r cc0f6b428be8 
src/org/openbravo/costing/AverageCostAdjustment.java
--- a/src/org/openbravo/costing/AverageCostAdjustment.java      Tue Dec 02 
13:44:23 2014 +0530
+++ b/src/org/openbravo/costing/AverageCostAdjustment.java      Thu Dec 04 
11:37:10 2014 +0100
@@ -761,8 +761,8 @@
 
     Costing curCosting = getTrxCurrentCosting(trx);
     if (curCosting != null) {
-      bdCosting.setEndingDate(curCosting.getEndingDate());
-      curCosting.setEndingDate(trx.getTransactionProcessDate());
+      curCosting.setEndingDate(bdCosting.getEndingDate());
+      bdCosting.setEndingDate(trx.getTransactionProcessDate());
       OBDal.getInstance().save(curCosting);
     } else {
       // There isn't any previous costing.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to