IDEMPIERE-4723 - Clean up code -> MI/MPa classes (#793)
This commit is contained in:
parent
298dbab9d0
commit
02d5263742
|
@ -60,7 +60,6 @@ public class MIMPProcessor
|
||||||
super(ctx, EXP_ReplicationProcessor_ID, trxName);
|
super(ctx, EXP_ReplicationProcessor_ID, trxName);
|
||||||
if (EXP_ReplicationProcessor_ID == 0)
|
if (EXP_ReplicationProcessor_ID == 0)
|
||||||
{
|
{
|
||||||
//setValue (/*client.getName() + " - " +*/ "Default Import Processor");
|
|
||||||
setName (/*client.getName() + " - " +*/ "Default Import Processor");
|
setName (/*client.getName() + " - " +*/ "Default Import Processor");
|
||||||
setFrequencyType (FREQUENCYTYPE_Hour);
|
setFrequencyType (FREQUENCYTYPE_Hour);
|
||||||
setFrequency (1);
|
setFrequency (1);
|
||||||
|
@ -147,7 +146,6 @@ public class MIMPProcessor
|
||||||
.append(" FROM ").append(X_IMP_ProcessorParameter.Table_Name)
|
.append(" FROM ").append(X_IMP_ProcessorParameter.Table_Name)
|
||||||
.append(" WHERE ").append(X_IMP_ProcessorParameter.COLUMNNAME_IMP_Processor_ID).append("=?") // # 1
|
.append(" WHERE ").append(X_IMP_ProcessorParameter.COLUMNNAME_IMP_Processor_ID).append("=?") // # 1
|
||||||
.append(" AND IsActive = ?") // # 2
|
.append(" AND IsActive = ?") // # 2
|
||||||
//.append(" ORDER BY ").append(X_EXP_ProcessorParameter.COLUMNNAME_)
|
|
||||||
;
|
;
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
|
|
@ -1904,7 +1904,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
if (product != null
|
if (product != null
|
||||||
&& line.getM_Locator_ID() == 0)
|
&& line.getM_Locator_ID() == 0)
|
||||||
{
|
{
|
||||||
//MWarehouse w = MWarehouse.get(getCtx(), getM_Warehouse_ID());
|
|
||||||
line.setM_Warehouse_ID(getM_Warehouse_ID());
|
line.setM_Warehouse_ID(getM_Warehouse_ID());
|
||||||
line.setM_Locator_ID(inTrx ? Env.ZERO : line.getMovementQty()); // default Locator
|
line.setM_Locator_ID(inTrx ? Env.ZERO : line.getMovementQty()); // default Locator
|
||||||
needSave = true;
|
needSave = true;
|
||||||
|
|
|
@ -271,18 +271,11 @@ public class MInfoWindow extends X_AD_InfoWindow
|
||||||
{
|
{
|
||||||
if (i != 0) // can also use if i>0
|
if (i != 0) // can also use if i>0
|
||||||
sql.append(",");
|
sql.append(",");
|
||||||
sql.append(mColumns[i].getSelectClause());//getColumnSQL()); // Normal and Virtual Column
|
sql.append(mColumns[i].getSelectClause()); // Normal and Virtual Column
|
||||||
}
|
}
|
||||||
sql.append(" FROM ").append(fromsql)//getTableName())
|
sql.append(" FROM ").append(fromsql)
|
||||||
//.append(" WHERE ")
|
|
||||||
//.append(getWhereClause(false))
|
|
||||||
.append(oclause);
|
.append(oclause);
|
||||||
//.append("ORDER BY SeqNo"); //.append(get_WhereClause(false));
|
|
||||||
|
|
||||||
//
|
|
||||||
// int index = -1;
|
|
||||||
//if (CLogMgt.isLevelFinest())
|
|
||||||
//log.finest(getWhereClause(true));
|
|
||||||
log.info("Generated SQL -- getSql: "+ sql.toString());
|
log.info("Generated SQL -- getSql: "+ sql.toString());
|
||||||
|
|
||||||
return sql.toString();
|
return sql.toString();
|
||||||
|
@ -299,7 +292,6 @@ public class MInfoWindow extends X_AD_InfoWindow
|
||||||
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||||
|
|
||||||
pstmt = DB.prepareStatement(countSql, null);
|
pstmt = DB.prepareStatement(countSql, null);
|
||||||
// pstmt.setString(1, p_tableName);
|
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
|
@ -308,10 +300,7 @@ public class MInfoWindow extends X_AD_InfoWindow
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
//ADialog.error(WindowNo, c, AD_Message)
|
|
||||||
//Env.getUi().showError(0, null, sql.toString() + "<br> " + e.getMessage());
|
|
||||||
log.log(Level.SEVERE, sql, e);
|
log.log(Level.SEVERE, sql, e);
|
||||||
// String error = e.toString();
|
|
||||||
// show error to user and return: TODO
|
// show error to user and return: TODO
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,6 @@ public class MInfoWindowAccess extends X_AD_InfoWindow_Access {
|
||||||
super(ctx, 0, trxName);
|
super(ctx, 0, trxName);
|
||||||
if (ignored != 0)
|
if (ignored != 0)
|
||||||
throw new IllegalArgumentException("Multi-Key");
|
throw new IllegalArgumentException("Multi-Key");
|
||||||
else
|
|
||||||
{
|
|
||||||
// setAD_InfoWindow_ID (0);
|
|
||||||
// setAD_Role_ID (0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -54,11 +54,8 @@ public class MPAttributeLookup extends Lookup
|
||||||
public MPAttributeLookup(Properties ctx, int WindowNo)
|
public MPAttributeLookup(Properties ctx, int WindowNo)
|
||||||
{
|
{
|
||||||
super(DisplayType.TableDir, WindowNo);
|
super(DisplayType.TableDir, WindowNo);
|
||||||
// m_ctx = ctx;
|
|
||||||
} // MPAttribute
|
} // MPAttribute
|
||||||
|
|
||||||
// /** Properties */
|
|
||||||
// private Properties m_ctx;
|
|
||||||
/** No Instance Value */
|
/** No Instance Value */
|
||||||
private static KeyNamePair NO_INSTANCE = new KeyNamePair (0,"");
|
private static KeyNamePair NO_INSTANCE = new KeyNamePair (0,"");
|
||||||
|
|
||||||
|
|
|
@ -121,9 +121,6 @@ public class MPackage extends X_M_Package
|
||||||
super (ctx, M_Package_ID, trxName);
|
super (ctx, M_Package_ID, trxName);
|
||||||
if (M_Package_ID == 0)
|
if (M_Package_ID == 0)
|
||||||
{
|
{
|
||||||
// setM_Shipper_ID (0);
|
|
||||||
// setDocumentNo (null);
|
|
||||||
// setM_InOut_ID (0);
|
|
||||||
setShipDate (new Timestamp(System.currentTimeMillis()));
|
setShipDate (new Timestamp(System.currentTimeMillis()));
|
||||||
|
|
||||||
MClientInfo clientInfo = MClientInfo.get(ctx, getAD_Client_ID());
|
MClientInfo clientInfo = MClientInfo.get(ctx, getAD_Client_ID());
|
||||||
|
@ -577,7 +574,6 @@ public class MPackage extends X_M_Package
|
||||||
st.setSalesRep_ID(ioOut.getSalesRep_ID());
|
st.setSalesRep_ID(ioOut.getSalesRep_ID());
|
||||||
st.setShipDate(getShipDate());
|
st.setShipDate(getShipDate());
|
||||||
st.setShipperAccount(getShipperAccount());
|
st.setShipperAccount(getShipperAccount());
|
||||||
// st.setShippingRespMessage(ShippingRespMessage);
|
|
||||||
st.setSurcharges(getSurcharges());
|
st.setSurcharges(getSurcharges());
|
||||||
st.setTrackingInfo(getTrackingInfo());
|
st.setTrackingInfo(getTrackingInfo());
|
||||||
st.setTrackingNo(getTrackingNo());
|
st.setTrackingNo(getTrackingNo());
|
||||||
|
|
|
@ -45,8 +45,6 @@ public class MPackageLine extends X_M_PackageLine
|
||||||
super (ctx, M_PackageLine_ID, trxName);
|
super (ctx, M_PackageLine_ID, trxName);
|
||||||
if (M_PackageLine_ID == 0)
|
if (M_PackageLine_ID == 0)
|
||||||
{
|
{
|
||||||
// setM_Package_ID (0);
|
|
||||||
// setM_InOutLine_ID (0);
|
|
||||||
setQty (Env.ZERO);
|
setQty (Env.ZERO);
|
||||||
}
|
}
|
||||||
} // MPackageLine
|
} // MPackageLine
|
||||||
|
|
|
@ -186,12 +186,6 @@ public class MPasswordRule extends X_AD_PasswordRule {
|
||||||
WordListDictionary dict = new WordListDictionary(awl);
|
WordListDictionary dict = new WordListDictionary(awl);
|
||||||
DictionarySubstringRule dictRule = new DictionarySubstringRule(dict);
|
DictionarySubstringRule dictRule = new DictionarySubstringRule(dict);
|
||||||
|
|
||||||
/*if (getDictWordLength() > 0) {//when update library to passay. this method is miss
|
|
||||||
dictRule.setWordLength(getDictWordLength()); // size of words to check in the password
|
|
||||||
} else{
|
|
||||||
dictRule.setWordLength(DictionarySubstringRule.DEFAULT_WORD_LENGTH);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if (isDictMatchBackwards()) {
|
if (isDictMatchBackwards()) {
|
||||||
dictRule.setMatchBackwards(true); // match dictionary words backwards
|
dictRule.setMatchBackwards(true); // match dictionary words backwards
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,6 @@ public class MPaySchedule extends X_C_PaySchedule
|
||||||
super(ctx, C_PaySchedule_ID, trxName);
|
super(ctx, C_PaySchedule_ID, trxName);
|
||||||
if (C_PaySchedule_ID == 0)
|
if (C_PaySchedule_ID == 0)
|
||||||
{
|
{
|
||||||
// setC_PaymentTerm_ID (0); // Parent
|
|
||||||
setPercentage (Env.ZERO);
|
setPercentage (Env.ZERO);
|
||||||
setDiscount (Env.ZERO);
|
setDiscount (Env.ZERO);
|
||||||
setDiscountDays (0);
|
setDiscountDays (0);
|
||||||
|
|
|
@ -47,9 +47,6 @@ public class MPaySelection extends X_C_PaySelection
|
||||||
super(ctx, C_PaySelection_ID, trxName);
|
super(ctx, C_PaySelection_ID, trxName);
|
||||||
if (C_PaySelection_ID == 0)
|
if (C_PaySelection_ID == 0)
|
||||||
{
|
{
|
||||||
// setC_BankAccount_ID (0);
|
|
||||||
// setName (null); // @#Date@
|
|
||||||
// setPayDate (new Timestamp(System.currentTimeMillis())); // @#Date@
|
|
||||||
setTotalAmt (Env.ZERO);
|
setTotalAmt (Env.ZERO);
|
||||||
setIsApproved (false);
|
setIsApproved (false);
|
||||||
setProcessed (false);
|
setProcessed (false);
|
||||||
|
|
|
@ -523,9 +523,6 @@ public class MPaySelectionCheck extends X_C_PaySelectionCheck
|
||||||
super(ctx, C_PaySelectionCheck_ID, trxName);
|
super(ctx, C_PaySelectionCheck_ID, trxName);
|
||||||
if (C_PaySelectionCheck_ID == 0)
|
if (C_PaySelectionCheck_ID == 0)
|
||||||
{
|
{
|
||||||
// setC_PaySelection_ID (0);
|
|
||||||
// setC_BPartner_ID (0);
|
|
||||||
// setPaymentRule (null);
|
|
||||||
setPayAmt (Env.ZERO);
|
setPayAmt (Env.ZERO);
|
||||||
setDiscountAmt(Env.ZERO);
|
setDiscountAmt(Env.ZERO);
|
||||||
setWriteOffAmt(Env.ZERO);
|
setWriteOffAmt(Env.ZERO);
|
||||||
|
|
|
@ -48,10 +48,6 @@ public class MPaySelectionLine extends X_C_PaySelectionLine
|
||||||
super(ctx, C_PaySelectionLine_ID, trxName);
|
super(ctx, C_PaySelectionLine_ID, trxName);
|
||||||
if (C_PaySelectionLine_ID == 0)
|
if (C_PaySelectionLine_ID == 0)
|
||||||
{
|
{
|
||||||
// setC_PaySelection_ID (0);
|
|
||||||
// setPaymentRule (null); // S
|
|
||||||
// setLine (0); // @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM C_PaySelectionLine WHERE C_PaySelection_ID=@C_PaySelection_ID@
|
|
||||||
// setC_Invoice_ID (0);
|
|
||||||
setIsSOTrx (false);
|
setIsSOTrx (false);
|
||||||
setOpenAmt(Env.ZERO);
|
setOpenAmt(Env.ZERO);
|
||||||
setPayAmt (Env.ZERO);
|
setPayAmt (Env.ZERO);
|
||||||
|
|
|
@ -193,7 +193,6 @@ public class MPayment extends X_C_Payment
|
||||||
setIsAllocated(false);
|
setIsAllocated(false);
|
||||||
setIsOnline(false);
|
setIsOnline(false);
|
||||||
setIsDelayedCapture (false);
|
setIsDelayedCapture (false);
|
||||||
// setC_BPartner_ID(0);
|
|
||||||
setC_Invoice_ID(0);
|
setC_Invoice_ID(0);
|
||||||
setC_Order_ID(0);
|
setC_Order_ID(0);
|
||||||
setC_Charge_ID(0);
|
setC_Charge_ID(0);
|
||||||
|
@ -530,24 +529,17 @@ public class MPayment extends X_C_Payment
|
||||||
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNoProcessor"));
|
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNoProcessor"));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Validate before trying to process
|
approved = pp.processCC();
|
||||||
// String msg = pp.validate();
|
|
||||||
// if (msg!=null && msg.trim().length()>0) {
|
|
||||||
// setErrorMessage(Msg.getMsg(getCtx(), msg));
|
|
||||||
// } else {
|
|
||||||
// Process if validation succeeds
|
|
||||||
approved = pp.processCC();
|
|
||||||
|
|
||||||
if (approved)
|
if (approved)
|
||||||
setErrorMessage(null);
|
setErrorMessage(null);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(getTrxType().equals(TRXTYPE_Void) || getTrxType().equals(TRXTYPE_CreditPayment))
|
||||||
|
setErrorMessage("From " + getCreditCardName() + ": " + getR_VoidMsg());
|
||||||
else
|
else
|
||||||
{
|
setErrorMessage("From " + getCreditCardName() + ": " + getR_RespMsg());
|
||||||
if(getTrxType().equals(TRXTYPE_Void) || getTrxType().equals(TRXTYPE_CreditPayment))
|
}
|
||||||
setErrorMessage("From " + getCreditCardName() + ": " + getR_VoidMsg());
|
|
||||||
else
|
|
||||||
setErrorMessage("From " + getCreditCardName() + ": " + getR_RespMsg());
|
|
||||||
}
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -679,7 +671,6 @@ public class MPayment extends X_C_Payment
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// @Trifon - CashPayments
|
// @Trifon - CashPayments
|
||||||
//if ( getTenderType().equals("X") ) {
|
|
||||||
if ( isCashbookTrx()) {
|
if ( isCashbookTrx()) {
|
||||||
// Cash Book Is mandatory
|
// Cash Book Is mandatory
|
||||||
if ( getC_CashBook_ID() <= 0 ) {
|
if ( getC_CashBook_ID() <= 0 ) {
|
||||||
|
@ -887,7 +878,6 @@ public class MPayment extends X_C_Payment
|
||||||
+ " INNER JOIN C_Payment p ON (al.C_Payment_ID=p.C_Payment_ID) "
|
+ " INNER JOIN C_Payment p ON (al.C_Payment_ID=p.C_Payment_ID) "
|
||||||
+ "WHERE al.C_Payment_ID=?"
|
+ "WHERE al.C_Payment_ID=?"
|
||||||
+ " AND ah.IsActive='Y' AND al.IsActive='Y'";
|
+ " AND ah.IsActive='Y' AND al.IsActive='Y'";
|
||||||
// + " AND al.C_Invoice_ID IS NOT NULL";
|
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
try
|
try
|
||||||
|
@ -908,8 +898,6 @@ public class MPayment extends X_C_Payment
|
||||||
rs = null;
|
rs = null;
|
||||||
pstmt = null;
|
pstmt = null;
|
||||||
}
|
}
|
||||||
// log.fine("getAllocatedAmt - " + retValue);
|
|
||||||
// ? ROUND(NVL(v_AllocatedAmt,0), 2);
|
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getAllocatedAmt
|
} // getAllocatedAmt
|
||||||
|
|
||||||
|
@ -919,18 +907,6 @@ public class MPayment extends X_C_Payment
|
||||||
*/
|
*/
|
||||||
public boolean testAllocation()
|
public boolean testAllocation()
|
||||||
{
|
{
|
||||||
// Cash Trx always allocated!!! WHY???
|
|
||||||
/* @Trifon - CashPayments
|
|
||||||
if (isCashTrx())
|
|
||||||
{
|
|
||||||
if (!isAllocated())
|
|
||||||
{
|
|
||||||
setIsAllocated(true);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
//
|
//
|
||||||
BigDecimal alloc = getAllocatedAmt();
|
BigDecimal alloc = getAllocatedAmt();
|
||||||
if (alloc == null)
|
if (alloc == null)
|
||||||
|
@ -1540,8 +1516,6 @@ public class MPayment extends X_C_Payment
|
||||||
*/
|
*/
|
||||||
public void setC_DocType_ID (int C_DocType_ID)
|
public void setC_DocType_ID (int C_DocType_ID)
|
||||||
{
|
{
|
||||||
// if (getDocumentNo() != null && getC_DocType_ID() != C_DocType_ID)
|
|
||||||
// setDocumentNo(null);
|
|
||||||
super.setC_DocType_ID(C_DocType_ID);
|
super.setC_DocType_ID(C_DocType_ID);
|
||||||
} // setC_DocType_ID
|
} // setC_DocType_ID
|
||||||
|
|
||||||
|
@ -2035,11 +2009,6 @@ public class MPayment extends X_C_Payment
|
||||||
testAllocation();
|
testAllocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Project update
|
|
||||||
if (getC_Project_ID() != 0)
|
|
||||||
{
|
|
||||||
// MProject project = new MProject(getCtx(), getC_Project_ID());
|
|
||||||
}
|
|
||||||
// Update BP for Prepayments
|
// Update BP for Prepayments
|
||||||
if (getC_BPartner_ID() != 0 && getC_Invoice_ID() == 0 && getC_Charge_ID() == 0 && MPaymentAllocate.get(this).length == 0 && !createdAllocationRecords)
|
if (getC_BPartner_ID() != 0 && getC_Invoice_ID() == 0 && getC_Charge_ID() == 0 && MPaymentAllocate.get(this).length == 0 && !createdAllocationRecords)
|
||||||
{
|
{
|
||||||
|
@ -2083,7 +2052,6 @@ public class MPayment extends X_C_Payment
|
||||||
m_processMsg += " @CounterDoc@: @C_Payment_ID@=" + counter.getDocumentNo();
|
m_processMsg += " @CounterDoc@: @C_Payment_ID@=" + counter.getDocumentNo();
|
||||||
|
|
||||||
// @Trifon - CashPayments
|
// @Trifon - CashPayments
|
||||||
//if ( getTenderType().equals("X") ) {
|
|
||||||
if ( isCashbookTrx()) {
|
if ( isCashbookTrx()) {
|
||||||
// Create Cash Book entry
|
// Create Cash Book entry
|
||||||
if ( getC_CashBook_ID() <= 0 ) {
|
if ( getC_CashBook_ID() <= 0 ) {
|
||||||
|
@ -2108,14 +2076,6 @@ public class MPayment extends X_C_Payment
|
||||||
m_processMsg = info.toString();
|
m_processMsg = info.toString();
|
||||||
// Amount
|
// Amount
|
||||||
BigDecimal amt = this.getPayAmt();
|
BigDecimal amt = this.getPayAmt();
|
||||||
/*
|
|
||||||
MDocType dt = MDocType.get(getCtx(), invoice.getC_DocType_ID());
|
|
||||||
if (MDocType.DOCBASETYPE_APInvoice.equals( dt.getDocBaseType() )
|
|
||||||
|| MDocType.DOCBASETYPE_ARCreditMemo.equals( dt.getDocBaseType() )
|
|
||||||
) {
|
|
||||||
amt = amt.negate();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
cl.setAmount( amt );
|
cl.setAmount( amt );
|
||||||
//
|
//
|
||||||
cl.setDiscountAmt( Env.ZERO );
|
cl.setDiscountAmt( Env.ZERO );
|
||||||
|
@ -2216,7 +2176,7 @@ public class MPayment extends X_C_Payment
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, get_TrxName());
|
MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, get_TrxName());
|
||||||
// MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID);
|
|
||||||
if (log.isLoggable(Level.INFO)) log.info("Counter BP=" + counterBP.getName());
|
if (log.isLoggable(Level.INFO)) log.info("Counter BP=" + counterBP.getName());
|
||||||
|
|
||||||
// Document Type
|
// Document Type
|
||||||
|
@ -2517,10 +2477,6 @@ public class MPayment extends X_C_Payment
|
||||||
*/
|
*/
|
||||||
protected void deAllocate(boolean accrual)
|
protected void deAllocate(boolean accrual)
|
||||||
{
|
{
|
||||||
// if (getC_Order_ID() != 0) setC_Order_ID(0); // IDEMPIERE-1764
|
|
||||||
// if (getC_Invoice_ID() == 0)
|
|
||||||
// return;
|
|
||||||
// De-Allocate all
|
|
||||||
MAllocationHdr[] allocations = MAllocationHdr.getOfPayment(getCtx(),
|
MAllocationHdr[] allocations = MAllocationHdr.getOfPayment(getCtx(),
|
||||||
getC_Payment_ID(), get_TrxName());
|
getC_Payment_ID(), get_TrxName());
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("#" + allocations.length);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + allocations.length);
|
||||||
|
@ -2925,10 +2881,7 @@ public class MPayment extends X_C_Payment
|
||||||
*/
|
*/
|
||||||
public File createPDF (File file)
|
public File createPDF (File file)
|
||||||
{
|
{
|
||||||
// ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.PAYMENT, getC_Payment_ID());
|
return null;
|
||||||
// if (re == null)
|
|
||||||
return null;
|
|
||||||
// return re.getPDF(file);
|
|
||||||
} // createPDF
|
} // createPDF
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,6 @@ public class MPaymentAllocate extends X_C_PaymentAllocate
|
||||||
super (ctx, C_PaymentAllocate_ID, trxName);
|
super (ctx, C_PaymentAllocate_ID, trxName);
|
||||||
if (C_PaymentAllocate_ID == 0)
|
if (C_PaymentAllocate_ID == 0)
|
||||||
{
|
{
|
||||||
// setC_Payment_ID (0); // Parent
|
|
||||||
// setC_Invoice_ID (0);
|
|
||||||
setAmount (Env.ZERO);
|
setAmount (Env.ZERO);
|
||||||
setDiscountAmt (Env.ZERO);
|
setDiscountAmt (Env.ZERO);
|
||||||
setOverUnderAmt (Env.ZERO);
|
setOverUnderAmt (Env.ZERO);
|
||||||
|
|
|
@ -57,7 +57,6 @@ public class MPaymentBatch extends X_C_PaymentBatch
|
||||||
super(ctx, C_PaymentBatch_ID, trxName);
|
super(ctx, C_PaymentBatch_ID, trxName);
|
||||||
if (C_PaymentBatch_ID == 0)
|
if (C_PaymentBatch_ID == 0)
|
||||||
{
|
{
|
||||||
// setName (null);
|
|
||||||
setProcessed (false);
|
setProcessed (false);
|
||||||
setProcessing (false);
|
setProcessing (false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,11 +46,6 @@ public class MPaymentProcessor extends X_C_PaymentProcessor
|
||||||
super (ctx, C_PaymentProcessor_ID, trxName);
|
super (ctx, C_PaymentProcessor_ID, trxName);
|
||||||
if (C_PaymentProcessor_ID == 0)
|
if (C_PaymentProcessor_ID == 0)
|
||||||
{
|
{
|
||||||
// setC_BankAccount_ID (0); // Parent
|
|
||||||
// setUserID (null);
|
|
||||||
// setPassword (null);
|
|
||||||
// setHostAddress (null);
|
|
||||||
// setHostPort (0);
|
|
||||||
setCommission (Env.ZERO);
|
setCommission (Env.ZERO);
|
||||||
setAcceptVisa (false);
|
setAcceptVisa (false);
|
||||||
setAcceptMC (false);
|
setAcceptMC (false);
|
||||||
|
@ -64,7 +59,6 @@ public class MPaymentProcessor extends X_C_PaymentProcessor
|
||||||
setAcceptATM (false);
|
setAcceptATM (false);
|
||||||
setAcceptDirectDeposit(false);
|
setAcceptDirectDeposit(false);
|
||||||
setAcceptDirectDebit(false);
|
setAcceptDirectDebit(false);
|
||||||
// setName (null);
|
|
||||||
}
|
}
|
||||||
} // MPaymentProcessor
|
} // MPaymentProcessor
|
||||||
|
|
||||||
|
|
|
@ -137,17 +137,6 @@ public class MPaymentTerm extends X_C_PaymentTerm
|
||||||
setIsValid(true);
|
setIsValid(true);
|
||||||
return validMsg;
|
return validMsg;
|
||||||
}
|
}
|
||||||
// Allow schedules with just one record
|
|
||||||
// if (m_schedule.length == 1)
|
|
||||||
// {
|
|
||||||
// setIsValid(false);
|
|
||||||
// if (m_schedule[0].isValid())
|
|
||||||
// {
|
|
||||||
// m_schedule[0].setIsValid(false);
|
|
||||||
// m_schedule[0].saveEx();
|
|
||||||
// }
|
|
||||||
// return "@Invalid@ @Count@ # = 1 (@C_PaySchedule_ID@)";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Add up
|
// Add up
|
||||||
BigDecimal total = Env.ZERO;
|
BigDecimal total = Env.ZERO;
|
||||||
|
|
|
@ -244,12 +244,6 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
|
||||||
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNoProcessor"));
|
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNoProcessor"));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Validate before trying to process
|
|
||||||
// String msg = pp.validate();
|
|
||||||
// if (msg!=null && msg.trim().length()>0) {
|
|
||||||
// setErrorMessage(Msg.getMsg(getCtx(), msg));
|
|
||||||
// } else {
|
|
||||||
// Process if validation succeeds
|
|
||||||
approved = pp.processCC();
|
approved = pp.processCC();
|
||||||
setCreditCardNumber(PaymentUtil.encrpytCreditCard(getCreditCardNumber()));
|
setCreditCardNumber(PaymentUtil.encrpytCreditCard(getCreditCardNumber()));
|
||||||
setCreditCardVV(PaymentUtil.encrpytCvv(getCreditCardVV()));
|
setCreditCardVV(PaymentUtil.encrpytCvv(getCreditCardVV()));
|
||||||
|
@ -287,7 +281,6 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
|
||||||
else
|
else
|
||||||
setErrorMessage("From " + getCreditCardName() + ": " + getR_RespMsg());
|
setErrorMessage("From " + getCreditCardName() + ": " + getR_RespMsg());
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -111,8 +111,6 @@ public class MPaymentValidate
|
||||||
{
|
{
|
||||||
if (mm < 1 || mm > 12)
|
if (mm < 1 || mm > 12)
|
||||||
return "CreditCardExpMonth";
|
return "CreditCardExpMonth";
|
||||||
// if (yy < 0 || yy > EXP_YEAR)
|
|
||||||
// return "CreditCardExpYear";
|
|
||||||
|
|
||||||
// Today's date
|
// Today's date
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
|
|
Loading…
Reference in New Issue