Fixes Issue 0041423: Method getInvoicePaymentSchedule of PaymentReportDao
authorAtul Gaware <atul.gaware@openbravo.com>
Wed, 07 Aug 2019 23:40:26 +0530
changeset 36430 18b55aec2e34
parent 36429 057aaf20b293
child 36431 b9af88ac78ee
Fixes Issue 0041423: Method getInvoicePaymentSchedule of PaymentReportDao
is not used

**Remove unused method getInvoicePaymentSchedule of PaymentReportDao.java
is not used
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Mon Jul 22 17:04:40 2019 -0400
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Wed Aug 07 23:40:26 2019 +0530
@@ -2051,30 +2051,6 @@
     }
   }
 
-  @Deprecated
-  public FIN_PaymentSchedule getInvoicePaymentSchedule(FIN_Payment credit_payment) {
-    // @formatter:off
-    final String sql = " select ps "
-                     + " from FIN_Payment_Credit pc,"
-                     + "   FIN_Payment_Detail_V pdv,"
-                     + "   FIN_Payment_Schedule ps "
-                     + " where pc.payment = pdv.payment "
-                     + " and ps.id = pdv.invoicePaymentPlan "
-                     + " and pc.creditPaymentUsed.id = :creditPaymentId";
-    // @formatter: on
-    
-    try {
-      OBContext.setAdminMode(true);
-      final Session session = OBDal.getReadOnlyInstance().getSession();
-      final Query<FIN_PaymentSchedule> query = session.createQuery(sql,
-          FIN_PaymentSchedule.class);
-      query.setParameter("creditPaymentId", credit_payment.getId());
-      return query.uniqueResult();
-    } finally {
-      OBContext.restorePreviousMode();
-    }
-  }
-
   public String getInvoicesDocNos(Collection<Invoice> invoices) {
     final StringBuilder sb = new StringBuilder();
     for (Invoice i : invoices) {