maektwain commented on a change in pull request #796:
URL: https://github.com/apache/fineract/pull/796#discussion_r418996418
##########
File path:
fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java
##########
@@ -143,6 +159,21 @@ public String createGLClosure(@ApiParam(hidden = true)
final String jsonRequestB
return this.apiJsonSerializerService.serialize(result);
}
+ @POST
+ @Path("previewIncomeAndExpense")
+ @Consumes({ MediaType.APPLICATION_JSON })
+ @Produces({ MediaType.APPLICATION_JSON })
+ @ApiOperation(value = "Create an End of the Year Accounting Closure")
+ public String previewIncomeAndExpenseBooking(@Context final UriInfo
uriInfo, final String apiRequestBodyAsJson) {
+ final JsonElement parsedQuery =
this.fromJsonHelper.parse(apiRequestBodyAsJson);
+ final JsonQuery query = JsonQuery.from(apiRequestBodyAsJson,
parsedQuery, this.fromJsonHelper);
+ final Collection<IncomeAndExpenseBookingData>
incomeAndExpenseBookingCollection =
this.calculateIncomeAndExpenseBooking.CalculateIncomeAndExpenseBookings(query);
+ final ApiRequestJsonSerializationSettings settings =
this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
+ return
this.incomeAndExpenseBookingDataDefaultToApiJsonSerializer.serialize(settings,
incomeAndExpenseBookingCollection, new HashSet<String>());
Review comment:
Ack.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]