1 14 package org.compiere.process; 15 16 import java.math.*; 17 import java.util.*; 18 import java.sql.*; 19 20 import org.compiere.model.*; 21 import org.compiere.util.*; 22 23 29 public class ProjectClose extends SvrProcess 30 { 31 32 private int m_C_Project_ID = 0; 33 34 37 protected void prepare() 38 { 39 ProcessInfoParameter[] para = getParameter(); 40 for (int i = 0; i < para.length; i++) 41 { 42 String name = para[i].getParameterName(); 43 if (para[i].getParameter() == null) 44 ; 45 else 46 log.error("prepare - Unknown Parameter: " + name); 47 } 48 m_C_Project_ID = getRecord_ID(); 49 } 51 56 protected String doIt() throws Exception 57 { 58 MProject project = new MProject (getCtx(), m_C_Project_ID); 59 log.info("doIt - " + project); 60 61 MProjectLine[] projectLines = project.getLines(); 62 if (MProject.PROJECTCATEGORY_WorkOrderJob.equals(project.getProjectCategory()) 63 || MProject.PROJECTCATEGORY_AssetProject.equals(project.getProjectCategory())) 64 { 65 66 } 67 68 for (int line = 0; line < projectLines.length; line++) 70 { 71 projectLines[line].setProcessed(true); 72 projectLines[line].save(); 73 } 74 75 project.setProcessed(true); 76 project.save(); 77 78 return ""; 79 } 81 } | Popular Tags |