galovics commented on code in PR #3881:
URL: https://github.com/apache/fineract/pull/3881#discussion_r1793224014
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGenerator.java:
##########
@@ -289,4 +289,13 @@ public Long fetchPK(GeneratedKeyHolder keyHolder) {
}
};
}
+
+ public String incrementDateByOne(String date){
Review Comment:
I think the method name should be `incrementDateByOneDay` and the parameter
name should be dateColumn or something.
##########
fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierNotFoundException.java:
##########
@@ -40,4 +41,9 @@ public class CashierNotFoundException extends
AbstractPlatformResourceNotFoundEx
public CashierNotFoundException(Long cashierId) {
super(ERROR_MESSAGE_CODE, DEFAULT_ERROR_MESSAGE, cashierId);
}
+
+ public CashierNotFoundException(Long id, EmptyResultDataAccessException e)
{
+ super("error.msg.staff.id.invalid", "Staff with identifier " + id + "
does not exist", id, e);
Review Comment:
This is a cashier not found exception, I think the error message and code
should be related to casier and not staff.
##########
fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java:
##########
@@ -828,15 +818,15 @@ public String cashierTxnSummarySchema() {
" left join r_enum_value renum ON
cli_txn.transaction_type_enum = renum.enum_id AND renum.enum_name =
'client_transaction_type_enum' ");
sqlBuilder.append(" left join m_client cl ON cli_txn.client_id
= cl.id ");
sqlBuilder.append(" left join m_office o ON cl.office_id = o.id
");
- sqlBuilder.append(" left join m_appuser user ON
cli_txn.created_by = user.id ");
- sqlBuilder.append(" left join m_staff staff ON user.staff_id =
staff.id ");
+ sqlBuilder.append(" left join m_appuser user_ ON
cli_txn.created_by = user_.id ");
+ sqlBuilder.append(" left join m_staff staff ON user_.staff_id =
staff.id ");
sqlBuilder.append(" left join m_cashiers c ON c.staff_id =
staff.id ");
sqlBuilder.append(" left join m_payment_detail payDetails on
payDetails.id = cli_txn.payment_detail_id ");
sqlBuilder.append(" left join m_payment_type payType on payType.id
= payDetails.payment_type_id ");
sqlBuilder.append(" where cli_txn.is_reversed = false AND c.id
= ? ");
sqlBuilder.append(" and cli_txn.currency_code = ? ");
- sqlBuilder.append(" and o.hierarchy LIKE ? ");
- sqlBuilder.append(" and cli_txn.transaction_date between
c.start_date and date_add(c.end_date, interval 1 day) ");
+ //sqlBuilder.append(" and o.hierarchy LIKE ? ");
Review Comment:
comment.
##########
fineract-provider/hs_err_pid4140.log:
##########
Review Comment:
I assume this was part of a debugging session. Let's remove it.
##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/organization/teller/TellerHelper.java:
##########
@@ -0,0 +1,73 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.integrationtests.organization.teller;
+
+import com.google.gson.Gson;
+import io.restassured.specification.RequestSpecification;
+import io.restassured.specification.ResponseSpecification;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.fineract.integrationtests.common.Utils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class TellerHelper {
Review Comment:
Same, generated API classes?
##########
fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java:
##########
@@ -801,8 +791,8 @@ public String cashierTxnSummarySchema() {
sqlBuilder.append(" or acnttrans.to_loan_transaction_id =
loan_txn.id) ");
sqlBuilder.append(" where loan_txn.is_reversed = false and c.id
= ? ");
sqlBuilder.append(" and loan.currency_code = ? ");
- sqlBuilder.append(" and o.hierarchy like ? ");
- sqlBuilder.append(" and loan_txn.transaction_date between
c.start_date and date_add(c.end_date, interval 1 day) ");
+ //sqlBuilder.append(" and o.hierarchy like ? ");
Review Comment:
comment.
##########
fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java:
##########
@@ -762,8 +752,8 @@ public String cashierTxnSummarySchema() {
sqlBuilder.append(" or acnttrans.to_savings_transaction_id =
sav_txn.id) ");
sqlBuilder.append(" where sav_txn.is_reversed = false and c.id
= ? ");
sqlBuilder.append(" and sav.currency_code = ? ");
- sqlBuilder.append(" and o.hierarchy like ? ");
- sqlBuilder.append(" and sav_txn.transaction_date between
c.start_date and date_add(c.end_date, interval 1 day) ");
+ //sqlBuilder.append(" and o.hierarchy like ? ");
Review Comment:
comment.
##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/organization/teller/CashierHelper.java:
##########
@@ -0,0 +1,72 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.integrationtests.organization.teller;
+
+import com.google.gson.Gson;
+import io.restassured.specification.RequestSpecification;
+import io.restassured.specification.ResponseSpecification;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.fineract.integrationtests.common.Utils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class CashierHelper {
Review Comment:
Do you mind not creating yet another helper class for the tests but rely on
the fineract-client that generates the API automatically?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]