use of org.eevolution.model.MHRPayrollConcept in project adempiere by adempiere.
the class HRCreateConcept method createPayrollConcept.
// doIt
/**
* Create Payroll Concept
* @param concepts
* @param payrollId
* @return
*/
private int createPayrollConcept(List<MHRConcept> concepts, int payrollId) {
AtomicInteger count = new AtomicInteger(0);
concepts.stream().filter(concept -> !existsPayrollConcept(concept.getHR_Concept_ID(), payrollId)).forEach(concept -> {
MHRPayrollConcept payrollConcept = new MHRPayrollConcept(concept, payrollId, get_TrxName());
payrollConcept.setIsPrinted(concept.isPrinted());
payrollConcept.setSeqNo(concept.getSeqNo());
payrollConcept.setName(concept.getName());
payrollConcept.saveEx();
addLog("@SeqNo@" + payrollConcept.getSeqNo() + " @HR_PayrollConcept_ID@ : " + payrollConcept.getName());
count.updateAndGet(no -> no + 1);
});
return count.get();
}
Aggregations