if (system.linkedOperations.containsKey(id)) {
LinkedOperation linkedOperation = system.linkedOperations.get(id);
linkedOperation.setChecked(checked);
if (checked) {
Expenditure bill = linkedOperation.getBill();
if(bill != null){
Expenditure expenditure = new Expenditure(bill.getId(), bill.getDescription(), bill.getNextPaymentDate(), bill.getFrequency(),bill.getNumberOfOcurrencies(), bill.getValue(), bill.isFixedValue(), bill.getCategoryId(), bill.getObservation());
expenditure.setActive(false);
Money money = new Money(linkedOperation.getOperation().getValue());
GDDate date = new GDDate(linkedOperation.getOperation().getDateTime());
Account account = system.accounts.get(accountId);
Operation operation = new Operation(id, account, expenditure.getCategoryId(), date, expenditure. getDescription(), money.getFloatValue());
system.operations.put(id, operation);
bill.skip();
if (bill.getFrequency() == 0 || (bill.getLastPaymentDate() == null ? true : bill.getNextPaymentDate().after(bill.getLastPaymentDate()))) {