fixed the issue with IDColumn
[vpj-cd] Make To Kit functionality http://sourceforge.net/tracker2/?func=detail&atid=879335&aid=2501713&group_id=176962 The kit functionality let define a BOM Type of Make To Kit Type when it is combined with BOM Use Manufacturing ADempiere let create a Manufacturing Order from Standard Sales Order this functionality is very similar to Make To Order but with de different that when a Customer Shipment for this Sales Order is completed the Manufacturing Order is close , finish product is receipt and the components are issue automatically. [vpj-cd] Show Cost Collection in Product http://mail.google.com/a/e-evolution.com/#inbox/11ecbbbdbf724125 Fix also the error in Sub contract introduced in Revision: 8037 Remove the the PP_Order_BOMLine and PP_Order_ID in M_Transaction this was replace for PP_Cost_Collector_ID that is the document that generate the transaction
This commit is contained in:
parent
152089d684
commit
1e7409cca8
|
@ -24,11 +24,9 @@ import java.sql.Timestamp;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.exceptions.DocTypeNotFoundException;
|
||||
import org.compiere.apps.ADialog;
|
||||
import org.compiere.minigrid.IDColumn;
|
||||
import org.compiere.model.MAcctSchema;
|
||||
import org.compiere.model.MClient;
|
||||
|
@ -629,12 +627,13 @@ public class MPPOrder extends X_PP_Order implements DocAction
|
|||
for (int i = 0; i < getLines().length ; i++)
|
||||
{
|
||||
MPPOrderBOMLine line = m_lines[i];
|
||||
IDColumn id = new IDColumn(line.get_ID());
|
||||
|
||||
KeyNamePair id = null;
|
||||
|
||||
if(MPPOrderBOMLine.ISSUEMETHOD_Backflush.equals(line.getIssueMethod()))
|
||||
id.setSelected(true);
|
||||
id = new KeyNamePair(line.get_ID(),"Y");
|
||||
else
|
||||
id.setSelected(false);
|
||||
id = new KeyNamePair(line.get_ID(),"N");
|
||||
|
||||
ArrayList<Object> data = new ArrayList<Object>();
|
||||
|
||||
|
@ -1252,8 +1251,9 @@ public class MPPOrder extends X_PP_Order implements DocAction
|
|||
|
||||
for(int i = 0; i < issue.length; i++ )
|
||||
{
|
||||
IDColumn id = (IDColumn) issue[i][0].get(0);
|
||||
if (id == null || !id.isSelected())
|
||||
KeyNamePair key = (KeyNamePair) issue[i][0].get(1);
|
||||
boolean isSelected = key.getName().equals("Y");
|
||||
if (key == null || !isSelected)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -1270,9 +1270,9 @@ public class MPPOrder extends X_PP_Order implements DocAction
|
|||
if (product != null && product.get_ID() != 0 && product.isStocked())
|
||||
{
|
||||
int M_AttributeSetInstance_ID = ANY_ASI;
|
||||
if (value == null && id.isSelected())
|
||||
if (value == null && isSelected)
|
||||
{
|
||||
M_AttributeSetInstance_ID = (Integer)id.getRecord_ID();
|
||||
M_AttributeSetInstance_ID = (Integer)key.getKey();
|
||||
}
|
||||
|
||||
MStorage[] storages = MPPOrder.getStorages(
|
||||
|
|
|
@ -1021,8 +1021,9 @@ public class VOrderReceiptIssue extends CPanel implements FormPanel,
|
|||
for (int i = 0; i < issue.getRowCount(); i++)
|
||||
{
|
||||
ArrayList<Object> data = new ArrayList<Object>();
|
||||
|
||||
data.add(issue.getValueAt (i, 0)); //0 - ID
|
||||
IDColumn id = (IDColumn)issue.getValueAt (i, 0);
|
||||
KeyNamePair key = new KeyNamePair(id.getRecord_ID(),id.isSelected() ? "Y": "N");
|
||||
data.add(key); //0 - ID
|
||||
data.add(issue.getValueAt (i, 1)); //1 - IsCritical
|
||||
data.add(issue.getValueAt (i, 2)); //2 - Value
|
||||
data.add(issue.getValueAt (i, 3)); //3 - KeyNamePair Product
|
||||
|
@ -1043,8 +1044,9 @@ public class VOrderReceiptIssue extends CPanel implements FormPanel,
|
|||
|
||||
for(int i = 0; i < m_issue.length; i++ )
|
||||
{
|
||||
IDColumn id = (IDColumn) m_issue[i][0].get(0);
|
||||
if (id == null || !id.isSelected())
|
||||
KeyNamePair key = (KeyNamePair) m_issue[i][0].get(1);
|
||||
boolean isSelected = key.getName().equals("Y");
|
||||
if (key == null || !isSelected)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -1064,17 +1066,17 @@ public class VOrderReceiptIssue extends CPanel implements FormPanel,
|
|||
if (product != null && product.get_ID() != 0 && product.isStocked())
|
||||
{
|
||||
|
||||
if (value == null && id.isSelected())
|
||||
if (value == null && isSelected)
|
||||
{
|
||||
M_AttributeSetInstance_ID = (Integer) id.getRecord_ID();
|
||||
M_AttributeSetInstance_ID = (Integer) key.getKey();
|
||||
//TODO: vpj-cd What happen when a product it more the time in Order
|
||||
String sql = "SELECT PP_Order_BOMLine_ID FROM PP_Order_BOMLine"
|
||||
+" WHERE M_Product_ID=? AND PP_Order_ID=?";
|
||||
PP_Order_BOMLine_ID = DB.getSQLValue(null, sql, M_Product_ID, getPP_Order_ID());
|
||||
}
|
||||
else if (value != null && id.isSelected())
|
||||
else if (value != null && isSelected)
|
||||
{
|
||||
PP_Order_BOMLine_ID = ((Integer) id.getRecord_ID());
|
||||
PP_Order_BOMLine_ID = ((Integer) key.getKey());
|
||||
}
|
||||
|
||||
MStorage[] storages = MPPOrder.getStorages(
|
||||
|
|
Loading…
Reference in New Issue