📄 mpayment.java
字号:
{
return (String)getValue("R_AuthCode");
}
void setR_AuthCode (String R_AuthCode)
{
setValueNoCheck ("R_AuthCode", R_AuthCode);
}
public String getR_AvsAddr()
{
return (String)getValue("R_AvsAddr");
}
void setR_AvsAddr (String R_AvsAddr)
{
setValueNoCheck ("R_AvsAddr", R_AvsAddr);
}
public String getR_AvsZip()
{
return (String)getValue("R_AvsZip");
}
void setR_AvsZip (String R_AvsZip)
{
setValueNoCheck ("R_AvsZip", R_AvsZip);
}
/**
* Set BPartner Bank Account No
* @param C_BP_BankAccount_ID BP_BankAccount
*/
public void setC_BP_BankAccount_ID (int C_BP_BankAccount_ID)
{
setValue("C_BP_BankAccount_ID", new Integer(C_BP_BankAccount_ID));
} // setC_BP_BankAccount_ID
/**
* Get BP_BankAccount
* @return C_BP_BankAccount_ID
*/
public int getC_BP_BankAccount_ID()
{
Integer ii = (Integer)getValue("C_BP_BankAccount_ID");
if (ii == null)
return 0;
return ii.intValue();
} // getC_BP_BankAccount_ID
/**
* Set Currency
* @param C_Currency_ID Currency_ID
*/
public void setC_Currency_ID (int C_Currency_ID)
{
setValue ("C_Currency_ID", new Integer(C_Currency_ID));
} // setC_Currency_ID
/**
* Get Currency
* @return C_Currency_ID
*/
public int getC_Currency_ID()
{
Integer ii = (Integer)getValue("C_Currency_ID");
if (ii == null)
return 0;
return ii.intValue();
} // getC_Currency_ID
/**
* Get PaymentBatch
* @return C_PaymentBatch_ID
*/
public int getC_PaymentBatch_ID()
{
Integer ii = (Integer)getValue("C_PaymentBatch_ID");
if (ii == null)
return 0;
return ii.intValue();
} // getC_PaymentBatch_ID
/**
* Set Payment Amount
* @param PayAmt Pay Amt
*/
public void setPayAmt (BigDecimal PayAmt)
{
setValue ("PayAmt", PayAmt == null ? Env.ZERO : PayAmt);
}
public BigDecimal getPayAmt()
{
BigDecimal bd = (BigDecimal)getValue ("PayAmt");
if (bd == null)
return Env.ZERO;
return bd;
}
/**
* Set Payment Amount
*
* @param C_Currency_ID currency
* @param payAmt amount
*/
public void setAmount (int C_Currency_ID, BigDecimal payAmt)
{
setC_Currency_ID(C_Currency_ID);
setPayAmt(payAmt);
} // setAmount
/**
* Discount Amt
* @param DiscountAmt Discount
*/
public void setDiscountAmt (BigDecimal DiscountAmt)
{
setValue ("DiscountAmt", DiscountAmt == null ? Env.ZERO : DiscountAmt);
}
public BigDecimal getDiscountAmt()
{
BigDecimal bd = (BigDecimal)getValue("DiscountAmt");
if (bd == null)
return Env.ZERO;
return bd;
}
/**
* WriteOff Amt
* @param WriteOffAmt WriteOff
*/
public void setWriteOffAmt (BigDecimal WriteOffAmt)
{
setValue ("WriteOffAmt", WriteOffAmt == null ? Env.ZERO : WriteOffAmt);
}
public BigDecimal getWriteOffAmt()
{
BigDecimal bd = (BigDecimal)getValue("WriteOffAmt");
if (bd == null)
return Env.ZERO;
return bd;
}
/**
* OverUnder Amt
* @param OverUnderAmt OverUnder
*/
public void setOverUnderAmt (BigDecimal OverUnderAmt)
{
setValue ("OverUnderAmt", OverUnderAmt == null ? Env.ZERO : OverUnderAmt);
}
public BigDecimal getOverUnderAmt()
{
BigDecimal bd = (BigDecimal)getValue("OverUnderAmt");
if (bd == null)
return Env.ZERO;
return bd;
}
/**
* Tax Amt
* @param TaxAmt Tax
*/
public void setTaxAmt (BigDecimal TaxAmt)
{
setValue ("TaxAmt", TaxAmt == null ? Env.ZERO : TaxAmt);
}
public BigDecimal getTaxAmt()
{
BigDecimal bd = (BigDecimal)getValue("TaxAmt");
if (bd == null)
return Env.ZERO;
return bd;
}
/**
* Invoice
* @param C_Invoice_ID invoice
*/
public void setC_Invoice_ID (int C_Invoice_ID)
{
setValue("C_Invoice_ID", new Integer(C_Invoice_ID));
} // setC_Invoice_ID
/**
* Invoice
* @return C_Invoice_ID
*/
public int getC_Invoice_ID()
{
Integer ii = (Integer)getValue("C_Invoice_ID");
if (ii == null)
return 0;
return ii.intValue();
} // getC_Invoice_ID
/**
* C_Partner_ID
* @param C_BPartner_ID partner
*/
public void setC_BPartner_ID (int C_BPartner_ID)
{
setValue ("C_BPartner_ID", new Integer(C_BPartner_ID));
} // setC_BPartner_ID
/**
* Get BPartner
* @return C_BPartner_ID
*/
public int getC_BPartner_ID()
{
Integer ii = (Integer)getValue("C_BPartner_ID");
if (ii == null)
return 0;
return ii.intValue();
} // getC_BPartner_ID
/**
* Set Info from BP Bank Account
* @param ba BP bank account
*/
public void setBP_BankAccount (MBP_BankAccount ba)
{
log.debug("setBP_BankAccount - " + ba);
if (ba == null)
return;
setC_BPartner_ID(ba.getC_BPartner_ID());
setAccountAddress(ba.getA_Name(), ba.getA_Street(), ba.getA_City(),
ba.getA_State(), ba.getA_Zip(), ba.getA_Country());
setA_EMail(ba.getA_EMail());
setA_Ident_DL(ba.getA_Ident_DL());
setA_Ident_SSN(ba.getA_Ident_SSN());
// CC
setCreditCardType(ba.getCreditCardType());
setCreditCardNumber(ba.getCreditCardNumber());
setCreditCardExpMM(ba.getCreditCardExpMM());
setCreditCardExpYY(ba.getCreditCardExpYY());
setCreditCardVV(ba.getCreditCardVV());
// Bank
setBankAccountNo(ba.getAccountNo());
setBankRoutingNo(ba.getRoutingNo());
} // setBP_BankAccount
/**
* Save Info from BP Bank Account
* @param ba BP bank account
* @return true if saved
*/
public boolean saveToBP_BankAccount (MBP_BankAccount ba)
{
if (ba == null)
return false;
ba.setA_Name(getA_Name());
ba.setA_Street(getA_Street());
ba.setA_City(getA_City());
ba.setA_State(getA_State());
ba.setA_Zip(getA_Zip());
ba.setA_Country(getA_Country());
ba.setA_EMail(getA_EMail());
ba.setA_Ident_DL(getA_Ident_DL());
ba.setA_Ident_SSN(getA_Ident_SSN());
// CC
ba.setCreditCardType(getCreditCardType());
ba.setCreditCardNumber(getCreditCardNumber());
ba.setCreditCardExpMM(getCreditCardExpMM());
ba.setCreditCardExpYY(getCreditCardExpYY());
ba.setCreditCardVV(getCreditCardVV());
// Bank
ba.setAccountNo(getBankAccountNo());
ba.setRoutingNo(getBankRoutingNo());
// Trx
ba.setR_AvsAddr(getR_AvsAddr());
ba.setR_AvsZip(getR_AvsZip());
//
boolean ok = ba.save();
log.debug("saveToBP_BankAccount - " + ba);
return ok;
} // setBP_BankAccount
/**
* Set Doc Type
* @param C_DocType_ID DocType_ID
*/
public void setC_DocType_ID (int C_DocType_ID)
{
setValue("C_DocType_ID", new Integer(C_DocType_ID));
} // setC_DocType_ID
/**
* Set Doc Type bases on IsReceipt
*/
private void setC_DocType_ID ()
{
setC_DocType_ID(isReceipt());
} // setC_DocType_ID
/**
* Set Doc Type
* @param isReceipt is receipt
*/
public void setC_DocType_ID (boolean isReceipt)
{
setReceipt(isReceipt);
String sql = "SELECT C_DocType_ID FROM C_DocType WHERE AD_Client_ID=? AND DocBaseType=?";
try
{
PreparedStatement pstmt = DB.prepareStatement(sql);
pstmt.setInt(1, getAD_Client_ID());
if (isReceipt)
pstmt.setString(2, "ARR");
else
pstmt.setString(2, "APP");
ResultSet rs = pstmt.executeQuery();
if (rs.next())
setC_DocType_ID(rs.getInt(1));
else
log.warn ("setDocType - NOT found - isReceipt=" + isReceipt);
rs.close();
pstmt.close();
}
catch (SQLException e)
{
log.error("setDocType", e);
}
} // setC_DocType_ID
/**
* Get Document Type
* @return C_DocType_ID
*/
public int getC_DocType_ID()
{
Integer ii = (Integer)getValue("C_DocType_ID");
if (ii == null)
return 0;
return ii.intValue();
} // getC_DocType_ID
/**
* Set Doc Status
* @param DocStatus status
*/
public void setDocStatus (String DocStatus)
{
setValueNoCheck("DocStatus", DocStatus);
}
public String getDocStatus()
{
return (String)getValue("DocStatus");
}
/**
* Set Doc Action
* @param DocAction action
*/
public void setDocAction (String DocAction)
{
setValue("DocAction", DocAction);
}
public String getDocAction()
{
return (String)getValue("DocAction");
}
/**
* Is Receipt
* @return true if receipt
*/
public boolean isReceipt()
{
Boolean bb = (Boolean)getValue("IsReceipt");
if (bb == null)
return false;
return bb.booleanValue();
} // isReceipt
/**
* Set Receipt
* @param receipt true if receipt
*/
public void setReceipt (boolean receipt)
{
setValue("IsReceipt", new Boolean (receipt));
} // setReceipt
/**
* Processed
* @return true if processed
*/
public boolean isProcessed()
{
Boolean bb = (Boolean)getValue("Processed");
if (bb == null)
return false;
return bb.booleanValue();
} // isProcessed
void setProcessed (boolean processed)
{
setValueNoCheck("Processed", new Boolean (processed));
} // setReceipt
/**
* Posted
* @return true if posted
*/
public boolean isPosted()
{
Boolean bb = (Boolean)getValue("Posted");
if (bb == null)
return false;
return bb.booleanValue();
} // isPosted
void setPosted (boolean posted)
{
setValueNoCheck("Posted", new Boolean(posted));
} // setPosted
/**
* Reconciled
* @return true if reconciled
*/
public boolean isReconciled()
{
Boolean bb = (Boolean)getValue("IsReconciled");
if (bb == null)
return false;
return bb.booleanValue();
} // isReconciled
void setReconciled (boolean reconciled)
{
setValueNoCheck("IsReconciled", new Boolean (reconciled));
} // setReceipt
/**
* Is it online approved?
* @return true if approved
*/
public boolean isApproved()
{
Boolean bb = (Boolean)getValue("IsApproved");
if (bb == null)
return false;
return bb.booleanValue();
} // isApproved
void setApproved (boolean approved)
{
setValueNoCheck("IsApproved", new Boolean (approved));
} // setReceipt
/**
* Is it online ?
* @return true if online
*/
public boolean isOnline()
{
Boolean bb = (Boolean)getValue("IsOnline");
if (bb == null)
return false;
return bb.booleanValue();
} // isOnline
public void setOnline (boolean online)
{
setValue("IsOnline", new Boolean (online));
} // setReceipt
/**
* Is it allocated?
* @return true if allocated
*/
public boolean isAllocated()
{
Boolean bb = (Boolean)getValue("IsAllocated");
if (bb == null)
return false;
return bb.booleanValue();
} // isAllocated
void setAllocated (boolean allocated)
{
setValueNoCheck("IsAllocated", new Boolean (allocated));
} // setReceipt
/**
* Is it over/under payment
* @return true if uner/over payment
*/
public boolean isOverUnderPayment()
{
Boolean bb = (Boolean)getValue("IsOverUnderPayment");
if (bb == null)
return false;
return bb.booleanValue();
} // isOverUnderPayment
public void setOverUnderPayment (boolean overUnderPayment)
{
setValue("IsOverUnderPayment", new Boolean (overUnderPayment));
} // setReceipt
/*************************************************************************/
/**
* Check Numeric
* @param data input
* @return the digits of the data - ignore the rest
*/
public static String checkNumeric (String data)
{
if (data == null || data.length() == 0)
return "";
// Remove all non Digits
StringBuffer sb = new StringBuffer();
for (int i = 0; i < data.length(); i++)
{
if (Character.isDigit(data.charAt(i)))
sb.append(data.charAt(i));
}
return sb.toString();
} // checkNumeric
} // MPayment
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -