Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import th.co.opendream.cashcard.*
- Contract.list().each { contract ->
- def gua1 = ctx.memberService.search(contract.guarantor1)
- def gua2 = ctx.memberService.search(contract.guarantor2)
- gua1 = gua1.getAt(0)?.id
- gua2 = gua2.getAt(0)?.id
- println "${gua1}, ${gua2}"
- if (!contract._guarantor1 || !contract._guarantor2) {
- contract._guarantor1 = Member.get(gua1);
- contract._guarantor2 = Member.get(gua2);
- contract.save();
- }
- }
Add Comment
Please, Sign In to add comment