Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void printReport() {
- String trxName = Trx.createTrxName();
- String sql = "SELECT AD_Process_ID FROM AD_Process WHERE name='Laporan Aging Standard'";
- int report_id = DB.getSQLValue(trxName, sql);
- MProcess proc = new MProcess(getCtx(), report_id, trxName);
- MPInstance instance = new MPInstance(proc, proc.getAD_Process_ID());
- ProcessInfo pi = new ProcessInfo("Laporan Aging", report_id);
- pi.setAD_PInstance_ID(instance.getAD_PInstance_ID());
- ArrayList<ProcessInfoParameter> list = new ArrayList<ProcessInfoParameter>();
- list.add(new ProcessInfoParameter("AD_PInstance_ID", getAD_PInstance_ID(), null, null, null));
- list.add(new ProcessInfoParameter("C_BPartner_ID", p_C_BPartner_ID > 0 ? new BigDecimal(p_C_BPartner_ID) : null, null, null, null));
- list.add(new ProcessInfoParameter("StatementDate", p_StatementDate, null, null, null));
- list.add(new ProcessInfoParameter("IsSOTrx", p_IsSOTrx ? "Y" : "N", null, null, null));
- list.add(new ProcessInfoParameter("AD_Org_ID", p_AD_Org_ID > 0 ? new Integer(p_AD_Org_ID) : null, null, null, null));
- list.add(new ProcessInfoParameter("C_Currency_ID", p_C_Currency_ID > 0 ? new Integer(p_C_Currency_ID) : null, null, null, null));
- list.add(new ProcessInfoParameter("IsListInvoices", p_IsListInvoices ? "Y" : "N", null, null, null));
- ProcessInfoParameter[] pars = new ProcessInfoParameter[list.size()];
- list.toArray(pars);
- pi.setParameter(pars);
- ProcessUtil.startJavaProcess(getCtx(), pi, Trx.get(trxName, true));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement