IDEMPIERE-3532 Remove hardcoded values for InfoInvoiceWindow (BPartnerID / IsSOTrx) and InfoPaymentWindow (IsSOTrx)
This commit is contained in:
parent
6a76072a43
commit
6950087449
|
@ -0,0 +1,18 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3532 - Remove hardcoded values for InfoInvoiceWindow (BPartnerID / IsSOTrx) and InfoPaymentWindow (IsSOTrx)
|
||||
-- Oct 27, 2017 5:16:11 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@C_BPartner_ID@',Updated=TO_DATE('2017-10-27 17:16:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200052
|
||||
;
|
||||
|
||||
-- Oct 27, 2017 5:16:25 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT ''@IsSOTrx:Y@'' AS DefaultValue FROM DUAL',Updated=TO_DATE('2017-10-27 17:16:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200066
|
||||
;
|
||||
|
||||
-- Oct 27, 2017 5:17:29 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT ''@IsSOTrx:Y@'' AS DefaultValue FROM DUAL',Updated=TO_DATE('2017-10-27 17:17:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200085
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201705041136_IDEMPIERE-3338.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,16 @@
|
|||
-- IDEMPIERE-3532 - Remove hardcoded values for InfoInvoiceWindow (BPartnerID / IsSOTrx) and InfoPaymentWindow (IsSOTrx)
|
||||
-- Oct 27, 2017 5:16:12 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@C_BPartner_ID@',Updated=TO_TIMESTAMP('2017-10-27 17:16:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200052
|
||||
;
|
||||
|
||||
-- Oct 27, 2017 5:16:25 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT ''@IsSOTrx:Y@'' AS DefaultValue FROM DUAL',Updated=TO_TIMESTAMP('2017-10-27 17:16:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200066
|
||||
;
|
||||
|
||||
-- Oct 27, 2017 5:17:29 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT ''@IsSOTrx:Y@'' AS DefaultValue FROM DUAL',Updated=TO_TIMESTAMP('2017-10-27 17:17:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200085
|
||||
;
|
||||
|
||||
|
||||
SELECT register_migration_script('201705041136_IDEMPIERE-3338.sql') FROM dual
|
||||
;
|
|
@ -3,9 +3,7 @@
|
|||
*/
|
||||
package org.adempiere.webui.info;
|
||||
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
|
@ -15,7 +13,7 @@ public class InfoInvoiceWindow extends InfoWindow {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3169476148884310274L;
|
||||
private static final long serialVersionUID = -5175983673145977830L;
|
||||
|
||||
/**
|
||||
* @param WindowNo
|
||||
|
@ -50,37 +48,6 @@ public class InfoInvoiceWindow extends InfoWindow {
|
|||
whereClause, AD_InfoWindow_ID, lookup);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initParameters() {
|
||||
String isSOTrx = Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx");
|
||||
if (!isLookup() && Util.isEmpty(isSOTrx)) {
|
||||
isSOTrx = "Y";
|
||||
}
|
||||
|
||||
//Set Defaults
|
||||
String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
|
||||
if (!Util.isEmpty(bp)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("C_BPartner_ID")) {
|
||||
editor.setValue(new Integer(bp));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(isSOTrx)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsSOTrx")) {
|
||||
editor.setValue(isSOTrx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveSelectionDetail() {
|
||||
int row = contentPanel.getSelectedRow();
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
*/
|
||||
package org.adempiere.webui.info;
|
||||
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
*
|
||||
|
@ -15,7 +11,7 @@ public class InfoPaymentWindow extends InfoWindow {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3556977962189259779L;
|
||||
private static final long serialVersionUID = 1322780214387328688L;
|
||||
|
||||
/**
|
||||
* @param WindowNo
|
||||
|
@ -50,23 +46,4 @@ public class InfoPaymentWindow extends InfoWindow {
|
|||
whereClause, AD_InfoWindow_ID, lookup);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initParameters() {
|
||||
String isSOTrx = Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx");
|
||||
if (!isLookup() && Util.isEmpty(isSOTrx)) {
|
||||
isSOTrx = "Y";
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(isSOTrx)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsReceipt")) {
|
||||
editor.setValue(isSOTrx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue