From b04008451d513e0a9b64f1779de6a15079939264 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 12 Oct 2012 15:42:19 -0500 Subject: [PATCH 01/10] IDEMPIERE-77 Start on the left, Cancel on the right IDEMPIERE-166 Rebranding of logo and product name --- .../org/adempiere/webui/panel/LoginPanel.java | 25 +++++++++++- .../theme/default/images/login-box-footer.png | Bin 1772 -> 1691 bytes .../theme/default/login-info.zul | 38 +++++++----------- .../theme/default/login-left.zul | 2 +- .../theme/default/login-links.zul | 8 ++-- .../theme/default/vendor-logo.zul | 11 ++++- 6 files changed, 54 insertions(+), 30 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java index 7f402e15be..46ee0356b8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java @@ -34,6 +34,7 @@ import java.util.logging.Level; import org.adempiere.webui.AdempiereIdGenerator; import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.apps.AEnv; +import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Combobox; import org.adempiere.webui.component.ConfirmPanel; import org.adempiere.webui.component.Label; @@ -47,6 +48,7 @@ import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.BrowserToken; import org.adempiere.webui.util.UserPreference; +import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.LoginWindow; import org.compiere.Adempiere; import org.compiere.model.MClient; @@ -236,8 +238,14 @@ public class LoginPanel extends Window implements EventListener div = new Div(); div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS); - ConfirmPanel pnlButtons = new ConfirmPanel(false); + ConfirmPanel pnlButtons = new ConfirmPanel(); pnlButtons.addActionListener(this); + + Button helpButton = pnlButtons.createButton(ConfirmPanel.A_HELP); + helpButton.addEventListener(Events.ON_CLICK, this); + helpButton.setSclass(ITheme.LOGIN_BUTTON_CLASS); + pnlButtons.addComponentsRight(helpButton); + LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons); pnlButtons.setWidth(null); pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS); @@ -372,6 +380,10 @@ public class LoginPanel extends Window implements EventListener { validateLogin(); } + else if (event.getTarget().getId().equals(ConfirmPanel.A_HELP)) + { + openLoginHelp(); + } else if (event.getName().equals(Events.ON_SELECT)) { if(eventComp.getId().equals(lstLanguage.getId())) { @@ -405,6 +417,17 @@ public class LoginPanel extends Window implements EventListener // } + private void openLoginHelp() { + String helpURL = MSysConfig.getValue("LOGIN_HELP_URL", "http://wiki.idempiere.org/wiki/Login_Help"); + try { + Executions.getCurrent().sendRedirect(helpURL, "_blank"); + } + catch (Exception e) { + String message = e.getMessage(); + FDialog.warn(0, this, "URLnotValid", message); + } + } + private void onUserIdChange(int AD_User_ID) { String userName = txtUserId.getValue(); if (userName != null && userName.length() > 0 && AD_User_ID < 0) diff --git a/org.adempiere.ui.zk/theme/default/images/login-box-footer.png b/org.adempiere.ui.zk/theme/default/images/login-box-footer.png index 6e24eb60f4707bb3cbf785267a7de594c16cd801..562a0fcc8c87866152a0b541a7952c5d7fdd6024 100644 GIT binary patch delta 1345 zcmV-H1-|<14Vw*+UJBd_3=|C+W26ksk!UA>1@=iqK~#9!?cL38+*BBV;m;FiLVtv! zF1mm_KrL$|7Tg*a!3uE=+yVl10qgbx0I5|*MO8XYrZe%34;xQ$9DBx|q-~}=k91@u zndDgU=GF0E7VSpW$RlDL5l0bmCnD}e#OD!l91#y9;=!XwkA8Ui^ywD?0KndO{P^)b zi)YWCeIF73M8vCVoJPbnBF-b?ZA2_0;vyoJ5m8p-lKiH2#vuU!`2V?)m^?l{_MZd* z*dwQ>r#JF008WlYxSL#NdN$LCME#@cyBT3G&TUhrz>6eGou|R ztq%YI_B$wdZoAQzKe}lGAqfDm{~;MIjh8xluy;)Mt=G~q007uqWi@VmWpYzMrpBZI z0DtVKuD0Q)FaEw^k0<)BmDqk$3G49R6mXU>Zj>&mkJ>^}0R8Z_1lUYkt z)&d<*;=JWY{GMW4|nM{6d zgk*hHavhWFYbUqf&AqMk>hX9G5r@?{s>Yp&xLa-SMa131!^7i;4RT!ZP&;&Krxs zo8m#_00199B!~PAlfecPlh6hPlh6hP8vp21iLmK~#9!?cGgo+h!iX;XfrtZqlGI zy2xVY27_eQ1-j_fdWf!yo}pJLW{}0qIypdRfD{%|6pmx7k}2_>4cVa?k|Jd_jnd}< zUdXaONSm7*wvq zuGgEdb^Sc`JEnei-}~O@`VB4XSbyWtcOTG2>@{V zAsHQwmwI||bWDz|*U~ls061A?HI6_H6EUK$g|QceVilz)8pCt`(K#l%O0tGufVztQWcsvy%V-rzlk|w`~RG zq+Q*!i4oZj$!$t$U6y(h0N_-VWf>`@bwm_BK{+}qhb|4&6_sT(BqO3IisHY!oxR-v ze*mXqx7$Tg6t5!Uwi?Z#>^r;rpi2YQAL^QwEF$9e?c29MY&M&X%>n>$8aA8F=FOWo z&m&?}#bgoPvy;6MIVL8%PQJMlk`b|4E|>qjy}iBJZnw4!0Kf;Xnw4C=e*OAijhJi) z<>-@e<^#*hT4UB2dG*<2mc`GbutJUh4#bU9|vg~hpp3i5qnXLr?@Bt}` zBCfBmi_6Q)@0ZKv^C~3km|VxZyS$s13W`HxGV6%SW=Q__o~x^?A5%)N@;v|he{Q!+ z5s_zE7G^2|0R9+dSw>M5adUHXyI!x?%jNRB<#PFtR!BByCF_{1kDc6mHut{LYsTX| zA|6!ZtQrp^;!*YZX+%7F@ZiDulP6EUdi?nDmwBH5HOsQIIP4za000~=rIgl1QT%j$ zef{r?i;L%FSzc8ExoX8^dpCC-f0TQ7bB~G1W>DtUSXASa#&}dcKCDI^oQo=`H z?#^lst%qq%0D%6O>pNlkos*`kQHSF?{=a*>9_`Bnb=?i;9r?%=?>eKq8H4rf^}=sE zLNbrL$6IC{u_zt^0H()f*G*=&Jwdr{JvL9enS2+Ve8LKs(La+|uXw$}f193=Y|lz& zdje8i0sssL-M(92H-oY{n#V}CW3r49w^AG%lc^PrQ7xz)nq_Nc^C~9it&p6J2uTqM z05Co(hi-wrYs6yFF}6J+IqKfr`NWkkdse)CLGyYhvb}42?5w1i1OPZJCfh+-Hezwx zF?Ox@j-HjA5|gP4ywr-yf36j-V{*19B)g(fL;?UzkIK{$m1T6#Qtn#6E2H~ln^8eI zHQt&LIE#0$JJ~m~=$?@@GYJ52ctj4xWLH%7jTCohBuCFo9ujR`cgAVQWi}9z*@R__ zN&tXyaW@o{sUsTu&e~2>R_s2pmJNhuUp!_Lmn|j%0H(!cbj0D%ZD_xLauD7}HsaCo zkpKYiKR8oQSPnhD_n3?kp_u&+%L4#lTv(Initially you can log into the system with the following users: - +
- - - - - + + - - - - - - - - -
Usage User +EMail Password
System Management -System -System +GardenAdmin +admin @ gardenworld.com +GardenAdmin
GardenUser +user @ gardenworld.com +GardenUser +
System Management or any role/company SuperUser +superuser @ idempiere.com System
Sample Client Administration -GardenAdmin -GardenAdmin +System +system @ idempiere.com +System
Sample Client User -GardenUser -GardenUser -
]]> - \ No newline at end of file + diff --git a/org.adempiere.ui.zk/theme/default/login-left.zul b/org.adempiere.ui.zk/theme/default/login-left.zul index 2f604cc016..787cda76e2 100644 --- a/org.adempiere.ui.zk/theme/default/login-left.zul +++ b/org.adempiere.ui.zk/theme/default/login-left.zul @@ -9,7 +9,7 @@ Copyright (C) 2009 Idalica Corporation
- +
diff --git a/org.adempiere.ui.zk/theme/default/login-links.zul b/org.adempiere.ui.zk/theme/default/login-links.zul index 51e8a63a9d..1668427d5f 100644 --- a/org.adempiere.ui.zk/theme/default/login-links.zul +++ b/org.adempiere.ui.zk/theme/default/login-links.zul @@ -15,7 +15,7 @@ Copyright (C) 2009 Idalica Corporation } - - + diff --git a/org.adempiere.ui.zk/theme/default/vendor-logo.zul b/org.adempiere.ui.zk/theme/default/vendor-logo.zul index bb6688bb03..dc8901e62d 100644 --- a/org.adempiere.ui.zk/theme/default/vendor-logo.zul +++ b/org.adempiere.ui.zk/theme/default/vendor-logo.zul @@ -14,7 +14,16 @@ Copyright (C) 2009 Idalica Corporation style="font-family:Arial,sans-serif; color:#578BB8; font-size:1em; font-weight: bold;" /> -
+
+ + + +
+
From e565badf79455ef5502882cb1e6da7dfbf31d634 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 12 Oct 2012 17:17:09 -0500 Subject: [PATCH 02/10] IDEMPIERE-421 NPE - Payment Info --- .../org/adempiere/webui/panel/InfoPanel.java | 11 ++++++-- .../webui/panel/InfoPaymentPanel.java | 28 +++++++++++++------ 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index 5e5162a59b..4f0d2834cc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -1093,6 +1093,9 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM contentPanel.setSelectedIndex(0); } } + else if (event.getName().equals(Events.ON_CHANGE)) + { + } //default else { @@ -1108,9 +1111,11 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM progressWindow.doHighlighted(); } - private void hideBusyDialog() { - progressWindow.dispose(); - progressWindow = null; + private void hideBusyDialog() { + if (progressWindow != null) { + progressWindow.dispose(); + progressWindow = null; + } } public void onQueryCallback() diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java index 5d56de8eca..1ed2444032 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java @@ -311,11 +311,17 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, if (fDateFrom.getValue() != null || fDateTo.getValue() != null) { - Date f = fDateFrom.getValue(); - Timestamp from = new Timestamp(f.getTime()); + Timestamp from = null; + if (fDateFrom.getValue() != null) { + Date f = fDateFrom.getValue(); + from = new Timestamp(f.getTime()); + } - Date t = fDateTo.getValue(); - Timestamp to = new Timestamp(t.getTime()); + Timestamp to = null; + if (fDateTo.getValue() != null) { + Date t = fDateTo.getValue(); + to = new Timestamp(t.getTime()); + } if (from == null && to != null) sql.append(" AND TRUNC(p.DateTrx) <= ?"); @@ -368,11 +374,17 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, if (fDateFrom.getValue() != null || fDateTo.getValue() != null) { - Date f = fDateFrom.getValue(); - Timestamp from = new Timestamp(f.getTime()); + Timestamp from = null; + if (fDateFrom.getValue() != null) { + Date f = fDateFrom.getValue(); + from = new Timestamp(f.getTime()); + } - Date t = fDateTo.getValue(); - Timestamp to = new Timestamp(t.getTime()); + Timestamp to = null; + if (fDateTo.getValue() != null) { + Date t = fDateTo.getValue(); + to = new Timestamp(t.getTime()); + } log.fine("Date From=" + from + ", To=" + to); From 655dec54b05a9f30bee53bd8ef5550a1ecbae792 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 12 Oct 2012 18:06:37 -0500 Subject: [PATCH 03/10] =?UTF-8?q?IDEMPIERE-22=20Import=20Inventory=20Costs?= =?UTF-8?q?=20not=20taking=20into=20account=20cost=20level=20/=20Thanks=20?= =?UTF-8?q?to=20David=20Pe=C3=B1uela?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/compiere/process/ImportInventory.java | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java b/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java index d1b86a13ad..a167e88939 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.Timestamp; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.compiere.model.MAcctSchema; import org.compiere.model.MAttributeSet; import org.compiere.model.MAttributeSetInstance; @@ -29,6 +30,7 @@ import org.compiere.model.MCost; import org.compiere.model.MInventory; import org.compiere.model.MInventoryLine; import org.compiere.model.MProduct; +import org.compiere.model.MProductCategoryAcct; import org.compiere.model.X_I_Inventory; import org.compiere.util.DB; import org.compiere.util.TimeUtil; @@ -356,12 +358,12 @@ public class ImportInventory extends SvrProcess x_isInternalUse = isInternalUse; noInsert++; } - + MProduct product = MProduct.get(getCtx(), imp.getM_Product_ID()); // Line int M_AttributeSetInstance_ID = 0; if ((imp.getLot() != null && imp.getLot().length() > 0) || (imp.getSerNo() != null && imp.getSerNo().length() > 0)) { - MProduct product = MProduct.get(getCtx(), imp.getM_Product_ID()); + if (product.isInstanceAttribute()) { MAttributeSet mas = product.getAttributeSet(); @@ -394,15 +396,28 @@ public class ImportInventory extends SvrProcess noInsertLine++; //@Trifon update Product cost record if Update costing is enabled if (p_UpdateCosting) { - MCost cost = MCost.get (MProduct.get(getCtx(), imp.getM_Product_ID()), /*M_AttributeSetInstance_ID*/ 0 - , acctSchema, p_AD_OrgTrx_ID, p_M_CostElement_ID, get_TrxName()); - cost.setCurrentCostPrice( imp.getCurrentCostPrice() ); - if (cost.save()) { - // nothing here. - } else { - log.log(Level.SEVERE, "Cost not saved!"); - break; + String costingLevel = null; + if(product.getM_Product_Category_ID() > 0){ + MProductCategoryAcct pca = MProductCategoryAcct.get(getCtx(), product.getM_Product_Category_ID(), p_C_AcctSchema_ID, get_TrxName()); + costingLevel = pca.getCostingLevel(); + if (costingLevel == null) { + costingLevel = acctSchema.getCostingLevel(); + } + } + + int costOrgID = p_AD_OrgTrx_ID; + int costASI = line.getM_AttributeSetInstance_ID(); + if (MAcctSchema.COSTINGLEVEL_Client.equals(costingLevel)){ + costOrgID = 0; + costASI = 0; + } else if (MAcctSchema.COSTINGLEVEL_Organization.equals(costingLevel)) { + costASI = 0; + } + MCost cost = MCost.get (MProduct.get(getCtx(), imp.getM_Product_ID()), costASI + , acctSchema, costOrgID, p_M_CostElement_ID, get_TrxName()); + cost.setCurrentCostPrice( imp.getCurrentCostPrice() ); + cost.saveEx(); } } } @@ -412,7 +427,7 @@ public class ImportInventory extends SvrProcess } catch (Exception e) { - log.log(Level.SEVERE, sql.toString(), e); + throw new AdempiereException(e); } // Set Error to indicator to not imported From ff9384f32e2b058bf5e94ff6b94a70720edbe354 Mon Sep 17 00:00:00 2001 From: Richard Morales Date: Fri, 12 Oct 2012 18:10:46 -0500 Subject: [PATCH 04/10] IDEMPIERE-308 Performance: Replace with StringBuilder / some classes revisited to make them safer against NPE --- .../org/adempiere/process/ImmediateBankTransfer.java | 2 +- .../src/org/compiere/process/ImportOrder.java | 2 +- .../org/compiere/process/ProjectPhaseGenOrder.java | 4 ++-- .../org/compiere/process/RequestEMailProcessor.java | 2 +- .../src/org/adempiere/model/PromotionRule.java | 2 +- .../src/org/compiere/model/MDistribution.java | 12 ++++++------ 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java b/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java index 6000dc6a42..24041ec454 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java @@ -249,7 +249,7 @@ public class ImmediateBankTransfer extends SvrProcess MCash cash = createCash(); MCashLine cashLines[]= createCashLines(cash); - StringBuilder processMsg = new StringBuilder(cash.getDocumentNo()); + StringBuilder processMsg = new StringBuilder().append(cash.getDocumentNo()); cash.setDocAction(p_docAction); if (!cash.processIt(p_docAction)) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java index 06d12d54f5..08ecf97f96 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java @@ -90,7 +90,7 @@ public class ImportOrder extends SvrProcess { StringBuilder sql = null; int no = 0; - String clientCheck = " AND AD_Client_ID=" + m_AD_Client_ID; + StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(m_AD_Client_ID); // **** Prepare **** diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java b/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java index 5c6cd21aa3..393641b9a8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java @@ -77,7 +77,7 @@ public class ProjectPhaseGenOrder extends SvrProcess { MOrderLine ol = new MOrderLine(order); ol.setLine(fromPhase.getSeqNo()); - StringBuilder sb = new StringBuilder (fromPhase.getName()); + StringBuilder sb = new StringBuilder ().append(fromPhase.getName()); if (fromPhase.getDescription() != null && fromPhase.getDescription().length() > 0) sb.append(" - ").append(fromPhase.getDescription()); ol.setDescription(sb.toString()); @@ -122,7 +122,7 @@ public class ProjectPhaseGenOrder extends SvrProcess { MOrderLine ol = new MOrderLine(order); ol.setLine(tasks[i].getSeqNo()); - StringBuilder sb = new StringBuilder (tasks[i].getName()); + StringBuilder sb = new StringBuilder ().append(tasks[i].getName()); if (tasks[i].getDescription() != null && tasks[i].getDescription().length() > 0) sb.append(" - ").append(tasks[i].getDescription()); ol.setDescription(sb.toString()); diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java b/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java index 7a8afb9cc9..854ff8a052 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java @@ -746,7 +746,7 @@ public class RequestEMailProcessor extends SvrProcess String deliveryMessage = null; if (content instanceof InputStream) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); InputStream is = (InputStream)content; int c; while ((c = is.read()) != -1) diff --git a/org.adempiere.base/src/org/adempiere/model/PromotionRule.java b/org.adempiere.base/src/org/adempiere/model/PromotionRule.java index f8bb5085a1..bbb505b252 100644 --- a/org.adempiere.base/src/org/adempiere/model/PromotionRule.java +++ b/org.adempiere.base/src/org/adempiere/model/PromotionRule.java @@ -337,7 +337,7 @@ public class PromotionRule { //optional promotion code filter String promotionCode = (String)order.get_Value("PromotionCode"); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append(select) .append(" WHERE") .append(" (" + bpFilter + ")") diff --git a/org.adempiere.base/src/org/compiere/model/MDistribution.java b/org.adempiere.base/src/org/compiere/model/MDistribution.java index a63fd5c622..f479394dd2 100644 --- a/org.adempiere.base/src/org/compiere/model/MDistribution.java +++ b/org.adempiere.base/src/org/compiere/model/MDistribution.java @@ -270,12 +270,12 @@ public class MDistribution extends X_GL_Distribution */ public String validate() { - StringBuilder retValue = null; + String retValue = null; getLines(true); if (m_lines.length == 0) - retValue = new StringBuilder("@NoLines@"); + retValue = "@NoLines@"; else if (getPercentTotal().compareTo(Env.ONEHUNDRED) != 0) - retValue = new StringBuilder("@PercentTotal@ <> 100"); + retValue = "@PercentTotal@ <> 100"; else { // More then one line with 0 @@ -286,8 +286,8 @@ public class MDistribution extends X_GL_Distribution { if (lineFound >= 0 && m_lines[i].getPercent().compareTo(Env.ZERO) == 0) { - retValue = new StringBuilder("@Line@ ").append(lineFound) - .append(" + ").append(m_lines[i].getLine()).append(": == 0"); + retValue = "@Line@ " + lineFound + + " + " + m_lines[i].getLine() + ": == 0"; break; } lineFound = m_lines[i].getLine(); @@ -296,7 +296,7 @@ public class MDistribution extends X_GL_Distribution } setIsValid (retValue == null); - return retValue.toString(); + return retValue; } // validate From d1df4c45c8d5bb2ed83b2c3033d6ce1b952c0133 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 12 Oct 2012 18:25:55 -0500 Subject: [PATCH 05/10] IDEMPIERE-455 Discover and fix FindBugs problems / Thanks to Richard Morales --- .../org/adempiere/exceptions/TaxNotFoundException.java | 2 +- org.adempiere.base/src/org/compiere/model/MAsset.java | 6 +++--- org.adempiere.base/src/org/compiere/wf/MWFProcess.java | 6 +++--- .../src/org/adempiere/process/rpl/exp/ExportHelper.java | 2 +- .../src/org/compiere/apps/search/InfoProduct.java | 2 +- .../src/org/adempiere/webui/panel/InfoAssetPanel.java | 4 ++-- .../src/org/adempiere/webui/panel/InfoCashLinePanel.java | 4 ++-- .../src/org/adempiere/webui/panel/InfoInOutPanel.java | 4 ++-- .../src/org/adempiere/webui/panel/InfoPaymentPanel.java | 8 ++++---- .../src/org/adempiere/webui/window/FindWindow.java | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/exceptions/TaxNotFoundException.java b/org.adempiere.base/src/org/adempiere/exceptions/TaxNotFoundException.java index 036d68c728..4cdeb8551e 100644 --- a/org.adempiere.base/src/org/adempiere/exceptions/TaxNotFoundException.java +++ b/org.adempiere.base/src/org/adempiere/exceptions/TaxNotFoundException.java @@ -92,7 +92,7 @@ public class TaxNotFoundException extends AdempiereException return "?"; } MLocation loc = MLocation.get(Env.getCtx(), C_Location_ID, null); - if (loc == null | loc.get_ID() != C_Location_ID) + if (loc == null || loc.get_ID() != C_Location_ID) { return "?"; } diff --git a/org.adempiere.base/src/org/compiere/model/MAsset.java b/org.adempiere.base/src/org/compiere/model/MAsset.java index 439c158f47..8ab6a316d4 100644 --- a/org.adempiere.base/src/org/compiere/model/MAsset.java +++ b/org.adempiere.base/src/org/compiere/model/MAsset.java @@ -442,7 +442,7 @@ public class MAsset extends X_A_Asset MAssetGroupAcct assetgrpacct = new MAssetGroupAcct (getCtx(), rs, get_TrxName()); MAssetAcct assetacct = new MAssetAcct (getCtx(), 0, get_TrxName()); isdepreciate = assetgrpacct.isProcessing(); - if (isDepreciated()== true | isdepreciate == true) + if (isDepreciated()== true || isdepreciate == true) { assetacct.setPostingType(assetgrpacct.getPostingType()); assetacct.setA_Split_Percent(assetgrpacct.getA_Split_Percent()); @@ -454,7 +454,7 @@ public class MAsset extends X_A_Asset assetacct.setA_Period_Start(1); - if (getUseLifeMonths() == 0 & getUseLifeYears() == 0){ + if (getUseLifeMonths() == 0 && getUseLifeYears() == 0){ assetacct.setA_Period_End(assetgrpacct.getUseLifeMonths()); asset.setUseLifeYears(assetgrpacct.getUseLifeYears()); asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths()); @@ -541,7 +541,7 @@ public class MAsset extends X_A_Asset if (DB.getSQLValue(get_TrxName(), sql2, asset.getA_Asset_ID(),assetgrpacct.getPostingType())== 0) { - if (isDepreciated()== true | isdepreciate == true) + if (isDepreciated()== true || isdepreciate == true) { X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), 0, get_TrxName()); assetwk.setA_Asset_ID(p_A_Asset_ID); diff --git a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java index 500ffe95ac..ced3fb7862 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java @@ -291,13 +291,13 @@ public class MWFProcess extends X_AD_WF_Process // if (closedState == null) closedState = activityWFState; - else if (!closedState.equals(activityState)) + else if (!closedState.equals(activityState.getState())) { // Overwrite if terminated - if (WFSTATE_Terminated.equals(activityState)) + if (activityState.isTerminated()) closedState = activityWFState; // Overwrite if activity aborted and no other terminated - else if (WFSTATE_Aborted.equals(activityState) && !WFSTATE_Terminated.equals(closedState)) + else if (activityState.isAborted() && !WFSTATE_Terminated.equals(closedState)) closedState = activityWFState; } } diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java index 63a3223652..8ba36bd25b 100644 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java @@ -420,7 +420,7 @@ public class ExportHelper { whereClause.append(" AND ").append(embeddedFormat.getWhereClause()); } String columnName = ""; - if(formatLine.getAD_Reference_ID()== DisplayType.Table | formatLine.getAD_Reference_ID()==DisplayType.Search) + if(formatLine.getAD_Reference_ID()== DisplayType.Table || formatLine.getAD_Reference_ID()==DisplayType.Search) { MColumn column = MColumn.get(masterPO.getCtx(), formatLine.getAD_Column_ID()); columnName = column.getColumnName(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java index 9a22c64ccd..4ac9588740 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java @@ -1206,7 +1206,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener { CTabbedPane tab = (CTabbedPane) e.getSource(); - if(tab.getSelectedIndex() == 4 & warehouseTbl.getRowCount() > 0) + if(tab.getSelectedIndex() == 4 && warehouseTbl.getRowCount() > 0) { // If no warehouse row is selected in the warehouse tab, use the first warehouse // row to prevent array index out of bounds. BF 3051361 diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java index 9f69bd2e19..bd36b4ced6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java @@ -281,7 +281,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev Integer C_BPartner_ID = null; - if (fBPartner_ID.getDisplay() != "") + if (!"".equals(fBPartner_ID.getDisplay())) C_BPartner_ID = (Integer)fBPartner_ID.getValue(); if (C_BPartner_ID != null) @@ -291,7 +291,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev Integer M_Product_ID = null; - if (fProduct_ID.getDisplay() != "") + if (!"".equals(fProduct_ID.getDisplay())) M_Product_ID = (Integer)fProduct_ID.getValue(); if (M_Product_ID != null) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java index 0aa204d54a..9729962f57 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java @@ -318,10 +318,10 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener, if (fName.getText().length() > 0) sql.append(" AND UPPER(c.Name) LIKE ?"); - if (fCashBook_ID.getDisplay() != "") + if (!"".equals(fCashBook_ID.getDisplay())) sql.append(" AND c.C_CashBook_ID=?"); - if (fInvoice_ID.getDisplay() != "") + if (!"".equals(fInvoice_ID.getDisplay())) sql.append(" AND cl.C_Invoice_ID=?"); if (fDateFrom.getValue() != null || fDateTo.getValue() != null) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java index 30e922af02..7ad87867ab 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java @@ -299,7 +299,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev if (fPOReference.getText().length() > 0) sql.append(" AND UPPER(i.POReference) LIKE ?"); - if (fBPartner_ID.getDisplay() != "") + if (!"".equals(fBPartner_ID.getDisplay())) sql.append(" AND i.C_BPartner_ID=?"); if (fDateFrom.getValue() != null || fDateTo.getValue() != null) @@ -343,7 +343,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev if (fPOReference.getText().length() > 0) pstmt.setString(index++, getSQLText(fPOReference)); - if (fBPartner_ID.getDisplay() != "") + if (!"".equals(fBPartner_ID.getDisplay())) { Integer bp = (Integer)fBPartner_ID.getValue(); pstmt.setInt(index++, bp.intValue()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java index 1ed2444032..267d29701e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java @@ -306,7 +306,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, if (fDocumentNo.getText().length() > 0) sql.append(" AND UPPER(p.DocumentNo) LIKE ?"); - if (fBPartner_ID.getDisplay() != "") + if (!"".equals(fBPartner_ID.getDisplay())) sql.append(" AND p.C_BPartner_ID=?"); if (fDateFrom.getValue() != null || fDateTo.getValue() != null) @@ -331,7 +331,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, sql.append(" AND TRUNC(p.DateTrx) BETWEEN ? AND ?"); } - if (fAmtFrom.getText() != "" || fAmtTo.getText() != "") + if (!"".equals(fAmtFrom.getText()) || !"".equals(fAmtTo.getText())) { BigDecimal from = new BigDecimal(fAmtFrom.getValue()); BigDecimal to = new BigDecimal(fAmtTo.getValue()); @@ -365,7 +365,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, if (fDocumentNo.getText().length() > 0) pstmt.setString(index++, getSQLText(fDocumentNo)); - if (fBPartner_ID.getDisplay() != "") + if (!"".equals(fBPartner_ID.getDisplay())) { Integer bp = (Integer)fBPartner_ID.getValue(); pstmt.setInt(index++, bp.intValue()); @@ -399,7 +399,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, } } - if (fAmtFrom.getText() != "" || fAmtTo.getText() != "") + if (!"".equals(fAmtFrom.getText()) || !"".equals(fAmtTo.getText())) { BigDecimal from = new BigDecimal(fAmtFrom.getValue()); BigDecimal to = new BigDecimal(fAmtTo.getValue()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index a381614b41..2f33c99abd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -1385,7 +1385,7 @@ public class FindWindow extends Window implements EventListener, ValueCha m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2, infoName, infoDisplay, infoDisplay_to, and, openBrackets); } - else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].equals(op)) { + else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator)) { if (!(parsedValue instanceof Integer)) { continue; } From 3d25237fb645c928b470df8c88446f16aaa0fe7a Mon Sep 17 00:00:00 2001 From: Richard Morales Date: Tue, 16 Oct 2012 15:41:49 -0500 Subject: [PATCH 06/10] IDEMPIERE-455 Discover and fix FindBugs problems / RV_RETURN_VALUE_IGNORED http://findbugs.sourceforge.net/bugDescriptions.html#RV_RETURN_VALUE_IGNORED --- org.adempiere.base/src/org/compiere/db/CreateAdempiere.java | 2 +- org.adempiere.base/src/org/compiere/model/GridTabVO.java | 4 ++-- org.adempiere.base/src/org/globalqss/process/CashFlow.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java b/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java index fa1b96dffe..a74c73d929 100644 --- a/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java +++ b/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java @@ -417,7 +417,7 @@ public class CreateAdempiere if (def != null) { //jz: replace '' to \', otherwise exception - def.replaceAll("''", "\\'"); + def = def.replaceAll("''", "\\'"); sb.append(" DEFAULT ").append(def); } // Null diff --git a/org.adempiere.base/src/org/compiere/model/GridTabVO.java b/org.adempiere.base/src/org/compiere/model/GridTabVO.java index 8b6528c55d..5ccb0e36ca 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTabVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridTabVO.java @@ -214,8 +214,8 @@ public class GridTabVO implements Evaluatee, Serializable if (vo.WhereClause == null) vo.WhereClause = ""; //jz col=null not good for Derby - if (vo.WhereClause.indexOf("=null")>0) - vo.WhereClause.replaceAll("=null", " IS NULL "); + if (vo.WhereClause.indexOf("=null")>0) + vo.WhereClause = vo.WhereClause.replaceAll("=null", " IS NULL "); // Where Clauses should be surrounded by parenthesis - teo_sarca, BF [ 1982327 ] if (vo.WhereClause.trim().length() > 0) { vo.WhereClause = "("+vo.WhereClause+")"; diff --git a/org.adempiere.base/src/org/globalqss/process/CashFlow.java b/org.adempiere.base/src/org/globalqss/process/CashFlow.java index d107b980bd..98a763ffb4 100644 --- a/org.adempiere.base/src/org/globalqss/process/CashFlow.java +++ b/org.adempiere.base/src/org/globalqss/process/CashFlow.java @@ -225,7 +225,7 @@ public class CashFlow extends SvrProcess { open = open.subtract(paid); } if (open.scale() > curr.getStdPrecision()) - open.setScale(curr.getStdPrecision(), BigDecimal.ROUND_HALF_UP); + open = open.setScale(curr.getStdPrecision(), BigDecimal.ROUND_HALF_UP); BigDecimal invoiced = order.getGrandTotal().subtract(open); if (isPaySchedule) { MOrderPaySchedule[] schedule = MOrderPaySchedule.getOrderPaySchedule(getCtx(), order_id, 0, get_TrxName()); From fff089eb585c583437a64700345b1887c58951be Mon Sep 17 00:00:00 2001 From: Richard Morales Date: Tue, 16 Oct 2012 17:41:44 -0500 Subject: [PATCH 07/10] IDEMPIERE-455 Discover and fix FindBugs problems / DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE http://findbugs.sourceforge.net/bugDescriptions.html#DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE --- .../org/compiere/acct/Doc_AllocationHdr.java | 2 +- .../src/org/compiere/model/MBPGroup.java | 2 +- .../org/compiere/model/MUOMConversion.java | 114 +++++++++--------- 3 files changed, 59 insertions(+), 59 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java index ff23a40b62..0b4795c0df 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java @@ -70,7 +70,7 @@ public class Doc_AllocationHdr extends Doc } // Doc_Allocation /** Tolerance G&L */ - private static final BigDecimal TOLERANCE = new BigDecimal (0.02); + private static final BigDecimal TOLERANCE = BigDecimal.valueOf(0.02); /** Facts */ private ArrayList m_facts = null; diff --git a/org.adempiere.base/src/org/compiere/model/MBPGroup.java b/org.adempiere.base/src/org/compiere/model/MBPGroup.java index f95ce75d06..c2f1e68556 100644 --- a/org.adempiere.base/src/org/compiere/model/MBPGroup.java +++ b/org.adempiere.base/src/org/compiere/model/MBPGroup.java @@ -217,7 +217,7 @@ public class MBPGroup extends X_C_BP_Group BigDecimal bd = super.getCreditWatchPercent(); if (bd.compareTo(Env.ZERO) != 0) return bd.divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP); - return new BigDecimal(0.90); + return BigDecimal.valueOf(0.90); } // getCreditWatchRatio diff --git a/org.adempiere.base/src/org/compiere/model/MUOMConversion.java b/org.adempiere.base/src/org/compiere/model/MUOMConversion.java index 5e683104a7..0829237a3c 100644 --- a/org.adempiere.base/src/org/compiere/model/MUOMConversion.java +++ b/org.adempiere.base/src/org/compiere/model/MUOMConversion.java @@ -229,145 +229,145 @@ public class MUOMConversion extends X_C_UOM_Conversion if (from.isMinute()) { if (to.isHour()) - return new BigDecimal(1.0/60.0); + return BigDecimal.valueOf(1.0/60.0); if (to.isDay()) - return new BigDecimal(1.0/1440.0); // 24 * 60 + return BigDecimal.valueOf(1.0/1440.0); // 24 * 60 if (to.isWorkDay()) - return new BigDecimal(1.0/480.0); // 8 * 60 + return BigDecimal.valueOf(1.0/480.0); // 8 * 60 if (to.isWeek()) - return new BigDecimal(1.0/10080.0); // 7 * 24 * 60 + return BigDecimal.valueOf(1.0/10080.0); // 7 * 24 * 60 if (to.isMonth()) - return new BigDecimal(1.0/43200.0); // 30 * 24 * 60 + return BigDecimal.valueOf(1.0/43200.0); // 30 * 24 * 60 if (to.isWorkMonth()) - return new BigDecimal(1.0/9600.0); // 4 * 5 * 8 * 60 + return BigDecimal.valueOf(1.0/9600.0); // 4 * 5 * 8 * 60 if (to.isYear()) - return new BigDecimal(1.0/525600.0); // 365 * 24 * 60 + return BigDecimal.valueOf(1.0/525600.0); // 365 * 24 * 60 } // Time - Hour if (from.isHour()) { if (to.isMinute()) - return new BigDecimal(60.0); + return BigDecimal.valueOf(60.0); if (to.isDay()) - return new BigDecimal(1.0/24.0); + return BigDecimal.valueOf(1.0/24.0); if (to.isWorkDay()) - return new BigDecimal(1.0/8.0); + return BigDecimal.valueOf(1.0/8.0); if (to.isWeek()) - return new BigDecimal(1.0/168.0); // 7 * 24 + return BigDecimal.valueOf(1.0/168.0); // 7 * 24 if (to.isMonth()) - return new BigDecimal(1.0/720.0); // 30 * 24 + return BigDecimal.valueOf(1.0/720.0); // 30 * 24 if (to.isWorkMonth()) - return new BigDecimal(1.0/160.0); // 4 * 5 * 8 + return BigDecimal.valueOf(1.0/160.0); // 4 * 5 * 8 if (to.isYear()) - return new BigDecimal(1.0/8760.0); // 365 * 24 + return BigDecimal.valueOf(1.0/8760.0); // 365 * 24 } // Time - Day if (from.isDay()) { if (to.isMinute()) - return new BigDecimal(1440.0); // 24 * 60 + return BigDecimal.valueOf(1440.0); // 24 * 60 if (to.isHour()) - return new BigDecimal(24.0); + return BigDecimal.valueOf(24.0); if (to.isWorkDay()) - return new BigDecimal(3.0); // 24 / 8 + return BigDecimal.valueOf(3.0); // 24 / 8 if (to.isWeek()) - return new BigDecimal(1.0/7.0); // 7 + return BigDecimal.valueOf(1.0/7.0); // 7 if (to.isMonth()) - return new BigDecimal(1.0/30.0); // 30 + return BigDecimal.valueOf(1.0/30.0); // 30 if (to.isWorkMonth()) - return new BigDecimal(1.0/20.0); // 4 * 5 + return BigDecimal.valueOf(1.0/20.0); // 4 * 5 if (to.isYear()) - return new BigDecimal(1.0/365.0); // 365 + return BigDecimal.valueOf(1.0/365.0); // 365 } // Time - WorkDay if (from.isWorkDay()) { if (to.isMinute()) - return new BigDecimal(480.0); // 8 * 60 + return BigDecimal.valueOf(480.0); // 8 * 60 if (to.isHour()) - return new BigDecimal(8.0); // 8 + return BigDecimal.valueOf(8.0); // 8 if (to.isDay()) - return new BigDecimal(1.0/3.0); // 24 / 8 + return BigDecimal.valueOf(1.0/3.0); // 24 / 8 if (to.isWeek()) - return new BigDecimal(1.0/5); // 5 + return BigDecimal.valueOf(1.0/5); // 5 if (to.isMonth()) - return new BigDecimal(1.0/20.0); // 4 * 5 + return BigDecimal.valueOf(1.0/20.0); // 4 * 5 if (to.isWorkMonth()) - return new BigDecimal(1.0/20.0); // 4 * 5 + return BigDecimal.valueOf(1.0/20.0); // 4 * 5 if (to.isYear()) - return new BigDecimal(1.0/240.0); // 4 * 5 * 12 + return BigDecimal.valueOf(1.0/240.0); // 4 * 5 * 12 } // Time - Week if (from.isWeek()) { if (to.isMinute()) - return new BigDecimal(10080.0); // 7 * 24 * 60 + return BigDecimal.valueOf(10080.0); // 7 * 24 * 60 if (to.isHour()) - return new BigDecimal(168.0); // 7 * 24 + return BigDecimal.valueOf(168.0); // 7 * 24 if (to.isDay()) - return new BigDecimal(7.0); + return BigDecimal.valueOf(7.0); if (to.isWorkDay()) - return new BigDecimal(5.0); + return BigDecimal.valueOf(5.0); if (to.isMonth()) - return new BigDecimal(1.0/4.0); // 4 + return BigDecimal.valueOf(1.0/4.0); // 4 if (to.isWorkMonth()) - return new BigDecimal(1.0/4.0); // 4 + return BigDecimal.valueOf(1.0/4.0); // 4 if (to.isYear()) - return new BigDecimal(1.0/50.0); // 50 + return BigDecimal.valueOf(1.0/50.0); // 50 } // Time - Month if (from.isMonth()) { if (to.isMinute()) - return new BigDecimal(43200.0); // 30 * 24 * 60 + return BigDecimal.valueOf(43200.0); // 30 * 24 * 60 if (to.isHour()) - return new BigDecimal(720.0); // 30 * 24 + return BigDecimal.valueOf(720.0); // 30 * 24 if (to.isDay()) - return new BigDecimal(30.0); // 30 + return BigDecimal.valueOf(30.0); // 30 if (to.isWorkDay()) - return new BigDecimal(20.0); // 4 * 5 + return BigDecimal.valueOf(20.0); // 4 * 5 if (to.isWeek()) - return new BigDecimal(4.0); // 4 + return BigDecimal.valueOf(4.0); // 4 if (to.isWorkMonth()) - return new BigDecimal(1.5); // 30 / 20 + return BigDecimal.valueOf(1.5); // 30 / 20 if (to.isYear()) - return new BigDecimal(1.0/12.0); // 12 + return BigDecimal.valueOf(1.0/12.0); // 12 } // Time - WorkMonth if (from.isWorkMonth()) { if (to.isMinute()) - return new BigDecimal(9600.0); // 4 * 5 * 8 * 60 + return BigDecimal.valueOf(9600.0); // 4 * 5 * 8 * 60 if (to.isHour()) - return new BigDecimal(160.0); // 4 * 5 * 8 + return BigDecimal.valueOf(160.0); // 4 * 5 * 8 if (to.isDay()) - return new BigDecimal(20.0); // 4 * 5 + return BigDecimal.valueOf(20.0); // 4 * 5 if (to.isWorkDay()) - return new BigDecimal(20.0); // 4 * 5 + return BigDecimal.valueOf(20.0); // 4 * 5 if (to.isWeek()) - return new BigDecimal(4.0); // 4 + return BigDecimal.valueOf(4.0); // 4 if (to.isMonth()) - return new BigDecimal(20.0/30.0); // 20 / 30 + return BigDecimal.valueOf(20.0/30.0); // 20 / 30 if (to.isYear()) - return new BigDecimal(1.0/12.0); // 12 + return BigDecimal.valueOf(1.0/12.0); // 12 } // Time - Year if (from.isYear()) { if (to.isMinute()) - return new BigDecimal(518400.0); // 12 * 30 * 24 * 60 + return BigDecimal.valueOf(518400.0); // 12 * 30 * 24 * 60 if (to.isHour()) - return new BigDecimal(8640.0); // 12 * 30 * 24 + return BigDecimal.valueOf(8640.0); // 12 * 30 * 24 if (to.isDay()) - return new BigDecimal(365.0); // 365 + return BigDecimal.valueOf(365.0); // 365 if (to.isWorkDay()) - return new BigDecimal(240.0); // 12 * 4 * 5 + return BigDecimal.valueOf(240.0); // 12 * 4 * 5 if (to.isWeek()) - return new BigDecimal(50.0); // 52 + return BigDecimal.valueOf(50.0); // 52 if (to.isMonth()) - return new BigDecimal(12.0); // 12 + return BigDecimal.valueOf(12.0); // 12 if (to.isWorkMonth()) - return new BigDecimal(12.0); // 12 + return BigDecimal.valueOf(12.0); // 12 } // return null; @@ -620,7 +620,7 @@ public class MUOMConversion extends X_C_UOM_Conversion /** Static Logger */ private static final CLogger s_log = CLogger.getCLogger(MUOMConversion.class); /** Indicator for Rate */ - private static final BigDecimal GETRATE = new BigDecimal(123.456); + private static final BigDecimal GETRATE = BigDecimal.valueOf(123.456); /** Conversion Map: Key=Point(from,to) Value=BigDecimal */ private static CCache s_conversions = null; /** Product Conversion Map */ From e1778c15018e386918bdb9910ff10dab8a8403a7 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 19 Oct 2012 16:35:15 +0800 Subject: [PATCH 08/10] IDEMPIERE-392 Redesign payment button --- .../oracle/940_IDEMPIERE-392.sql | 62 ++++++ .../postgresql/940_IDEMPIERE-392.sql | 62 ++++++ .../src/org/compiere/model/MPayment.java | 3 + .../org/compiere/model/MPaymentProcessor.java | 2 +- .../org/compiere/grid/VPaymentFormCash.java | 2 +- .../org/compiere/grid/VPaymentFormCheck.java | 59 ++++- .../compiere/grid/VPaymentFormCreditCard.java | 64 +++++- .../org/compiere/grid/VPaymentFormDirect.java | 141 ++++++++++++ .../grid/VPaymentFormDirectDebit.java | 6 +- .../grid/VPaymentFormDirectDeposit.java | 119 +--------- .../compiere/grid/VPaymentFormFactory.java | 15 +- .../webui/apps/form/WPaymentFormCash.java | 2 +- .../webui/apps/form/WPaymentFormCheck.java | 97 ++++++--- .../apps/form/WPaymentFormCreditCard.java | 81 +++++-- .../webui/apps/form/WPaymentFormDirect.java | 178 +++++++++++++++ .../apps/form/WPaymentFormDirectDebit.java | 4 +- .../apps/form/WPaymentFormDirectDeposit.java | 144 +------------ .../webui/apps/form/WPaymentFormFactory.java | 22 +- .../webui/apps/form/WPaymentFormWindow.java | 3 + .../theme/default/css/theme.css.dsp | 4 +- .../src/org/compiere/grid/IPaymentForm.java | 8 + .../src/org/compiere/grid/PaymentForm.java | 60 +++++- .../org/compiere/grid/PaymentFormCash.java | 21 +- .../org/compiere/grid/PaymentFormCheck.java | 33 ++- .../compiere/grid/PaymentFormCreditCard.java | 47 ++-- .../org/compiere/grid/PaymentFormDirect.java | 204 ++++++++++++++++++ .../compiere/grid/PaymentFormDirectDebit.java | 12 -- .../grid/PaymentFormDirectDeposit.java | 125 ----------- .../compiere/grid/PaymentFormMixedPOS.java | 2 - .../compiere/grid/PaymentFormOnCredit.java | 2 - 30 files changed, 1073 insertions(+), 511 deletions(-) create mode 100644 migration/360lts-release/oracle/940_IDEMPIERE-392.sql create mode 100644 migration/360lts-release/postgresql/940_IDEMPIERE-392.sql create mode 100644 org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java create mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java create mode 100644 org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java delete mode 100644 org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDebit.java delete mode 100644 org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDeposit.java diff --git a/migration/360lts-release/oracle/940_IDEMPIERE-392.sql b/migration/360lts-release/oracle/940_IDEMPIERE-392.sql new file mode 100644 index 0000000000..aacb91afde --- /dev/null +++ b/migration/360lts-release/oracle/940_IDEMPIERE-392.sql @@ -0,0 +1,62 @@ +-- Oct 19, 2012 4:08:01 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create payment',200077,'D','da079a31-b0e8-4e39-8d06-5861235240cd','PaymentNotCreated','Y',TO_DATE('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:08:05 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200077 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:08:20 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to cancel payment',200078,'D','147fef6f-7a60-4579-9b20-2bcb1836cbbb','PaymentNotCancelled','Y',TO_DATE('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:08:20 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200078 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:09:32 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200079,'D','2a395bb4-e2cc-4c5c-ad6c-e5d96bb8b16e','CashNotCancelled','Y',TO_DATE('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:09:32 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200079 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:09:57 PM SGT +-- IDEMPIERE-392 Redesign payment button +UPDATE AD_Message SET MsgText='Failed to cancel cash',Updated=TO_DATE('2012-10-19 16:09:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200079 +; + +-- Oct 19, 2012 4:09:57 PM SGT +-- IDEMPIERE-392 Redesign payment button +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200079 +; + +-- Oct 19, 2012 4:10:18 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200080,'D','9a1b19b9-03a4-4a94-a4be-3c330e6ef800','CashNotCreated','Y',TO_DATE('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:10:18 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200080 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:10:55 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Card not processed',200081,'D','743abddc-b21d-4317-b959-9e7dba185313','CardNotProcessed','Y',TO_DATE('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:10:55 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200081 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('940_IDEMPIERE-392.sql') FROM dual +; \ No newline at end of file diff --git a/migration/360lts-release/postgresql/940_IDEMPIERE-392.sql b/migration/360lts-release/postgresql/940_IDEMPIERE-392.sql new file mode 100644 index 0000000000..5b85eab4b2 --- /dev/null +++ b/migration/360lts-release/postgresql/940_IDEMPIERE-392.sql @@ -0,0 +1,62 @@ +-- Oct 19, 2012 4:08:01 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create payment',200077,'D','da079a31-b0e8-4e39-8d06-5861235240cd','PaymentNotCreated','Y',TO_TIMESTAMP('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:08:05 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200077 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:08:20 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to cancel payment',200078,'D','147fef6f-7a60-4579-9b20-2bcb1836cbbb','PaymentNotCancelled','Y',TO_TIMESTAMP('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:08:20 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200078 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:09:32 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200079,'D','2a395bb4-e2cc-4c5c-ad6c-e5d96bb8b16e','CashNotCancelled','Y',TO_TIMESTAMP('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:09:32 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200079 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:09:57 PM SGT +-- IDEMPIERE-392 Redesign payment button +UPDATE AD_Message SET MsgText='Failed to cancel cash',Updated=TO_TIMESTAMP('2012-10-19 16:09:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200079 +; + +-- Oct 19, 2012 4:09:57 PM SGT +-- IDEMPIERE-392 Redesign payment button +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200079 +; + +-- Oct 19, 2012 4:10:18 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200080,'D','9a1b19b9-03a4-4a94-a4be-3c330e6ef800','CashNotCreated','Y',TO_TIMESTAMP('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:10:18 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200080 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:10:55 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Card not processed',200081,'D','743abddc-b21d-4317-b959-9e7dba185313','CardNotProcessed','Y',TO_TIMESTAMP('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:10:55 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200081 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('940_IDEMPIERE-392.sql') FROM dual +; \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index c857774075..899b5794b3 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -850,7 +850,10 @@ public final class MPayment extends X_C_Payment } } if (m_mBankAccountProcessor != null) + { setC_BankAccount_ID (m_mBankAccountProcessor.getC_BankAccount_ID()); + setC_PaymentProcessor_ID (m_mBankAccountProcessor.getC_PaymentProcessor_ID()); + } // return m_mBankAccountProcessor != null; } // setPaymentProcessor diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentProcessor.java b/org.adempiere.base/src/org/compiere/model/MPaymentProcessor.java index 53c7368bcd..d0129619dd 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentProcessor.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentProcessor.java @@ -61,7 +61,7 @@ public class MPaymentProcessor extends X_C_PaymentProcessor * @param trxName transaction * @return Array of BankAccount[0] & PaymentProcessor[1] or null */ - protected static MBankAccountProcessor[] find (Properties ctx, + public static MBankAccountProcessor[] find (Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal Amt, String trxName) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java index 92d1d9cae3..33132e30e1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java @@ -209,7 +209,7 @@ public class VPaymentFormCash extends PaymentFormCash implements ActionListener else if (processMsg != null) ADialog.info(getWindowNo(), dialog, "PaymentCreated", processMsg); - return true; + return ok; } @Override diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java index 9372033e30..faa67738a8 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java @@ -6,6 +6,8 @@ import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Enumeration; @@ -14,6 +16,7 @@ import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.ADialog; import org.compiere.grid.ed.VNumber; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MConversionRate; import org.compiere.model.MPaymentValidate; import org.compiere.swing.CButton; @@ -24,7 +27,7 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; -public class VPaymentFormCheck extends PaymentFormCheck implements ActionListener { +public class VPaymentFormCheck extends PaymentFormCheck implements ActionListener, FocusListener { private VPaymentFormDialog dialog; @@ -64,6 +67,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene sRoutingField.setPreferredSize(new Dimension(70, 21)); sStatus.setText(" "); sOnline.setText(Msg.getMsg(Env.getCtx(), "Online")); + sOnline.addActionListener(this); dialog.getPanel().add(sBankAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 2, 0), 0, 0)); dialog.getPanel().add(sBankAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 @@ -76,6 +80,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 5, 0), 0, 0)); dialog.getPanel().add(sAmountField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 5, 5), 0, 0)); + sAmountField.addFocusListener(this); dialog.getPanel().add(sRoutingLabel, new GridBagConstraints(0, 3, 1, 2, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 2, 0), 0, 0)); dialog.getPanel().add(sRoutingField, new GridBagConstraints(1, 3, 2, 1, 0.0, 0.0 @@ -133,19 +138,63 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene // Set Selection if (selectedBankAccount != null) sBankAccountCombo.setSelectedItem(selectedBankAccount); + + boolean exist = isBankAccountProcessorExist(m_C_Currency_ID, (BigDecimal) sAmountField.getValue()); + sOnline.setVisible(exist); + + if (exist) + updateOnlineButton(); } public void actionPerformed(ActionEvent e) { if (e.getSource() == sCurrencyCombo) { + int C_Currency_ID = 0; KeyNamePair pp = (KeyNamePair)sCurrencyCombo.getSelectedItem(); + if (pp != null) + C_Currency_ID = pp.getKey(); + BigDecimal amt = MConversionRate.convert(Env.getCtx(), - m_Amount, m_C_Currency_ID, pp.getKey(), m_AD_Client_ID, m_AD_Org_ID); + m_Amount, m_C_Currency_ID, C_Currency_ID, m_AD_Client_ID, m_AD_Org_ID); sAmountField.setValue(amt); + + updateOnlineButton(); + } + else if (e.getSource() == sOnline) + processOnline(); + } + + @Override + public void focusGained(FocusEvent e) { + } + + @Override + public void focusLost(FocusEvent e) { + if (e.getSource() == sAmountField) + updateOnlineButton(); + } + + private void updateOnlineButton() + { + int C_Currency_ID = 0; + KeyNamePair pp = (KeyNamePair)sCurrencyCombo.getSelectedItem(); + if (pp != null) + C_Currency_ID = pp.getKey(); + + BigDecimal PayAmt = (BigDecimal) sAmountField.getValue(); + + if (C_Currency_ID > 0 && PayAmt != null) + { + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(C_Currency_ID, PayAmt); + sOnline.setEnabled(bankAccountProcessor != null); + setBankAccountProcessor(bankAccountProcessor); + } + else + { + sOnline.setEnabled(false); + setBankAccountProcessor(null); } -// else if (e.getSource() == sOnline) -// processOnline(); } @Override @@ -203,7 +252,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene else if (processMsg != null) ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo()); - return true; + return ok; } @Override diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java index 9369663408..5032e3137f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java @@ -6,11 +6,15 @@ import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; import java.math.BigDecimal; import org.compiere.apps.ADialog; import org.compiere.grid.ed.VNumber; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.model.MPaymentProcessor; import org.compiere.swing.CButton; import org.compiere.swing.CComboBox; import org.compiere.swing.CLabel; @@ -19,7 +23,7 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; -public class VPaymentFormCreditCard extends PaymentFormCreditCard implements ActionListener { +public class VPaymentFormCreditCard extends PaymentFormCreditCard implements ActionListener, FocusListener { private VPaymentFormDialog dialog; @@ -65,6 +69,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 2, 0), 0, 0)); dialog.getPanel().add(kTypeCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0)); + kTypeCombo.addActionListener(this); dialog.getPanel().add(kNumberLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 2, 0), 0, 0)); dialog.getPanel().add(kNumberField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0 @@ -81,6 +86,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 5, 0), 0, 0)); dialog.getPanel().add(kAmountField, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 5, 5), 0, 0)); + kAmountField.addFocusListener(this); dialog.getPanel().add(kApprovalLabel, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0)); dialog.getPanel().add(kApprovalField, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0 @@ -124,12 +130,66 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act // Set Selection if (selectedCreditCard != null) kTypeCombo.setSelectedItem(selectedCreditCard); + + if (m_mPayment.isApproved()) + { + kOnline.setVisible(true); + kOnline.setEnabled(false); + + MBankAccountProcessor bankAccountProcessor = new MBankAccountProcessor(m_mPayment.getCtx(), m_mPayment.getC_BankAccount_ID(), m_mPayment.getC_PaymentProcessor_ID(), null); + setBankAccountProcessor(bankAccountProcessor); + } + else + { + boolean exist = isBankAccountProcessorExist("", (BigDecimal) kAmountField.getValue()); + kOnline.setVisible(exist); + + if (exist) + updateOnlineButton(); + } } public void actionPerformed(ActionEvent e) { if (e.getSource() == kOnline) processOnline(); + else if (e.getSource() == kTypeCombo) + updateOnlineButton(); + } + + @Override + public void focusGained(FocusEvent e) { + } + + @Override + public void focusLost(FocusEvent e) { + if (e.getSource() == kAmountField) + updateOnlineButton(); + } + + private void updateOnlineButton() + { + String CCType = null; + ValueNamePair vp = (ValueNamePair)kTypeCombo.getSelectedItem(); + if (vp != null) + CCType = vp.getValue(); + + BigDecimal PayAmt = (BigDecimal) kAmountField.getValue(); + + if (CCType != null && PayAmt != null) + { + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(CCType, PayAmt); + kOnline.setEnabled(bankAccountProcessor != null); + setBankAccountProcessor(bankAccountProcessor); + + MPaymentProcessor paymentProcessor = new MPaymentProcessor(Env.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), null); + kApprovalField.setReadWrite(paymentProcessor.isRequireVV()); + } + else + { + kOnline.setEnabled(false); + setBankAccountProcessor(null); + } } @Override @@ -150,7 +210,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act else if (processMsg != null) ADialog.info(getWindowNo(), dialog, "PaymentCreated", processMsg); - return true; + return ok; } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java new file mode 100644 index 0000000000..2cf578c3bb --- /dev/null +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java @@ -0,0 +1,141 @@ +package org.compiere.grid; + +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; + +import org.adempiere.plaf.AdempierePLAF; +import org.compiere.apps.ADialog; +import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.swing.CButton; +import org.compiere.swing.CComboBox; +import org.compiere.swing.CLabel; +import org.compiere.swing.CTextField; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; + +public abstract class VPaymentFormDirect extends PaymentFormDirect implements ActionListener { + + private VPaymentFormDialog dialog; + + private CLabel tAccountLabel = new CLabel(); + private CComboBox tAccountCombo = new CComboBox(); + private CButton tOnline = new CButton(); + private CTextField tRoutingField = new CTextField(); + private CTextField tNumberField = new CTextField(); + private CLabel tStatus = new CLabel(); + private CLabel tRoutingText = new CLabel(); + private CLabel tNumberText = new CLabel(); + + public VPaymentFormDirect(int windowNo, GridTab mTab, boolean isDebit) { + super(windowNo, mTab, isDebit); + dialog = new VPaymentFormDialog(this, windowNo); + init(); + } + + public void init() { + GridBagLayout tPanelLayout = new GridBagLayout(); + dialog.getPanel().setLayout(tPanelLayout); + tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID")); + tRoutingField.setColumns(8); + tNumberField.setColumns(10); + tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo")); + tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo")); + tOnline.setText(Msg.getMsg(Env.getCtx(), "Online")); + tOnline.addActionListener(this); + tStatus.setText(" "); + dialog.getPanel().add(tAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0)); + dialog.getPanel().add(tAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + dialog.getPanel().add(tRoutingField, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); + dialog.getPanel().add(tNumberField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); + dialog.getPanel().add(tStatus, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + dialog.getPanel().add(tRoutingText, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); + dialog.getPanel().add(tNumberText, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); + dialog.getPanel().add(tOnline, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + } + + @Override + public void loadData() { + if (m_C_Payment_ID != 0) + { + tRoutingField.setText(m_mPayment.getRoutingNo()); + tNumberField.setText(m_mPayment.getAccountNo()); + tStatus.setText(m_mPayment.getR_PnRef()); + } + + ArrayList list = getBPBankAccountList(); + for (KeyNamePair pp : list) + tAccountCombo.addItem(pp); + + boolean exist = isBankAccountProcessorExist(); + tOnline.setVisible(exist); + + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(); + setBankAccountProcessor(bankAccountProcessor); + } + + public void actionPerformed(ActionEvent e) + { + if (e.getSource() == tOnline) + processOnline(); + } + + @Override + public boolean checkMandatory() { + /*********************** + * Mandatory Data Check + */ + boolean dataOK = true; + KeyNamePair bpba = (KeyNamePair)tAccountCombo.getSelectedItem(); + if (bpba == null) + { + tAccountCombo.setBackground(AdempierePLAF.getFieldBackground_Error()); + ADialog.error(getWindowNo(), dialog, "PaymentBPBankNotFound"); + dataOK = false; + } + // + log.config("OK=" + dataOK); + return dataOK; + } + + @Override + public boolean saveChangesInTrx(String trxName) { + boolean ok = save(0, tRoutingField.getText(), tNumberField.getText()); + if (!ok) + ADialog.error(getWindowNo(), dialog, "PaymentError", processMsg); + else if (processMsg != null) + ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo()); + + return ok; + } + + @Override + public void showWindow() + { + dialog.setVisible(true); + } + + @Override + public void closeWindow() + { + dialog.dispose(); + } + + @Override + public Object getWindow() { + return dialog; + } +} diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java index 467521d950..cd99b2b926 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java @@ -2,10 +2,10 @@ package org.compiere.grid; import org.compiere.model.GridTab; -public class VPaymentFormDirectDebit extends VPaymentFormDirectDeposit { +public class VPaymentFormDirectDebit extends VPaymentFormDirect { - public VPaymentFormDirectDebit(int WindowNo, GridTab mTab) { - super(WindowNo, mTab); + public VPaymentFormDirectDebit(int windowNo, GridTab mTab) { + super(windowNo, mTab, true); } } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java index 1ba21f5a5d..3dc918af14 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java @@ -1,125 +1,10 @@ package org.compiere.grid; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.util.ArrayList; - -import org.adempiere.plaf.AdempierePLAF; -import org.compiere.apps.ADialog; import org.compiere.model.GridTab; -import org.compiere.swing.CButton; -import org.compiere.swing.CComboBox; -import org.compiere.swing.CLabel; -import org.compiere.swing.CTextField; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; -import org.compiere.util.Msg; -public class VPaymentFormDirectDeposit extends PaymentFormDirectDeposit { +public class VPaymentFormDirectDeposit extends VPaymentFormDirect { - private VPaymentFormDialog dialog; - - private CLabel tAccountLabel = new CLabel(); - private CComboBox tAccountCombo = new CComboBox(); - private CButton tOnline = new CButton(); - private CTextField tRoutingField = new CTextField(); - private CTextField tNumberField = new CTextField(); - private CLabel tStatus = new CLabel(); - private CLabel tRoutingText = new CLabel(); - private CLabel tNumberText = new CLabel(); - public VPaymentFormDirectDeposit(int windowNo, GridTab mTab) { - super(windowNo, mTab); - dialog = new VPaymentFormDialog(this, windowNo); - init(); - } - - public void init() { - GridBagLayout tPanelLayout = new GridBagLayout(); - dialog.getPanel().setLayout(tPanelLayout); - tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID")); - tRoutingField.setColumns(8); - tNumberField.setColumns(10); - tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo")); - tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo")); - tOnline.setText(Msg.getMsg(Env.getCtx(), "Online")); - tStatus.setText(" "); - dialog.getPanel().add(tAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0)); - dialog.getPanel().add(tAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); - dialog.getPanel().add(tRoutingField, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); - dialog.getPanel().add(tNumberField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); - dialog.getPanel().add(tStatus, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0 - ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); - dialog.getPanel().add(tRoutingText, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); - dialog.getPanel().add(tNumberText, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); - dialog.getPanel().add(tOnline, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0 - ,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); - } - - @Override - public void loadData() { - if (m_C_Payment_ID != 0) - { - tRoutingField.setText(m_mPayment.getRoutingNo()); - tNumberField.setText(m_mPayment.getAccountNo()); - tStatus.setText(m_mPayment.getR_PnRef()); - } - - ArrayList list = getBankAccountList(); - for (KeyNamePair pp : list) - tAccountCombo.addItem(pp); - } - - @Override - public boolean checkMandatory() { - /*********************** - * Mandatory Data Check - */ - boolean dataOK = true; - KeyNamePair bpba = (KeyNamePair)tAccountCombo.getSelectedItem(); - if (bpba == null) - { - tAccountCombo.setBackground(AdempierePLAF.getFieldBackground_Error()); - ADialog.error(getWindowNo(), dialog, "PaymentBPBankNotFound"); - dataOK = false; - } - // - log.config("OK=" + dataOK); - return dataOK; - } - - @Override - public boolean saveChangesInTrx(String trxName) { - boolean ok = save(); - if (!ok) - ADialog.error(getWindowNo(), dialog, "PaymentError", processMsg); - else if (processMsg != null) - ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo()); - - return true; - } - - @Override - public void showWindow() - { - dialog.setVisible(true); - } - - @Override - public void closeWindow() - { - dialog.dispose(); - } - - @Override - public Object getWindow() { - return dialog; + super(windowNo, mTab, false); } } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java index a843002551..c89215c2a5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.logging.Level; import org.compiere.model.GridTab; +import org.compiere.model.MInvoice; import org.compiere.util.CLogger; public class VPaymentFormFactory { @@ -27,13 +28,13 @@ public class VPaymentFormFactory { { // Register defaults: s_registeredClasses = new HashMap>(); - s_registeredClasses.put(PaymentFormCash.PAYMENTRULE, VPaymentFormCash.class); - s_registeredClasses.put(PaymentFormCheck.PAYMENTRULE, VPaymentFormCheck.class); - s_registeredClasses.put(PaymentFormCreditCard.PAYMENTRULE, VPaymentFormCreditCard.class); - s_registeredClasses.put(PaymentFormDirectDebit.PAYMENTRULE, VPaymentFormDirectDebit.class); - s_registeredClasses.put(PaymentFormDirectDeposit.PAYMENTRULE, VPaymentFormDirectDeposit.class); - s_registeredClasses.put(PaymentFormMixedPOS.PAYMENTRULE, VPaymentFormMixedPOS.class); - s_registeredClasses.put(PaymentFormOnCredit.PAYMENTRULE, VPaymentFormOnCredit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_Cash, VPaymentFormCash.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_Check, VPaymentFormCheck.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_CreditCard, VPaymentFormCreditCard.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDebit, VPaymentFormDirectDebit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDeposit, VPaymentFormDirectDeposit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_MixedPOSPayment, VPaymentFormMixedPOS.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_OnCredit, VPaymentFormOnCredit.class); } public static IPaymentForm create (int windowNo, GridTab mTab, String paymentRule) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java index 9bf7193eba..7d9f6893ca 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java @@ -224,7 +224,7 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener { @@ -39,6 +43,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener private Listbox sBankAccountCombo = ListboxFactory.newDropdownListbox(); private Label sCurrencyLabel = new Label(); private Listbox sCurrencyCombo = ListboxFactory.newDropdownListbox(); + private Space sCurrencySpace = new Space(); private Label sAmountLabel = new Label(); private WNumberEditor sAmountField = new WNumberEditor(); private Label sRoutingLabel = new Label(); @@ -49,6 +54,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener private Label sCheckLabel = new Label(); private Button sOnline = new Button(); private Label sStatus = new Label(); + private Panel customizePanel = new Panel(); public WPaymentFormCheck(int windowNo, GridTab mTab) { super(windowNo, mTab); @@ -71,7 +77,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener sStatus.setText(" "); sOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online")); LayoutUtils.addSclass("action-text-button", sOnline); -// sOnline.addActionListener(this); + sOnline.addActionListener(this); window.getPanel().setId("sPanel"); Columns columns = new Columns(); @@ -79,15 +85,11 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener Column column = new Column(); columns.appendChild(column); - column.setWidth("30%"); + column.setWidth("40%"); column = new Column(); columns.appendChild(column); - column.setWidth("50%"); - - column = new Column(); - columns.appendChild(column); - column.setWidth("20%"); + column.setWidth("60%"); sAmountField.getComponent().setWidth("150px"); @@ -95,38 +97,37 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener Row row = rows.newRow(); row.appendChild(sBankAccountLabel.rightAlign()); row.appendChild(sBankAccountCombo); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(sCurrencyLabel.rightAlign()); row.appendChild(sCurrencyCombo); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(sAmountLabel.rightAlign()); row.appendChild(sAmountField.getComponent()); - row.appendChild(new Space()); + sAmountField.getComponent().addEventListener(Events.ON_BLUR, this); row = rows.newRow(); row.appendChild(sRoutingLabel.rightAlign()); row.appendChild(sRoutingField); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(sNumberLabel.rightAlign()); row.appendChild(sNumberField); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(sCheckLabel.rightAlign()); row.appendChild(sCheckField); + + row = rows.newRow(); + row.appendCellChild(customizePanel, 2); + + row = rows.newRow(); + row.appendChild(new Space()); row.appendChild(sOnline); row = rows.newRow(); - Cell cell = new Cell(); - row.appendChild(cell); - cell.appendChild(sStatus); - cell.setColspan(3); + row.appendCellChild(sStatus, 2); } @Override @@ -159,6 +160,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener { sCurrencyLabel.setVisible(false); // Check sCurrencyCombo.setVisible(false); + sCurrencySpace.setVisible(false); } ArrayList list = getBankAccountList(); @@ -168,21 +170,59 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener // Set Selection if (selectedBankAccount != null) sBankAccountCombo.setSelectedKeyNamePair(selectedBankAccount); + + boolean exist = isBankAccountProcessorExist(m_C_Currency_ID, (BigDecimal) sAmountField.getValue()); + sOnline.setVisible(exist); + + if (exist) + updateOnlineButton(); } public void onEvent(Event e) { - if (e.getTarget() == sCurrencyCombo) + if (e.getTarget() == sCurrencyCombo || e.getTarget() == sAmountField) { + int C_Currency_ID = 0; KeyNamePair pp = sCurrencyCombo.getSelectedItem().toKeyNamePair(); - BigDecimal amt = MConversionRate.convert(Env.getCtx(), - m_Amount, m_C_Currency_ID, pp.getKey(), m_AD_Client_ID, m_AD_Org_ID); - sAmountField.setValue(amt); + if (pp != null) + C_Currency_ID = pp.getKey(); + + if (e.getTarget() == sCurrencyCombo) + { + BigDecimal amt = MConversionRate.convert(Env.getCtx(), + m_Amount, m_C_Currency_ID, C_Currency_ID, m_AD_Client_ID, m_AD_Org_ID); + sAmountField.setValue(amt); + } + + updateOnlineButton(); + } + else if (e.getTarget() == sOnline) + { + window.lockUI(); + Clients.response(new AuEcho(window, "runProcessOnline", null)); + } + } + + private void updateOnlineButton() + { + int C_Currency_ID = 0; + KeyNamePair pp = sCurrencyCombo.getSelectedItem().toKeyNamePair(); + if (pp != null) + C_Currency_ID = pp.getKey(); + + BigDecimal PayAmt = (BigDecimal) sAmountField.getValue(); + + if (C_Currency_ID > 0 && PayAmt != null) + { + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(C_Currency_ID, PayAmt); + sOnline.setEnabled(bankAccountProcessor != null); + setBankAccountProcessor(bankAccountProcessor); + } + else + { + sOnline.setEnabled(false); + setBankAccountProcessor(null); } -// else if (e.getTarget() == sOnline) { -// window.lockUI(); -// Clients.response(new AuEcho(window, "runProcessOnline", null)); -// } } @Override @@ -240,7 +280,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener else if (processMsg != null) FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo()); - return true; + return ok; } @Override @@ -257,4 +297,9 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener public Object getWindow() { return window; } + + @Override + public Object getCustomizePanel() { + return customizePanel; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java index 05eea7a290..f91bc6111a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java @@ -12,6 +12,7 @@ import org.adempiere.webui.component.Label; import org.adempiere.webui.component.ListItem; import org.adempiere.webui.component.Listbox; import org.adempiere.webui.component.ListboxFactory; +import org.adempiere.webui.component.Panel; import org.adempiere.webui.component.Row; import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Textbox; @@ -19,12 +20,15 @@ import org.adempiere.webui.editor.WNumberEditor; import org.adempiere.webui.window.FDialog; import org.compiere.grid.PaymentFormCreditCard; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.model.MPaymentProcessor; import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; import org.zkoss.zk.au.out.AuEcho; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Space; @@ -44,6 +48,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve private Textbox kApprovalField = new Textbox(); private Button kOnline = new Button(); private Label kStatus = new Label(); + private Panel customizePanel = new Panel(); public WPaymentFormCreditCard(int windowNo, GridTab mTab) { super(windowNo, mTab); @@ -73,15 +78,11 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve Column column = new Column(); columns.appendChild(column); - column.setWidth("30%"); + column.setWidth("40%"); column = new Column(); columns.appendChild(column); - column.setWidth("50%"); - - column = new Column(); - columns.appendChild(column); - column.setWidth("20%"); + column.setWidth("60%"); kAmountField.getComponent().setWidth("150px"); @@ -89,30 +90,34 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve Row row = rows.newRow(); row.appendChild(kTypeLabel.rightAlign()); row.appendChild(kTypeCombo); - row.appendChild(new Space()); + kTypeCombo.addEventListener(Events.ON_SELECT, this); row = rows.newRow(); row.appendChild(kNumberLabel.rightAlign()); row.appendChild(kNumberField); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(kExpLabel.rightAlign()); row.appendChild(kExpField); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(kAmountLabel.rightAlign()); row.appendChild(kAmountField.getComponent()); - row.appendChild(new Space()); + kAmountField.getComponent().addEventListener(Events.ON_BLUR, this); row = rows.newRow(); row.appendChild(kApprovalLabel.rightAlign()); row.appendChild(kApprovalField); + + row = rows.newRow(); + row.appendCellChild(customizePanel, 2); + + row = rows.newRow(); + row.appendChild(new Space()); row.appendChild(kOnline); row = rows.newRow(); - row.appendCellChild(kStatus, 3); + row.appendCellChild(kStatus, 2); } @Override @@ -146,6 +151,23 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve // Set Selection if (selectedCreditCard != null) kTypeCombo.setSelectedValueNamePair(selectedCreditCard); + + if (m_mPayment.isApproved()) + { + kOnline.setVisible(true); + kOnline.setEnabled(false); + + MBankAccountProcessor bankAccountProcessor = new MBankAccountProcessor(m_mPayment.getCtx(), m_mPayment.getC_BankAccount_ID(), m_mPayment.getC_PaymentProcessor_ID(), null); + setBankAccountProcessor(bankAccountProcessor); + } + else + { + boolean exist = isBankAccountProcessorExist("", (BigDecimal) kAmountField.getValue()); + kOnline.setVisible(exist); + + if (exist) + updateOnlineButton(); + } } public void onEvent(Event e) @@ -154,6 +176,34 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve window.lockUI(); Clients.response(new AuEcho(window, "runProcessOnline", null)); } + else if (e.getTarget() == kTypeCombo || e.getTarget() == kAmountField) + updateOnlineButton(); + } + + private void updateOnlineButton() + { + String CCType = null; + ListItem selected = kTypeCombo.getSelectedItem(); + ValueNamePair vp = selected != null ? selected.toValueNamePair() : null; + if (vp != null) + CCType = vp.getValue(); + + BigDecimal PayAmt = (BigDecimal) kAmountField.getValue(); + + if (CCType != null && PayAmt != null) + { + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(CCType, PayAmt); + kOnline.setEnabled(bankAccountProcessor != null); + setBankAccountProcessor(bankAccountProcessor); + + MPaymentProcessor paymentProcessor = new MPaymentProcessor(Env.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), null); + kApprovalField.setReadonly(!paymentProcessor.isRequireVV()); + } + else + { + kOnline.setEnabled(false); + setBankAccountProcessor(null); + } } @Override @@ -175,7 +225,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve else if (processMsg != null) FDialog.info(getWindowNo(), window, "PaymentCreated", processMsg); - return true; + return ok; } @Override @@ -190,7 +240,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve boolean ok = processOnline(CCType, kNumberField.getText(), kExpField.getText()); if (!ok) - FDialog.error(getWindowNo(), window, "PaymentError", processMsg); + FDialog.error(getWindowNo(), window, "PaymentNotProcessed", processMsg); else if (processMsg != null) FDialog.info(getWindowNo(), window, "PaymentProcessed", processMsg); } // online @@ -209,4 +259,9 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve public Object getWindow() { return window; } + + @Override + public Object getCustomizePanel() { + return customizePanel; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java new file mode 100644 index 0000000000..e121e747fe --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java @@ -0,0 +1,178 @@ +package org.adempiere.webui.apps.form; + +import java.util.ArrayList; + +import org.adempiere.webui.LayoutUtils; +import org.adempiere.webui.component.Button; +import org.adempiere.webui.component.Column; +import org.adempiere.webui.component.Columns; +import org.adempiere.webui.component.Grid; +import org.adempiere.webui.component.GridFactory; +import org.adempiere.webui.component.Label; +import org.adempiere.webui.component.ListItem; +import org.adempiere.webui.component.Listbox; +import org.adempiere.webui.component.ListboxFactory; +import org.adempiere.webui.component.Panel; +import org.adempiere.webui.component.Row; +import org.adempiere.webui.component.Rows; +import org.adempiere.webui.component.Textbox; +import org.adempiere.webui.window.FDialog; +import org.compiere.grid.PaymentFormDirect; +import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; +import org.zkoss.zk.au.out.AuEcho; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.util.Clients; +import org.zkoss.zul.Space; + +public abstract class WPaymentFormDirect extends PaymentFormDirect implements EventListener { + + private WPaymentFormWindow window; + + private Label tAccountLabel = new Label(); + private Listbox tAccountCombo = ListboxFactory.newDropdownListbox(); + private Button tOnline = new Button(); + private Textbox tRoutingField = new Textbox(); + private Textbox tNumberField = new Textbox(); + private Label tStatus = new Label(); + private Label tRoutingText = new Label(); + private Label tNumberText = new Label(); + private Panel customizePanel = new Panel(); + + public WPaymentFormDirect(int windowNo, GridTab mTab, boolean isDebit) { + super(windowNo, mTab, isDebit); + window = new WPaymentFormWindow(this, windowNo); + init(); + } + + public void init() { + Grid tPanelLayout = GridFactory.newGridLayout(); + window.getPanel().appendChild(tPanelLayout); + tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID")); + tRoutingField.setCols(8); + tNumberField.setCols(10); + tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo")); + tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo")); + tOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online")); + LayoutUtils.addSclass("action-text-button", tOnline); + tOnline.addActionListener(this); + tStatus.setText(" "); + window.getPanel().setId("tPanel"); + + Columns columns = new Columns(); + tPanelLayout.appendChild(columns); + + Column column = new Column(); + columns.appendChild(column); + column.setWidth("40%"); + + column = new Column(); + columns.appendChild(column); + column.setWidth("60%"); + + Rows rows = tPanelLayout.newRows(); + Row row = rows.newRow(); + row.appendChild(tAccountLabel.rightAlign()); + row.appendChild(tAccountCombo); + + row = rows.newRow(); + row.appendChild(tRoutingText.rightAlign()); + row.appendChild(tRoutingField); + + row = rows.newRow(); + row.appendChild(tNumberText.rightAlign()); + row.appendChild(tNumberField); + + row = rows.newRow(); + row.appendCellChild(customizePanel, 2); + + row = rows.newRow(); + row.appendChild(new Space()); + row.appendChild(tOnline); + + row = rows.newRow(); + row.appendCellChild(tStatus, 2); + } + + @Override + public void loadData() { + if (m_C_Payment_ID != 0) + { + tRoutingField.setText(m_mPayment.getRoutingNo()); + tNumberField.setText(m_mPayment.getAccountNo()); + tStatus.setText(m_mPayment.getR_PnRef()); + } + + ArrayList list = getBPBankAccountList(); + for (KeyNamePair pp : list) + tAccountCombo.addItem(pp); + + boolean exist = isBankAccountProcessorExist(); + tOnline.setVisible(exist); + + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(); + setBankAccountProcessor(bankAccountProcessor); + } + + public void onEvent(Event e) + { + if (e.getTarget() == tOnline) + { + window.lockUI(); + Clients.response(new AuEcho(window, "runProcessOnline", null)); + } + } + + @Override + public boolean checkMandatory() { + /*********************** + * Mandatory Data Check + */ + boolean dataOK = true; + ListItem selected = tAccountCombo.getSelectedItem(); + KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null; + if (bpba == null) + { + FDialog.error(getWindowNo(), window, "PaymentBPBankNotFound"); + dataOK = false; + } + // + log.config("OK=" + dataOK); + return dataOK; + } + + @Override + public boolean saveChangesInTrx(final String trxName) { + boolean ok = save(0, tRoutingField.getText(), tNumberField.getText()); + if (!ok) + FDialog.error(getWindowNo(), window, "PaymentError", processMsg); + else if (processMsg != null) + FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo()); + + return ok; + } + + @Override + public void showWindow() { + window.setVisible(true); + } + + @Override + public void closeWindow() { + window.dispose(); + } + + @Override + public Object getWindow() { + return window; + } + + @Override + public Object getCustomizePanel() { + return customizePanel; + } +} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java index da586ac96a..0567756c04 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java @@ -2,9 +2,9 @@ package org.adempiere.webui.apps.form; import org.compiere.model.GridTab; -public class WPaymentFormDirectDebit extends WPaymentFormDirectDeposit { +public class WPaymentFormDirectDebit extends WPaymentFormDirect { public WPaymentFormDirectDebit(int windowNo, GridTab mTab) { - super(windowNo, mTab); + super(windowNo, mTab, true); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java index 8abac750de..9ef79d9d3c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java @@ -1,150 +1,10 @@ package org.adempiere.webui.apps.form; -import java.util.ArrayList; - -import org.adempiere.webui.LayoutUtils; -import org.adempiere.webui.component.Button; -import org.adempiere.webui.component.Column; -import org.adempiere.webui.component.Columns; -import org.adempiere.webui.component.Grid; -import org.adempiere.webui.component.GridFactory; -import org.adempiere.webui.component.Label; -import org.adempiere.webui.component.ListItem; -import org.adempiere.webui.component.Listbox; -import org.adempiere.webui.component.ListboxFactory; -import org.adempiere.webui.component.Row; -import org.adempiere.webui.component.Rows; -import org.adempiere.webui.component.Textbox; -import org.adempiere.webui.window.FDialog; -import org.compiere.grid.PaymentFormDirectDeposit; import org.compiere.model.GridTab; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; -import org.compiere.util.Msg; -import org.zkoss.zul.Space; -public class WPaymentFormDirectDeposit extends PaymentFormDirectDeposit { - - private WPaymentFormWindow window; - - private Label tAccountLabel = new Label(); - private Listbox tAccountCombo = ListboxFactory.newDropdownListbox(); - private Button tOnline = new Button(); - private Textbox tRoutingField = new Textbox(); - private Textbox tNumberField = new Textbox(); - private Label tStatus = new Label(); - private Label tRoutingText = new Label(); - private Label tNumberText = new Label(); +public class WPaymentFormDirectDeposit extends WPaymentFormDirect { public WPaymentFormDirectDeposit(int windowNo, GridTab mTab) { - super(windowNo, mTab); - window = new WPaymentFormWindow(this, windowNo); - init(); - } - - public void init() { - Grid tPanelLayout = GridFactory.newGridLayout(); - window.getPanel().appendChild(tPanelLayout); - tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID")); - tRoutingField.setCols(8); - tNumberField.setCols(10); - tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo")); - tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo")); - tOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online")); - LayoutUtils.addSclass("action-text-button", tOnline); - tStatus.setText(" "); - window.getPanel().setId("tPanel"); - - Columns columns = new Columns(); - tPanelLayout.appendChild(columns); - - Column column = new Column(); - columns.appendChild(column); - column.setWidth("30%"); - - column = new Column(); - columns.appendChild(column); - column.setWidth("50%"); - - column = new Column(); - columns.appendChild(column); - column.setWidth("20%"); - - Rows rows = tPanelLayout.newRows(); - Row row = rows.newRow(); - row.appendChild(tAccountLabel.rightAlign()); - row.appendChild(tAccountCombo); - row.appendChild(new Space()); - - row = rows.newRow(); - row.appendChild(tRoutingText.rightAlign()); - row.appendChild(tRoutingField); - row.appendChild(new Space()); - - row = rows.newRow(); - row.appendChild(tNumberText.rightAlign()); - row.appendChild(tNumberField); - row.appendChild(tOnline); - - row = rows.newRow(); - row.appendCellChild(tStatus, 3); - } - - @Override - public void loadData() { - if (m_C_Payment_ID != 0) - { - tRoutingField.setText(m_mPayment.getRoutingNo()); - tNumberField.setText(m_mPayment.getAccountNo()); - tStatus.setText(m_mPayment.getR_PnRef()); - } - - ArrayList list = getBankAccountList(); - for (KeyNamePair pp : list) - tAccountCombo.addItem(pp); - } - - @Override - public boolean checkMandatory() { - /*********************** - * Mandatory Data Check - */ - boolean dataOK = true; - ListItem selected = tAccountCombo.getSelectedItem(); - KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null; - if (bpba == null) - { - FDialog.error(getWindowNo(), window, "PaymentBPBankNotFound"); - dataOK = false; - } - // - log.config("OK=" + dataOK); - return dataOK; - } - - @Override - public boolean saveChangesInTrx(final String trxName) { - boolean ok = save(); - if (!ok) - FDialog.error(getWindowNo(), window, "PaymentError", processMsg); - else if (processMsg != null) - FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo()); - - return true; - } - - @Override - public void showWindow() { - window.setVisible(true); - } - - @Override - public void closeWindow() { - window.dispose(); - } - - @Override - public Object getWindow() { - return window; + super(windowNo, mTab, false); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java index ca340fe9d2..3831441d00 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java @@ -4,14 +4,8 @@ import java.util.HashMap; import java.util.logging.Level; import org.compiere.grid.IPaymentForm; -import org.compiere.grid.PaymentFormCash; -import org.compiere.grid.PaymentFormCheck; -import org.compiere.grid.PaymentFormCreditCard; -import org.compiere.grid.PaymentFormDirectDebit; -import org.compiere.grid.PaymentFormDirectDeposit; -import org.compiere.grid.PaymentFormMixedPOS; -import org.compiere.grid.PaymentFormOnCredit; import org.compiere.model.GridTab; +import org.compiere.model.MInvoice; import org.compiere.util.CLogger; public class WPaymentFormFactory { @@ -36,13 +30,13 @@ public class WPaymentFormFactory { { // Register defaults: s_registeredClasses = new HashMap>(); - s_registeredClasses.put(PaymentFormCash.PAYMENTRULE, WPaymentFormCash.class); - s_registeredClasses.put(PaymentFormCheck.PAYMENTRULE, WPaymentFormCheck.class); - s_registeredClasses.put(PaymentFormCreditCard.PAYMENTRULE, WPaymentFormCreditCard.class); - s_registeredClasses.put(PaymentFormDirectDebit.PAYMENTRULE, WPaymentFormDirectDebit.class); - s_registeredClasses.put(PaymentFormDirectDeposit.PAYMENTRULE, WPaymentFormDirectDeposit.class); - s_registeredClasses.put(PaymentFormMixedPOS.PAYMENTRULE, WPaymentFormMixedPOS.class); - s_registeredClasses.put(PaymentFormOnCredit.PAYMENTRULE, WPaymentFormOnCredit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_Cash, WPaymentFormCash.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_Check, WPaymentFormCheck.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_CreditCard, WPaymentFormCreditCard.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDebit, WPaymentFormDirectDebit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDeposit, WPaymentFormDirectDeposit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_MixedPOSPayment, WPaymentFormMixedPOS.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_OnCredit, WPaymentFormOnCredit.class); } public static IPaymentForm create(int windowNo, GridTab mTab, String paymentRule) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java index d2b3c672ca..17575017ba 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java @@ -59,6 +59,9 @@ public class WPaymentFormWindow extends Window implements EventListener, Center center = new Center(); mainLayout.appendChild(center); center.appendChild(centerPanel = getPanel()); + centerPanel.setHflex("1"); + centerPanel.setVflex("1"); + center.setAutoscroll(true); // South south = new South(); south.setStyle("border: none"); diff --git a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp index 03bc0a07f8..0cb5daa8a0 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -803,12 +803,12 @@ div.simileAjax-bubble-container { background-color: transparent !important; } -.grid-layout .z-row-inner { +.grid-layout .z-row-inner, .grid-layout .z-cell { border: none !important; background-color: transparent !important; } -.grid-layout tr.z-row-over>td.z-row-inner { +.grid-layout tr.z-row-over>td.z-row-inner, .grid-layout tr.z-row-over>.z-cell { border: none !important; } diff --git a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java index 4dfdfea19c..8d56650c21 100644 --- a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java @@ -1,5 +1,7 @@ package org.compiere.grid; +import org.compiere.model.MBankAccountProcessor; + public interface IPaymentForm { public boolean checkMandatory(); @@ -13,4 +15,10 @@ public interface IPaymentForm { public void closeWindow(); public Object getWindow(); + + public Object getCustomizePanel(); + + public void setCustomizeValues(); + + public void setBankAccountProcessor(MBankAccountProcessor bankAccountProcessor); } \ No newline at end of file diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java index 53f080d782..d5e1d290f8 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java @@ -6,17 +6,21 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Properties; import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MCashLine; import org.compiere.model.MPayment; +import org.compiere.model.MPaymentProcessor; import org.compiere.model.MSysConfig; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; import org.compiere.util.Trx; import org.compiere.util.TrxRunnable; @@ -198,6 +202,9 @@ public abstract class PaymentForm implements IPaymentForm { }; try { Trx.run(r); + } catch (AdempiereException ae) { + success[0] = false; + throw ae; } catch (Throwable e) { success[0] = false; throw new AdempiereException("PaymentError", e); @@ -277,7 +284,43 @@ public abstract class PaymentForm implements IPaymentForm { public void processOnline() { - + throw new AdempiereException(Msg.getMsg(Env.getCtx(), "ActionNotSupported")); + } + + public boolean isBankAccountProcessorExist(Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal PayAmt, String trxName) + { + MBankAccountProcessor[] m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, PayAmt, trxName); + // Relax Amount + if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0) + m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, Env.ZERO, trxName); + if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0) + return false; + return true; + } + + public MBankAccountProcessor getBankAccountProcessor(Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal PayAmt, String trxName) + { + MBankAccountProcessor[] m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, PayAmt, trxName); + // Relax Amount + if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0) + m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, Env.ZERO, trxName); + if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0) + return null; + + MBankAccountProcessor m_mBankAccountProcessor = null; + // Find the first right one + for (int i = 0; i < m_mBankAccountProcessors.length; i++) + { + MBankAccountProcessor bankAccountProcessor = m_mBankAccountProcessors[i]; + MPaymentProcessor paymentProcessor = new MPaymentProcessor(bankAccountProcessor.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), bankAccountProcessor.get_TrxName()); + if (paymentProcessor.accepts (tender, CCType)) + { + m_mBankAccountProcessor = m_mBankAccountProcessors[i]; + break; + } + } + // + return m_mBankAccountProcessor; } public GridTab getGridTab() @@ -299,4 +342,19 @@ public abstract class PaymentForm implements IPaymentForm { { return m_WindowNo; } + + public Object getCustomizePanel() + { + return null; + } + + public void setCustomizeValues() + { + + } + + public void setBankAccountProcessor(MBankAccountProcessor bankAccountProcessor) + { + + } } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java index f69a7dabc1..6f27b1bdca 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java @@ -8,6 +8,7 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.compiere.model.GridTab; import org.compiere.model.MCash; import org.compiere.model.MCashLine; @@ -20,10 +21,11 @@ import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; import org.compiere.util.TimeUtil; public abstract class PaymentFormCash extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_Cash; + private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Cash; public PaymentFormCash(int WindowNo, GridTab mTab) { super(WindowNo, mTab); @@ -116,7 +118,6 @@ public abstract class PaymentFormCash extends PaymentForm { public boolean save(int newC_BankAccount_ID, int newC_CashBook_ID, Timestamp newDateAcct, BigDecimal newAmount, String trxName) { processMsg = null; - boolean error = false; int newC_CashLine_ID = m_C_CashLine_ID; /*********************** @@ -134,8 +135,8 @@ public abstract class PaymentFormCash extends PaymentForm { log.config( "CashCancelled"); else { - processMsg = "CashNotCancelled"; - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "CashNotCancelled"); + throw new AdempiereException(processMsg); } } newC_CashLine_ID = 0; // reset @@ -177,8 +178,8 @@ public abstract class PaymentFormCash extends PaymentForm { if (C_Invoice_ID == 0 && order == null) { log.config("No Invoice!"); - processMsg = "CashNotCreated"; - error = false; + processMsg = Msg.getMsg(Env.getCtx(), "CashNotCreated"); + throw new AdempiereException(processMsg); } else { @@ -219,7 +220,7 @@ public abstract class PaymentFormCash extends PaymentForm { if (cash == null || cash.get_ID() == 0) { processMsg = CLogger.retrieveErrorString("CashNotCreated"); - error = true; + throw new AdempiereException(processMsg); } else { @@ -290,8 +291,8 @@ public abstract class PaymentFormCash extends PaymentForm { processMsg = m_mPayment.getDocumentNo(); else { - processMsg = "PaymentNotCreated"; - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); + throw new AdempiereException(processMsg); } } else @@ -321,6 +322,6 @@ public abstract class PaymentFormCash extends PaymentForm { else getGridTab().setValue("C_CashLine_ID", new Integer(newC_CashLine_ID)); } - return !error; + return true; } } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java index d2c7dc7efd..88c5882a10 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java @@ -7,7 +7,9 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MInvoice; import org.compiere.model.MOrder; import org.compiere.model.MPayment; @@ -16,9 +18,10 @@ import org.compiere.process.DocAction; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; public abstract class PaymentFormCheck extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_Check; + private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Check; public PaymentFormCheck(int WindowNo, GridTab mTab) { super(WindowNo, mTab); @@ -68,7 +71,6 @@ public abstract class PaymentFormCheck extends PaymentForm { public boolean save(int newC_BankAccount_ID, String routing, String number, String check, BigDecimal amount) { processMsg = null; - boolean error = false; String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; /*********************** @@ -85,11 +87,11 @@ public abstract class PaymentFormCheck extends PaymentForm { boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); m_mPaymentOriginal.saveEx(); if (ok) - log.info( "Payment Canecelled - " + m_mPaymentOriginal); + log.info( "Payment Cancelled - " + m_mPaymentOriginal); else { - processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo(); - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); + throw new AdempiereException(processMsg); } m_mPayment.resetNew(); } @@ -111,8 +113,8 @@ public abstract class PaymentFormCheck extends PaymentForm { } else { - processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo(); - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo(); + throw new AdempiereException(processMsg); } } } @@ -163,6 +165,7 @@ public abstract class PaymentFormCheck extends PaymentForm { } m_mPayment.setDateTrx(m_DateAcct); m_mPayment.setDateAcct(m_DateAcct); + setCustomizeValues(); m_mPayment.saveEx(); // Save/Post @@ -174,8 +177,8 @@ public abstract class PaymentFormCheck extends PaymentForm { processMsg = m_mPayment.getDocumentNo(); else { - processMsg = "PaymentNotCreated"; - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); + throw new AdempiereException(processMsg); } } else @@ -193,6 +196,16 @@ public abstract class PaymentFormCheck extends PaymentForm { else getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); } - return !error; + return true; + } + + public boolean isBankAccountProcessorExist(int C_Currency_ID, BigDecimal PayAmt) + { + return isBankAccountProcessorExist(Env.getCtx(), MPayment.TENDERTYPE_Check, "", Env.getAD_Client_ID(Env.getCtx()), C_Currency_ID, PayAmt, null); + } + + public MBankAccountProcessor getBankAccountProcessor(int C_Currency_ID, BigDecimal PayAmt) + { + return getBankAccountProcessor(Env.getCtx(), MPayment.TENDERTYPE_Check, "", Env.getAD_Client_ID(Env.getCtx()), C_Currency_ID, PayAmt, null); } } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java index 21ee1c18c5..721a0a6b2d 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java @@ -2,17 +2,20 @@ package org.compiere.grid; import java.math.BigDecimal; +import org.adempiere.exceptions.AdempiereException; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MInvoice; import org.compiere.model.MOrder; import org.compiere.model.MPayment; import org.compiere.process.DocAction; import org.compiere.util.Env; +import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; public abstract class PaymentFormCreditCard extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_CreditCard; - + private final String PAYMENTRULE = MInvoice.PAYMENTRULE_CreditCard; + public PaymentFormCreditCard(int WindowNo, GridTab mTab) { super(WindowNo, mTab); } @@ -34,7 +37,6 @@ public abstract class PaymentFormCreditCard extends PaymentForm { public boolean save(String newCCType, String newCCNumber, String newCCExp, BigDecimal newAmount) { processMsg = null; - boolean error = false; String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; /*********************** @@ -51,11 +53,11 @@ public abstract class PaymentFormCreditCard extends PaymentForm { boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); m_mPaymentOriginal.saveEx(); if (ok) - log.info( "Payment Canecelled - " + m_mPaymentOriginal); + log.info( "Payment Cancelled - " + m_mPaymentOriginal); else { - processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo(); - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); + throw new AdempiereException(processMsg); } m_mPayment.resetNew(); } @@ -77,8 +79,8 @@ public abstract class PaymentFormCreditCard extends PaymentForm { } else { - processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo(); - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo(); + throw new AdempiereException(processMsg); } } } @@ -130,6 +132,14 @@ public abstract class PaymentFormCreditCard extends PaymentForm { } m_mPayment.setDateTrx(m_DateAcct); m_mPayment.setDateAcct(m_DateAcct); + setCustomizeValues(); + + if (!m_mPayment.isApproved()) + { + processMsg = Msg.getMsg(Env.getCtx(), "CardNotProcessed"); + throw new AdempiereException(processMsg); + } + m_mPayment.saveEx(); // Save/Post @@ -141,8 +151,8 @@ public abstract class PaymentFormCreditCard extends PaymentForm { processMsg = m_mPayment.getDocumentNo(); else { - processMsg = "PaymentNotCreated"; - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); + throw new AdempiereException(processMsg); } } else @@ -161,7 +171,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm { getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); } - return !error; + return true; } public boolean processOnline(String CCType, String CCNumber, String CCExp) @@ -188,8 +198,9 @@ public abstract class PaymentFormCreditCard extends PaymentForm { m_mPayment.setDateTrx(m_DateAcct); // Set Amount m_mPayment.setAmount(m_C_Currency_ID, m_Amount); + setCustomizeValues(); if (!m_mPayment.save()) { - processMsg = "PaymentNotCreated"; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); return false; } else { approved = m_mPayment.processOnline(); @@ -205,7 +216,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm { processMsg = info + "\n" + m_mPayment.getDocumentNo(); else { - processMsg = "PaymentNotCreated"; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); error = true; } saveChanges(); @@ -218,4 +229,14 @@ public abstract class PaymentFormCreditCard extends PaymentForm { } return !error; } + + public boolean isBankAccountProcessorExist(String CCType, BigDecimal PayAmt) + { + return isBankAccountProcessorExist(Env.getCtx(), MPayment.TENDERTYPE_CreditCard, CCType, Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, PayAmt, null); + } + + public MBankAccountProcessor getBankAccountProcessor(String CCType, BigDecimal PayAmt) + { + return getBankAccountProcessor(Env.getCtx(), MPayment.TENDERTYPE_CreditCard, CCType, Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, PayAmt, null); + } } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java new file mode 100644 index 0000000000..c845a475e9 --- /dev/null +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java @@ -0,0 +1,204 @@ +package org.compiere.grid; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; + +import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.model.MInvoice; +import org.compiere.model.MOrder; +import org.compiere.model.MPayment; +import org.compiere.process.DocAction; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; + +public abstract class PaymentFormDirect extends PaymentForm { + private String PAYMENTRULE; + + public PaymentFormDirect(int WindowNo, GridTab mTab, boolean isDebit) { + super(WindowNo, mTab); + PAYMENTRULE = isDebit ? MInvoice.PAYMENTRULE_DirectDebit : MInvoice.PAYMENTRULE_DirectDeposit; + } + + public ArrayList getBPBankAccountList() { + ArrayList list = new ArrayList(); + + /** + * Load Accounts + */ + String SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||'_'||NVL(a.AccountNo, ' ') AS Acct " + + "FROM C_BP_BankAccount a" + + " LEFT OUTER JOIN C_Bank b ON (a.C_Bank_ID=b.C_Bank_ID) " + + "WHERE C_BPartner_ID=?" + + "AND a.IsActive='Y' AND a.IsACH='Y'"; + try + { + PreparedStatement pstmt = DB.prepareStatement(SQL, null); + pstmt.setInt(1, m_C_BPartner_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + int key = rs.getInt(1); + String name = rs.getString(2); + KeyNamePair pp = new KeyNamePair(key, name); + list.add(pp); + } + rs.close(); + pstmt.close(); + } + catch (SQLException eac) + { + log.log(Level.SEVERE, SQL, eac); + } + + return list; + } + + public String processMsg; + public boolean save(int newC_BankAccount_ID, String routing, String number) + { + processMsg = null; + + String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; + + /*********************** + * Changed PaymentRule + */ + if (!PAYMENTRULE.equals(m_PaymentRule)) + { + log.fine("Changed PaymentRule: " + m_PaymentRule + " -> " + PAYMENTRULE); + // We had a change in Payment type (e.g. Check to CC) + if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) != -1 && m_mPaymentOriginal != null) + { + log.fine("Old Payment(1) - " + m_mPaymentOriginal); + m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); + boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); + m_mPaymentOriginal.saveEx(); + if (ok) + log.info( "Payment Cancelled - " + m_mPaymentOriginal); + else + { + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); + throw new AdempiereException(processMsg); + } + m_mPayment.resetNew(); + } + // We had a Payment and something else (e.g. Check to Cash) + else if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) == -1) + { + log.fine("Old Payment(2) - " + m_mPaymentOriginal); + if (m_mPaymentOriginal != null) + { + m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); + boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); + m_mPaymentOriginal.saveEx(); + if (ok) // Cancel Payment + { + log.fine("PaymentCancelled " + m_mPayment.getDocumentNo ()); + getGridTab().getTableModel().dataSave(true); + m_mPayment.resetNew(); + m_mPayment.setAmount(m_C_Currency_ID, m_Amount); + } + else + { + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo(); + throw new AdempiereException(processMsg); + } + } + } + } + + // Get Order and optionally Invoice + int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getWindowNo(), "C_Order_ID"); + int C_Invoice_ID = Env.getContextAsInt(Env.getCtx(), getWindowNo(), "C_Invoice_ID"); + if (C_Invoice_ID == 0 && m_DocStatus.equals("CO")) + C_Invoice_ID = getInvoiceID (C_Order_ID); + + // Amount sign negative, if ARC (Credit Memo) or API (AP Invoice) + boolean negateAmt = false; + MInvoice invoice = null; + if (C_Invoice_ID != 0) + { + invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null); + negateAmt = invoice.isCreditMemo(); + } + MOrder order = null; + if (invoice == null && C_Order_ID != 0) + order = new MOrder (Env.getCtx(), C_Order_ID, null); + + BigDecimal payAmount = m_Amount; + + + if (negateAmt) + payAmount = m_Amount.negate(); + // Info + log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt); + + /*********************** + * Payments + */ + m_mPayment.setBankACH(newC_BankAccount_ID, m_isSOTrx, PAYMENTRULE, routing, number); + m_mPayment.setAmount(m_C_Currency_ID, payAmount); + m_mPayment.setC_BPartner_ID(m_C_BPartner_ID); + m_mPayment.setC_Invoice_ID(C_Invoice_ID); + if (order != null) + { + m_mPayment.setC_Order_ID(C_Order_ID); + m_needSave = true; + } + m_mPayment.setDateTrx(m_DateAcct); + m_mPayment.setDateAcct(m_DateAcct); + setCustomizeValues(); + m_mPayment.saveEx(); + + // Save/Post + if (m_mPayment.get_ID() > 0 && MPayment.DOCSTATUS_Drafted.equals(m_mPayment.getDocStatus())) + { + boolean ok = m_mPayment.processIt(DocAction.ACTION_Complete); + m_mPayment.saveEx(); + if (ok) + processMsg = m_mPayment.getDocumentNo(); + else + { + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); + throw new AdempiereException(processMsg); + } + } + else + log.fine("NotDraft " + m_mPayment); + + /********************** + * Save Values to mTab + */ + log.config("Saving changes"); + // Set Payment + if (m_mPayment.getC_Payment_ID() != m_C_Payment_ID) + { + if (m_mPayment.getC_Payment_ID() == 0) + getGridTab().setValue("C_Payment_ID", null); + else + getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); + } + + return true; + } + + public boolean isBankAccountProcessorExist() + { + String tender = PAYMENTRULE.equals(MInvoice.PAYMENTRULE_DirectDebit) ? MPayment.TENDERTYPE_DirectDebit : MPayment.TENDERTYPE_DirectDeposit; + return isBankAccountProcessorExist(Env.getCtx(), tender, "", Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, m_Amount, null); + } + + public MBankAccountProcessor getBankAccountProcessor() + { + String tender = PAYMENTRULE.equals(MInvoice.PAYMENTRULE_DirectDebit) ? MPayment.TENDERTYPE_DirectDebit : MPayment.TENDERTYPE_DirectDeposit; + return getBankAccountProcessor(Env.getCtx(), tender, "", Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, m_Amount, null); + } +} diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDebit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDebit.java deleted file mode 100644 index e8a2409dc0..0000000000 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDebit.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.compiere.grid; - -import org.compiere.model.GridTab; -import org.compiere.model.MInvoice; - -public abstract class PaymentFormDirectDebit extends PaymentFormDirectDeposit { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_DirectDebit; - - public PaymentFormDirectDebit(int WindowNo, GridTab mTab) { - super(WindowNo, mTab); - } -} diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDeposit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDeposit.java deleted file mode 100644 index 25b9d4fec8..0000000000 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDeposit.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.compiere.grid; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.logging.Level; - -import org.compiere.model.GridTab; -import org.compiere.model.MInvoice; -import org.compiere.process.DocAction; -import org.compiere.util.DB; -import org.compiere.util.KeyNamePair; - -public abstract class PaymentFormDirectDeposit extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_DirectDeposit; - - public PaymentFormDirectDeposit(int WindowNo, GridTab mTab) { - super(WindowNo, mTab); - } - - public ArrayList getBankAccountList() { - ArrayList list = new ArrayList(); - - /** - * Load Accounts - */ - String SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||'_'||NVL(a.AccountNo, ' ') AS Acct " - + "FROM C_BP_BankAccount a" - + " LEFT OUTER JOIN C_Bank b ON (a.C_Bank_ID=b.C_Bank_ID) " - + "WHERE C_BPartner_ID=?" - + "AND a.IsActive='Y' AND a.IsACH='Y'"; - try - { - PreparedStatement pstmt = DB.prepareStatement(SQL, null); - pstmt.setInt(1, m_C_BPartner_ID); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - { - int key = rs.getInt(1); - String name = rs.getString(2); - KeyNamePair pp = new KeyNamePair(key, name); - list.add(pp); - } - rs.close(); - pstmt.close(); - } - catch (SQLException eac) - { - log.log(Level.SEVERE, SQL, eac); - } - - return list; - } - - public String processMsg; - public boolean save() - { - processMsg = null; - boolean error = false; - - String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; - - /*********************** - * Changed PaymentRule - */ - if (!PAYMENTRULE.equals(m_PaymentRule)) - { - log.fine("Changed PaymentRule: " + m_PaymentRule + " -> " + PAYMENTRULE); - // We had a change in Payment type (e.g. Check to CC) - if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) != -1 && m_mPaymentOriginal != null) - { - log.fine("Old Payment(1) - " + m_mPaymentOriginal); - m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); - boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); - m_mPaymentOriginal.saveEx(); - if (ok) - log.info( "Payment Canecelled - " + m_mPaymentOriginal); - else - { - processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo(); - error = true; - } - m_mPayment.resetNew(); - } - // We had a Payment and something else (e.g. Check to Cash) - else if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) == -1) - { - log.fine("Old Payment(2) - " + m_mPaymentOriginal); - if (m_mPaymentOriginal != null) - { - m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); - boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); - m_mPaymentOriginal.saveEx(); - if (ok) // Cancel Payment - { - log.fine("PaymentCancelled " + m_mPayment.getDocumentNo ()); - getGridTab().getTableModel().dataSave(true); - m_mPayment.resetNew(); - m_mPayment.setAmount(m_C_Currency_ID, m_Amount); - } - else - { - processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo(); - error = true; - } - } - } - } - /********************** - * Save Values to mTab - */ - log.config("Saving changes"); - // Set Payment - if (m_mPayment.getC_Payment_ID() != m_C_Payment_ID) - { - if (m_mPayment.getC_Payment_ID() == 0) - getGridTab().setValue("C_Payment_ID", null); - else - getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); - } - - return !error; - } -} diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java index aa4876bc3d..9d70429310 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java @@ -1,10 +1,8 @@ package org.compiere.grid; import org.compiere.model.GridTab; -import org.compiere.model.MInvoice; public abstract class PaymentFormMixedPOS extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_MixedPOSPayment; public PaymentFormMixedPOS(int WindowNo, GridTab mTab) { super(WindowNo, mTab); diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java index 16948a745f..0283d467b7 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java @@ -7,13 +7,11 @@ import java.util.ArrayList; import java.util.logging.Level; import org.compiere.model.GridTab; -import org.compiere.model.MInvoice; import org.compiere.model.MRole; import org.compiere.util.DB; import org.compiere.util.KeyNamePair; public abstract class PaymentFormOnCredit extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_OnCredit; /** Start Payment Term */ public int m_C_PaymentTerm_ID = 0; From 9c26a16dccad1f4a2e87613d495f1632bfeaa413 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 19 Oct 2012 17:24:15 +0800 Subject: [PATCH 09/10] IDEMPIERE-392 Redesign payment button - include copyright text --- .../src/org/adempiere/util/PaymentUtil.java | 18 +++++++++++++ .../org/compiere/model/MPaymentLookup.java | 23 ++++++++++++++++ .../org/compiere/grid/VPaymentFormCash.java | 19 ++++++++++++- .../org/compiere/grid/VPaymentFormCheck.java | 18 +++++++++++++ .../compiere/grid/VPaymentFormCreditCard.java | 18 +++++++++++++ .../org/compiere/grid/VPaymentFormDialog.java | 26 ++++++++++++++++-- .../org/compiere/grid/VPaymentFormDirect.java | 18 +++++++++++++ .../grid/VPaymentFormDirectDebit.java | 18 +++++++++++++ .../grid/VPaymentFormDirectDeposit.java | 18 +++++++++++++ .../compiere/grid/VPaymentFormFactory.java | 18 +++++++++++++ .../compiere/grid/VPaymentFormMixedPOS.java | 18 +++++++++++++ .../compiere/grid/VPaymentFormOnCredit.java | 18 +++++++++++++ .../org/compiere/grid/ed/VPaymentEditor.java | 22 +++++++++++++++ .../webui/apps/form/WPaymentFormCash.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormCheck.java | 18 +++++++++++++ .../apps/form/WPaymentFormCreditCard.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormDirect.java | 18 +++++++++++++ .../apps/form/WPaymentFormDirectDebit.java | 18 +++++++++++++ .../apps/form/WPaymentFormDirectDeposit.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormFactory.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormMixedPOS.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormOnCredit.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormWindow.java | 27 +++++++++++++++++-- .../adempiere/webui/component/Paymentbox.java | 22 +++++++++++++++ .../webui/editor/WPaymentEditor.java | 18 +++++++++++++ .../src/org/compiere/grid/IPaymentForm.java | 13 +++++++++ .../src/org/compiere/grid/PaymentForm.java | 18 +++++++++++++ .../org/compiere/grid/PaymentFormCash.java | 18 +++++++++++++ .../org/compiere/grid/PaymentFormCheck.java | 18 +++++++++++++ .../compiere/grid/PaymentFormCreditCard.java | 18 +++++++++++++ .../org/compiere/grid/PaymentFormDirect.java | 18 +++++++++++++ .../compiere/grid/PaymentFormMixedPOS.java | 18 +++++++++++++ .../compiere/grid/PaymentFormOnCredit.java | 18 +++++++++++++ 33 files changed, 615 insertions(+), 5 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java b/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java index d1169736ff..ec362670de 100644 --- a/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java +++ b/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.util; import java.sql.PreparedStatement; @@ -12,6 +25,11 @@ import org.compiere.model.MBPartner; import org.compiere.util.CLogger; import org.compiere.util.DB; +/** + * + * @author Elaine + * + */ public class PaymentUtil { private static final CLogger logger = CLogger.getCLogger(PaymentUtil.class); diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentLookup.java b/org.adempiere.base/src/org/compiere/model/MPaymentLookup.java index 87c5577af9..4e12509385 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentLookup.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentLookup.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.model; import java.io.Serializable; @@ -14,8 +27,18 @@ import org.compiere.util.Env; import org.compiere.util.NamePair; import org.compiere.util.ValueNamePair; +/** + * + * @author Elaine + * + */ public class MPaymentLookup extends Lookup implements Serializable { + /** + * + */ + private static final long serialVersionUID = -6863672221350217533L; + private static final int PAYMENT_RULE_REFERENCE_ID = 195; /** Context */ diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java index 33132e30e1..8f9e6fa340 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.awt.GridBagConstraints; @@ -23,7 +36,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; - +/** + * + * @author Elaine + * + */ public class VPaymentFormCash extends PaymentFormCash implements ActionListener { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java index faa67738a8..3bab2d238a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.awt.Dimension; @@ -27,6 +40,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListener, FocusListener { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java index 5032e3137f..e802579d8f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.awt.Dimension; @@ -23,6 +36,11 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; +/** + * + * @author Elaine + * + */ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements ActionListener, FocusListener { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDialog.java index ac4cb2fdd9..bcbc37b4c9 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDialog.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.awt.BorderLayout; @@ -15,10 +28,19 @@ import org.compiere.swing.CPanel; import org.compiere.util.Env; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public class VPaymentFormDialog extends CDialog implements ActionListener { + /** + * + */ + private static final long serialVersionUID = 6249016140530436885L; private PaymentForm paymentForm; - private int windowNo; +// private int windowNo; private CPanel mainPanel = new CPanel(); private BorderLayout mainLayout = new BorderLayout(); @@ -32,7 +54,7 @@ public class VPaymentFormDialog extends CDialog implements ActionListener super(AEnv.getWindow(windowNo), Msg.getMsg(Env.getCtx(), "Payment"), true); this.paymentForm = paymentForm; - this.windowNo = windowNo; +// this.windowNo = windowNo; try { jbInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java index 2cf578c3bb..9613251430 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.awt.GridBagConstraints; @@ -19,6 +32,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public abstract class VPaymentFormDirect extends PaymentFormDirect implements ActionListener { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java index cd99b2b926..f8360f529b 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class VPaymentFormDirectDebit extends VPaymentFormDirect { public VPaymentFormDirectDebit(int windowNo, GridTab mTab) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java index 3dc918af14..68092ed142 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class VPaymentFormDirectDeposit extends VPaymentFormDirect { public VPaymentFormDirectDeposit(int windowNo, GridTab mTab) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java index c89215c2a5..3f9c0a9fc5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.util.HashMap; @@ -7,6 +20,11 @@ import org.compiere.model.GridTab; import org.compiere.model.MInvoice; import org.compiere.util.CLogger; +/** + * + * @author Elaine + * + */ public class VPaymentFormFactory { /** Static Logger */ private static CLogger s_log = CLogger.getCLogger (VPaymentFormFactory.class); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java index d64924f207..7ad7c2a286 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class VPaymentFormMixedPOS extends PaymentFormMixedPOS { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java index bdefc9df47..5a37bc165a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.awt.GridBagConstraints; @@ -12,6 +25,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public class VPaymentFormOnCredit extends PaymentFormOnCredit { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java index 71e0d5b056..957fd8fec2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid.ed; import java.awt.BorderLayout; @@ -27,8 +40,17 @@ import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.NamePair; +/** + * + * @author Elaine + * + */ public class VPaymentEditor extends JComponent implements VEditor, ActionListener, FocusListener { + /** + * + */ + private static final long serialVersionUID = -1840246214698245287L; /** Logger */ private static CLogger log = CLogger.getCLogger(VPaymentEditor.class); /** Search: The Button to open Editor */ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java index 7d9f6893ca..c2f011a98a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.math.BigDecimal; @@ -28,6 +41,11 @@ import org.compiere.util.Msg; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +/** + * + * @author Elaine + * + */ public class WPaymentFormCash extends PaymentFormCash implements EventListener { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java index 4882849254..836a008322 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.math.BigDecimal; @@ -35,6 +48,11 @@ import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Space; +/** + * + * @author Elaine + * + */ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java index f91bc6111a..808a921d8d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.math.BigDecimal; @@ -32,6 +45,11 @@ import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Space; +/** + * + * @author Elaine + * + */ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements EventListener { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java index e121e747fe..1466f90223 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.util.ArrayList; @@ -29,6 +42,11 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Space; +/** + * + * @author Elaine + * + */ public abstract class WPaymentFormDirect extends PaymentFormDirect implements EventListener { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java index 0567756c04..e2618d7329 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class WPaymentFormDirectDebit extends WPaymentFormDirect { public WPaymentFormDirectDebit(int windowNo, GridTab mTab) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java index 9ef79d9d3c..1d3345fde9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class WPaymentFormDirectDeposit extends WPaymentFormDirect { public WPaymentFormDirectDeposit(int windowNo, GridTab mTab) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java index 3831441d00..be1ba65e52 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.util.HashMap; @@ -8,6 +21,11 @@ import org.compiere.model.GridTab; import org.compiere.model.MInvoice; import org.compiere.util.CLogger; +/** + * + * @author Elaine + * + */ public class WPaymentFormFactory { /** Static Logger */ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java index ef09dfc5da..fafcd5d55a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java @@ -1,8 +1,26 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import org.compiere.grid.PaymentFormMixedPOS; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class WPaymentFormMixedPOS extends PaymentFormMixedPOS { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java index 4318ba204e..d097837818 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.util.ArrayList; @@ -18,6 +31,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public class WPaymentFormOnCredit extends PaymentFormOnCredit { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java index 17575017ba..17e0afcfab 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import org.adempiere.webui.apps.BusyDialog; @@ -15,10 +28,20 @@ import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Center; import org.zkoss.zul.South; +/** + * + * @author Elaine + * + */ public class WPaymentFormWindow extends Window implements EventListener, DialogEvents { + /** + * + */ + private static final long serialVersionUID = 2710316463655831868L; + private PaymentForm paymentForm; - private int windowNo; +// private int windowNo; private Panel mainPanel = new Panel(); private Panel centerPanel = new Panel(); @@ -34,7 +57,7 @@ public class WPaymentFormWindow extends Window implements EventListener, super(); this.paymentForm = paymentForm; - this.windowNo = windowNo; +// this.windowNo = windowNo; try { zkInit(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java index 1f9d1ffbc4..5301b3071e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.component; import java.beans.PropertyChangeListener; @@ -10,8 +23,17 @@ import org.zkoss.zul.Comboitem; import org.zkoss.zul.Div; import org.zkoss.zul.Hlayout; +/** + * + * @author Elaine + * + */ public class Paymentbox extends Div { + /** + * + */ + private static final long serialVersionUID = 1807586169091171780L; protected PropertyChangeSupport m_propertyChangeListeners = new PropertyChangeSupport(this); protected Combobox combo; protected Button btn; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java index 55d7b38141..09c3ad1778 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.adempiere.webui.editor; import javax.swing.event.ListDataListener; @@ -25,6 +38,11 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Comboitem; +/** + * + * @author Elaine + * + */ public class WPaymentEditor extends WEditor implements ListDataListener { public final static String ON_SAVE_PAYMENT = "onSavePayment"; diff --git a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java index 8d56650c21..8fa848b10c 100644 --- a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.MBankAccountProcessor; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java index d5e1d290f8..89a04cda80 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -24,6 +37,11 @@ import org.compiere.util.Msg; import org.compiere.util.Trx; import org.compiere.util.TrxRunnable; +/** + * + * @author Elaine + * + */ public abstract class PaymentForm implements IPaymentForm { /** Logger */ diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java index 6f27b1bdca..305b03660b 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -24,6 +37,11 @@ import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; import org.compiere.util.TimeUtil; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormCash extends PaymentForm { private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Cash; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java index 88c5882a10..71aa19d29b 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -20,6 +33,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormCheck extends PaymentForm { private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Check; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java index 721a0a6b2d..a7b5e93839 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -13,6 +26,11 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormCreditCard extends PaymentForm { private final String PAYMENTRULE = MInvoice.PAYMENTRULE_CreditCard; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java index c845a475e9..8d00b6d017 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -19,6 +32,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormDirect extends PaymentForm { private String PAYMENTRULE; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java index 9d70429310..9e86d71fb4 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormMixedPOS extends PaymentForm { public PaymentFormMixedPOS(int WindowNo, GridTab mTab) { diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java index 0283d467b7..99ce09bbc6 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ package org.compiere.grid; import java.sql.PreparedStatement; @@ -11,6 +24,11 @@ import org.compiere.model.MRole; import org.compiere.util.DB; import org.compiere.util.KeyNamePair; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormOnCredit extends PaymentForm { /** Start Payment Term */ From 61b327991aa0cdd774457d50774b59369477d884 Mon Sep 17 00:00:00 2001 From: Deepak Pansheriya Date: Fri, 19 Oct 2012 15:18:31 +0530 Subject: [PATCH 10/10] IDEMPIERE-293 : Adding AD_User_ID and making window to show session from all org. --- db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql | 5 +- .../postgresql/views/AD_SESSIONINFO_V.sql | 5 +- .../oracle/935_IDEMPIERE-293.sql | 405 +++++++++++++++++- .../postgresql/935_IDEMPIERE-293.sql | 399 ++++++++++++++++- 4 files changed, 804 insertions(+), 10 deletions(-) diff --git a/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql b/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql index 24346cf159..b70cc7a9cc 100644 --- a/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql +++ b/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql @@ -1,7 +1,8 @@ CREATE OR REPLACE VIEW ad_sessioninfo_v AS - SELECT s.ad_session_id,0 ad_client_id, s.ad_org_id, s.isactive, + SELECT s.ad_session_id,0 as ad_client_id,0 as ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.websession, s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, - s.servername, s.ad_client_id AS login_client_id + s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id, + s.ad_session_uu as ad_sessioninfo_v_uu FROM ad_session s WHERE s.processed = 'N'; \ No newline at end of file diff --git a/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql b/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql index adc0895cdd..6d1c6ee2c8 100644 --- a/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql +++ b/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql @@ -1,7 +1,8 @@ CREATE OR REPLACE VIEW ad_sessioninfo_v AS - SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, s.ad_org_id, s.isactive, + SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, 0::numeric(10,0) AS ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.websession, s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, - s.servername, s.ad_client_id AS login_client_id + s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id, + s.ad_session_uu as ad_sessioninfo_v_uu FROM ad_session s WHERE s.processed = 'N'::bpchar; \ No newline at end of file diff --git a/migration/360lts-release/oracle/935_IDEMPIERE-293.sql b/migration/360lts-release/oracle/935_IDEMPIERE-293.sql index 15891a3f94..4b1a7d5100 100644 --- a/migration/360lts-release/oracle/935_IDEMPIERE-293.sql +++ b/migration/360lts-release/oracle/935_IDEMPIERE-293.sql @@ -1,8 +1,9 @@ CREATE OR REPLACE VIEW ad_sessioninfo_v AS - SELECT s.ad_session_id,0 ad_client_id, s.ad_org_id, s.isactive, + SELECT s.ad_session_id,0 as ad_client_id,0 as ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.websession, s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, - s.servername, s.ad_client_id AS login_client_id + s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id, + s.ad_session_uu as ad_sessioninfo_v_uu FROM ad_session s WHERE s.processed = 'N'; @@ -180,7 +181,7 @@ INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Clien -- Oct 11, 2012 6:13:32 PM PDT -- IDEMPIERE-293-List of logged users -INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',1000006,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',200182,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- Oct 11, 2012 6:13:32 PM PDT @@ -804,6 +805,404 @@ DELETE FROM AD_Reference_Trl WHERE AD_Reference_ID=200013 DELETE FROM AD_Reference WHERE AD_Reference_ID=200013 ; +-- Oct 19, 2012 1:35:06 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200705,'D','N','N','N','N',10,'N',19,'N',138,'f1336921-57f1-4fe8-8c12-543d2b4a49bf','N','N','N','AD_User_ID','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','User/Contact',100,TO_DATE('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 1:35:07 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200705 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 1:40:53 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('login_org_id',200189,'D','login_org_id','login_org_id','a5353900-dd61-4d08-8a16-ff00125c61cd',0,TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 1:40:53 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200189 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 1:40:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200706,'D','N','N','N','N',10,'N',19,'N',200189,'f6a3b130-de25-4cbd-802f-560435d2cbab','N','N','N','login_org_id','login_org_id',100,TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 1:40:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200706 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Login Org', PrintName='Login Org',Updated=TO_DATE('2012-10-19 13:44:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL, AD_Element_ID=200189 WHERE UPPER(ColumnName)='LOGIN_ORG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Login Org', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200189) AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:03 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem pi SET PrintName='Login Org', Name='Login Org' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200189) +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Loing Client', PrintName='Loing Client',Updated=TO_DATE('2012-10-19 13:44:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL, AD_Element_ID=200186 WHERE UPPER(ColumnName)='LOGIN_CLIENT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200186) AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem pi SET PrintName='Loing Client', Name='Loing Client' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200186) +; + +-- Oct 19, 2012 1:46:13 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET IsKey='Y', IsUpdateable='N', IsAllowCopy='N',Updated=TO_DATE('2012-10-19 13:46:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588 +; + +-- Oct 19, 2012 1:46:39 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200706,'Y',200650,'N','D','Login Org','N','Y','b40af732-2db2-4cac-aa21-1149a50b106b',100,0,TO_DATE('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 1:46:39 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200650 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 1:46:40 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200705,'Y',200651,'N','The User identifies a unique user in the system. This could be an internal user or a business partner contact','D','User within the system - Internal or Business Partner Contact','User/Contact','N','Y','4dc92524-ada7-4797-9501-54e662606e48',100,0,TO_DATE('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 1:46:40 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200651 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200606 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200608 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=200647 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200608 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + + + + +-- Oct 19, 2012 2:02:21 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_DATE('2012-10-19 14:02:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 2:04:08 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=276, AD_Reference_ID=18,Updated=TO_DATE('2012-10-19 14:04:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:04:49 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=130,Updated=TO_DATE('2012-10-19 14:04:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:05:16 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=276,Updated=TO_DATE('2012-10-19 14:05:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:10:54 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_SessionInfo_v_ID',200190,'D','AD_SessionInfo_v','AD_SessionInfo_v','388c863c-f3a7-4645-8591-6e1604e725e8',0,TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 2:10:54 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200190 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:10:55 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200707,'D','N','N','N','N',10,'N',13,'Y',200190,'49302e65-9959-4cd4-8604-bc83ca508df0','N','N','N','AD_SessionInfo_v_ID','AD_SessionInfo_v',100,TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 2:10:55 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200707 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:12:49 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid) VALUES ('N',200025,10,'N','N',200707,'Y',200652,'N','D','AD_SessionInfo_v','N','N','d5552148-760e-4df8-a701-1c768670718f',100,0,TO_DATE('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),'Y','N') +; + +-- Oct 19, 2012 2:12:49 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200652 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('ad_sessioninfo_v_uu',200191,'D','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu','c84d427a-3b7b-479a-82e2-7dd40d061ff6',0,TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200191 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200708,'D','N','N','N','N',36,'N',10,'N',200191,'2aeb7648-a543-4a73-af45-87b3b6096a1a','N','N','N','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu',100,TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200708 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:33:58 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,36,'N','N',200708,'Y',200653,'N','D','ad_sessioninfo_v_uu','N','Y','008aae2b-0106-44a8-a6a1-bbec08dba31a',100,0,TO_DATE('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 2:33:58 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200653 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:34:16 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200653 +; + SELECT register_migration_script('935_IDEMPIERE-293.sql') FROM dual diff --git a/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql b/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql index abdd1dbe48..e5c9a2c69a 100644 --- a/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql +++ b/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql @@ -1,8 +1,9 @@ CREATE OR REPLACE VIEW ad_sessioninfo_v AS - SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, s.ad_org_id, s.isactive, + SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, 0::numeric(10,0) AS ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.websession, s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, - s.servername, s.ad_client_id AS login_client_id + s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id, + s.ad_session_uu as ad_sessioninfo_v_uu FROM ad_session s WHERE s.processed = 'N'::bpchar; @@ -180,7 +181,7 @@ INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Clien -- Oct 11, 2012 6:13:32 PM PDT -- IDEMPIERE-293-List of logged users -INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',1000006,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',200182,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- Oct 11, 2012 6:13:32 PM PDT @@ -805,7 +806,399 @@ DELETE FROM AD_Reference_Trl WHERE AD_Reference_ID=200013 DELETE FROM AD_Reference WHERE AD_Reference_ID=200013 ; +-- Oct 19, 2012 1:35:06 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200705,'D','N','N','N','N',10,'N',19,'N',138,'f1336921-57f1-4fe8-8c12-543d2b4a49bf','N','N','N','AD_User_ID','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','User/Contact',100,TO_TIMESTAMP('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),100,0) +; +-- Oct 19, 2012 1:35:07 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200705 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 1:40:53 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('login_org_id',200189,'D','login_org_id','login_org_id','a5353900-dd61-4d08-8a16-ff00125c61cd',0,TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 1:40:53 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200189 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 1:40:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200706,'D','N','N','N','N',10,'N',19,'N',200189,'f6a3b130-de25-4cbd-802f-560435d2cbab','N','N','N','login_org_id','login_org_id',100,TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 1:40:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200706 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Login Org', PrintName='Login Org',Updated=TO_TIMESTAMP('2012-10-19 13:44:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL, AD_Element_ID=200189 WHERE UPPER(ColumnName)='LOGIN_ORG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Login Org', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200189) AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:03 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem SET PrintName='Login Org', Name='Login Org' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200189) +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Loing Client', PrintName='Loing Client',Updated=TO_TIMESTAMP('2012-10-19 13:44:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL, AD_Element_ID=200186 WHERE UPPER(ColumnName)='LOGIN_CLIENT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200186) AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem SET PrintName='Loing Client', Name='Loing Client' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200186) +; + +-- Oct 19, 2012 1:46:13 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET IsKey='Y', IsUpdateable='N', IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-10-19 13:46:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588 +; + +-- Oct 19, 2012 1:46:39 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200706,'Y',200650,'N','D','Login Org','N','Y','b40af732-2db2-4cac-aa21-1149a50b106b',100,0,TO_TIMESTAMP('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 1:46:39 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200650 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 1:46:40 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200705,'Y',200651,'N','The User identifies a unique user in the system. This could be an internal user or a business partner contact','D','User within the system - Internal or Business Partner Contact','User/Contact','N','Y','4dc92524-ada7-4797-9501-54e662606e48',100,0,TO_TIMESTAMP('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 1:46:40 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200651 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200606 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200608 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=200647 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200608 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 2:02:21 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-19 14:02:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 2:04:08 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=276, AD_Reference_ID=18,Updated=TO_TIMESTAMP('2012-10-19 14:04:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:04:49 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=130,Updated=TO_TIMESTAMP('2012-10-19 14:04:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:05:16 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=276,Updated=TO_TIMESTAMP('2012-10-19 14:05:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:10:54 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_SessionInfo_v_ID',200190,'D','AD_SessionInfo_v','AD_SessionInfo_v','388c863c-f3a7-4645-8591-6e1604e725e8',0,TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 2:10:54 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200190 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:10:55 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200707,'D','N','N','N','N',10,'N',13,'Y',200190,'49302e65-9959-4cd4-8604-bc83ca508df0','N','N','N','AD_SessionInfo_v_ID','AD_SessionInfo_v',100,TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 2:10:55 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200707 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:12:49 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid) VALUES ('N',200025,10,'N','N',200707,'Y',200652,'N','D','AD_SessionInfo_v','N','N','d5552148-760e-4df8-a701-1c768670718f',100,0,TO_TIMESTAMP('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),'Y','N') +; + +-- Oct 19, 2012 2:12:49 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200652 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('ad_sessioninfo_v_uu',200191,'D','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu','c84d427a-3b7b-479a-82e2-7dd40d061ff6',0,TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200191 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200708,'D','N','N','N','N',36,'N',10,'N',200191,'2aeb7648-a543-4a73-af45-87b3b6096a1a','N','N','N','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu',100,TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200708 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:33:58 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,36,'N','N',200708,'Y',200653,'N','D','ad_sessioninfo_v_uu','N','Y','008aae2b-0106-44a8-a6a1-bbec08dba31a',100,0,TO_TIMESTAMP('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 2:33:58 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200653 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:34:16 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200653 SELECT register_migration_script('935_IDEMPIERE-293.sql') FROM dual ;