Adempiere 3.1.2 + marekmosiewicz , hengsin

This commit is contained in:
vpj-cd 2006-12-07 23:07:46 +00:00
parent 0c7b34ddd3
commit dee6003f14
3 changed files with 1370 additions and 1331 deletions

View File

@ -622,6 +622,7 @@ public class VPaySelect extends CPanel
//
ff.pack();
this.setVisible(false);
AEnv.addToWindowManager(ff);
AEnv.showCenterScreen(ff);
this.dispose();
} // unlockUI

View File

@ -193,8 +193,13 @@ public class VPayment extends CDialog
private CLabel bCashBookLabel = new CLabel();
private CComboBox bCashBookCombo = new CComboBox();
private GridBagLayout tPanelLayout = new GridBagLayout();
private CButton tOnline = new CButton();
private CLabel kStatus = new CLabel();
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();
private CLabel sStatus = new CLabel();
/**
@ -252,6 +257,11 @@ public class VPayment extends CDialog
// DircetDebit/Credit
tPanel.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(" ");
centerPanel.add(tPanel, "tPanel");
centerLayout.addLayoutComponent(tPanel, "tPanel");
@ -259,8 +269,18 @@ public class VPayment extends CDialog
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0));
tPanel.add(tAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
tPanel.add(tRoutingField, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
tPanel.add(tNumberField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
tPanel.add(tStatus, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
tPanel.add(tRoutingText, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0));
tPanel.add(tNumberText, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0));
tPanel.add(tOnline, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
//
sPanel.setLayout(sPanelLayout);
sBankAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID"));
@ -442,6 +462,8 @@ public class VPayment extends CDialog
sCheckField.setText(m_mPayment.getCheckNo());
sStatus.setText(m_mPayment.getR_PnRef());
// Transfer
tRoutingField.setText(m_mPayment.getRoutingNo());
tNumberField.setText(m_mPayment.getAccountNo());
tStatus.setText(m_mPayment.getR_PnRef());
}
}
@ -514,6 +536,7 @@ public class VPayment extends CDialog
else if (X_C_Order.PAYMENTRULE_DirectDeposit.equals(PaymentRule) // PO
&& m_isSOTrx)
continue;
ValueNamePair pp = new ValueNamePair(PaymentRule, (String)values.get(a[i]));
paymentCombo.addItem(pp);
if (PaymentRule.toString().equals(m_PaymentRule)) // to select
@ -1020,6 +1043,12 @@ public class VPayment extends CDialog
kNumberField.getText(), "", kExpField.getText());
m_mPayment.setPaymentProcessor();
}
else if (newPaymentRule.equals(MOrder.PAYMENTRULE_DirectDeposit)
|| newPaymentRule.equals(MOrder.PAYMENTRULE_DirectDebit))
{
m_mPayment.setBankACH(newC_BankAccount_ID, m_isSOTrx, newPaymentRule,
tRoutingField.getText(), tNumberField.getText());
}
else if (newPaymentRule.equals(MOrder.PAYMENTRULE_Check))
{
m_mPayment.setBankCheck(newC_BankAccount_ID, m_isSOTrx, sRoutingField.getText(),
@ -1154,6 +1183,7 @@ public class VPayment extends CDialog
{
KeyNamePair bpba = (KeyNamePair)tAccountCombo.getSelectedItem();
if (bpba == null)
{
tAccountCombo.setBackground(AdempierePLAF.getFieldBackground_Error());
ADialog.error(m_WindowNo, this, "PaymentBPBankNotFound");

View File

@ -894,7 +894,7 @@ public class CConnection implements Serializable
} // isPostgreSQL
//end
/**
* Is PostgreSQL DB
* Is Fyracle DB
* @return true if PostgreSQL
*/
public boolean isFyracle ()
@ -1224,7 +1224,15 @@ public class CConnection implements Serializable
{
try
{
m_db = Database.getDatabase(m_type);
for (int i = 0; i < Database.DB_NAMES.length; i++)
{
if (Database.DB_NAMES[i].equals (m_type))
{
m_db = (AdempiereDatabase)Database.DB_CLASSES[i].
newInstance ();
break;
}
}
}
catch (Exception e)
{