update printby piutang

This commit is contained in:
ridwan 2025-05-15 15:37:56 +07:00
parent 02ec016b3e
commit b240990d62
3 changed files with 6 additions and 4 deletions

View File

@ -461,8 +461,9 @@ public class ReportingController {
@RequestMapping(value = {"/kwitansi-collecting-piutang/{noposting}"}, method = {RequestMethod.GET})
public void exportPdfKwitansiCollectingPiutang(@PathVariable("noposting") String norec,
@RequestParam(value = "PrintBy", required = false, defaultValue = "") String PrintBy,
ModelAndView mv, HttpServletResponse response) throws Exception {
JasperPrint jasperPrint = this.reportingService.exportPdfKwitansiCollectingPiutang(norec);
JasperPrint jasperPrint = this.reportingService.exportPdfKwitansiCollectingPiutang(norec, PrintBy);
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream());
}

View File

@ -813,12 +813,13 @@ public class ReportingDao {
}
//Kwitansi_Collecting_Piutang
public JasperPrint exportPdfKwitansiCollectingPiutang(String noposting) {
public JasperPrint exportPdfKwitansiCollectingPiutang(String noposting, String PrintBy) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jasperDirPath + "Kwitansi_Collecting_Piutang.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path);
Map<String, Object> parameters = new HashMap<>();
parameters.put("noposting", noposting);
parameters.put("PrintBy", PrintBy);
return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var17) {
LOG.error("Exception at exportPdfKwitansiCollectingPiutang");

View File

@ -231,8 +231,8 @@ public class ReportingService {
return this.reportingDao.exportPdfSuratCollectingPiutang(noposting);
}
public JasperPrint exportPdfKwitansiCollectingPiutang(String noposting) {
return this.reportingDao.exportPdfKwitansiCollectingPiutang(noposting);
public JasperPrint exportPdfKwitansiCollectingPiutang(String noposting, String PrintBy) {
return this.reportingDao.exportPdfKwitansiCollectingPiutang(noposting, PrintBy);
}