hg merge release-1.0c (merge release1 into release2)
This commit is contained in:
commit
f4ab371718
|
@ -0,0 +1,23 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- Dec 13, 2013 4:13:06 PM COT
|
||||||
|
-- IDEMPIERE-1597 Price List and Date must be not-updateable
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','Price list cannot be changed because the order contains product lines',200243,'D','41c5bae2-77e0-4beb-a562-3f3ae465cb90','CannotChangePl','Y',TO_DATE('2013-12-13 16:13:05','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-12-13 16:13:05','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 13, 2013 4:15:35 PM COT
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','Date Ordered cannot be changed because the order contains product lines and the change falls in a differente price list version',200244,'D','8264d9e8-2b91-4aa2-ba80-82171b747254','CannotChangeDateOrdered','Y',TO_DATE('2013-12-13 16:15:34','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-12-13 16:15:34','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 13, 2013 4:23:13 PM COT
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','Price list cannot be changed because the invoice contains product lines',200245,'D','4d860b4e-0cd0-491f-a68d-e8a4b0ffb8f8','CannotChangePlIn','Y',TO_DATE('2013-12-13 16:23:12','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-12-13 16:23:12','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 13, 2013 4:24:15 PM COT
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','Date Invoiced cannot be changed because the invoice contains product lines and the change falls in a differente price list version',200246,'D','411625c7-21ee-48e0-8350-5e59f7fb9ecd','CannotChangeDateInvoiced','Y',TO_DATE('2013-12-13 16:24:14','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-12-13 16:24:14','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201312131644_IDEMPIERE-1597.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
-- Dec 13, 2013 4:13:06 PM COT
|
||||||
|
-- IDEMPIERE-1597 Price List and Date must be not-updateable
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','Price list cannot be changed because the order contains product lines',200243,'D','41c5bae2-77e0-4beb-a562-3f3ae465cb90','CannotChangePl','Y',TO_TIMESTAMP('2013-12-13 16:13:05','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-12-13 16:13:05','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 13, 2013 4:15:35 PM COT
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','Date Ordered cannot be changed because the order contains product lines and the change falls in a differente price list version',200244,'D','8264d9e8-2b91-4aa2-ba80-82171b747254','CannotChangeDateOrdered','Y',TO_TIMESTAMP('2013-12-13 16:15:34','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-12-13 16:15:34','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 13, 2013 4:23:13 PM COT
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','Price list cannot be changed because the invoice contains product lines',200245,'D','4d860b4e-0cd0-491f-a68d-e8a4b0ffb8f8','CannotChangePlIn','Y',TO_TIMESTAMP('2013-12-13 16:23:12','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-12-13 16:23:12','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 13, 2013 4:24:15 PM COT
|
||||||
|
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','Date Invoiced cannot be changed because the invoice contains product lines and the change falls in a differente price list version',200246,'D','411625c7-21ee-48e0-8350-5e59f7fb9ecd','CannotChangeDateInvoiced','Y',TO_TIMESTAMP('2013-12-13 16:24:14','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-12-13 16:24:14','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201312131644_IDEMPIERE-1597.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -364,7 +364,7 @@ public class ImportBankStatement extends SvrProcess
|
||||||
//Import Bank Statement
|
//Import Bank Statement
|
||||||
sql = new StringBuilder("SELECT * FROM I_BankStatement")
|
sql = new StringBuilder("SELECT * FROM I_BankStatement")
|
||||||
.append(" WHERE I_IsImported='N'")
|
.append(" WHERE I_IsImported='N'")
|
||||||
.append(" ORDER BY C_BankAccount_ID, Name, StatementDate, ReferenceNo");
|
.append(" ORDER BY C_BankAccount_ID, Name, StatementDate, EftStatementReference");
|
||||||
|
|
||||||
MBankStatement statement = null;
|
MBankStatement statement = null;
|
||||||
MBankAccount account = null;
|
MBankAccount account = null;
|
||||||
|
|
|
@ -990,6 +990,26 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
setC_CashPlanLine_ID(order.getC_CashPlanLine_ID());
|
setC_CashPlanLine_ID(order.getC_CashPlanLine_ID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IDEMPIERE-1597 Price List and Date must be not-updateable
|
||||||
|
if (!newRecord && (is_ValueChanged(COLUMNNAME_M_PriceList_ID) || is_ValueChanged(COLUMNNAME_DateInvoiced))) {
|
||||||
|
int cnt = DB.getSQLValueEx(get_TrxName(), "SELECT COUNT(*) FROM C_InvoiceLine WHERE C_Invoice_ID=? AND M_Product_ID>0", getC_Invoice_ID());
|
||||||
|
if (cnt > 0) {
|
||||||
|
if (is_ValueChanged(COLUMNNAME_M_PriceList_ID)) {
|
||||||
|
log.saveError("Error", Msg.getMsg(getCtx(), "CannotChangePlIn"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (is_ValueChanged(COLUMNNAME_DateInvoiced)) {
|
||||||
|
MPriceList pList = MPriceList.get(getCtx(), getM_PriceList_ID(), null);
|
||||||
|
MPriceListVersion plOld = pList.getPriceListVersion((Timestamp)get_ValueOld(COLUMNNAME_DateInvoiced));
|
||||||
|
MPriceListVersion plNew = pList.getPriceListVersion((Timestamp)get_Value(COLUMNNAME_DateInvoiced));
|
||||||
|
if (plNew == null || !plNew.equals(plOld)) {
|
||||||
|
log.saveError("Error", Msg.getMsg(getCtx(), "CannotChangeDateInvoiced"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // beforeSave
|
} // beforeSave
|
||||||
|
|
||||||
|
|
|
@ -1069,6 +1069,26 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IDEMPIERE-1597 Price List and Date must be not-updateable
|
||||||
|
if (!newRecord && (is_ValueChanged(COLUMNNAME_M_PriceList_ID) || is_ValueChanged(COLUMNNAME_DateOrdered))) {
|
||||||
|
int cnt = DB.getSQLValueEx(get_TrxName(), "SELECT COUNT(*) FROM C_OrderLine WHERE C_Order_ID=? AND M_Product_ID>0", getC_Order_ID());
|
||||||
|
if (cnt > 0) {
|
||||||
|
if (is_ValueChanged(COLUMNNAME_M_PriceList_ID)) {
|
||||||
|
log.saveError("Error", Msg.getMsg(getCtx(), "CannotChangePl"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (is_ValueChanged(COLUMNNAME_DateOrdered)) {
|
||||||
|
MPriceList pList = MPriceList.get(getCtx(), getM_PriceList_ID(), null);
|
||||||
|
MPriceListVersion plOld = pList.getPriceListVersion((Timestamp)get_ValueOld(COLUMNNAME_DateOrdered));
|
||||||
|
MPriceListVersion plNew = pList.getPriceListVersion((Timestamp)get_Value(COLUMNNAME_DateOrdered));
|
||||||
|
if (plNew == null || !plNew.equals(plOld)) {
|
||||||
|
log.saveError("Error", Msg.getMsg(getCtx(), "CannotChangeDateOrdered"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // beforeSave
|
} // beforeSave
|
||||||
|
|
||||||
|
|
|
@ -240,9 +240,6 @@ public class MPriceList extends X_M_PriceList
|
||||||
{
|
{
|
||||||
if (valid == null)
|
if (valid == null)
|
||||||
valid = new Timestamp (System.currentTimeMillis());
|
valid = new Timestamp (System.currentTimeMillis());
|
||||||
// Assume there is no later
|
|
||||||
if (m_plv != null && m_plv.getValidFrom().before(valid))
|
|
||||||
return m_plv;
|
|
||||||
|
|
||||||
final String whereClause = "M_PriceList_ID=? AND TRUNC(ValidFrom)<=?";
|
final String whereClause = "M_PriceList_ID=? AND TRUNC(ValidFrom)<=?";
|
||||||
m_plv = new Query(getCtx(), I_M_PriceList_Version.Table_Name, whereClause, get_TrxName())
|
m_plv = new Query(getCtx(), I_M_PriceList_Version.Table_Name, whereClause, get_TrxName())
|
||||||
|
|
|
@ -1688,6 +1688,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
ADTabpanel adtabpanel = (ADTabpanel) iadtabpanel;
|
ADTabpanel adtabpanel = (ADTabpanel) iadtabpanel;
|
||||||
Grid grid = adtabpanel.getGridView().getListbox();
|
Grid grid = adtabpanel.getGridView().getListbox();
|
||||||
Columns columns = grid.getColumns();
|
Columns columns = grid.getColumns();
|
||||||
|
if (columns != null) {
|
||||||
List<?> list = columns.getChildren();
|
List<?> list = columns.getChildren();
|
||||||
for(int i = 0; i < list.size(); i++)
|
for(int i = 0; i < list.size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -1700,6 +1701,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue