}
@Override
public Object getValueAt(int r, int c) {
try {
MoneyTransactionLocal transaction = transactionList.get(r);
Object s = "";
switch(c) {
case COL_DATE: {
//дата
Date date = transaction.getDate();
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy");
s = formatter.format(date);
break;
}
case COL_CASHIER: {
//кассир
DirectoryCollaboratorItem coll = transaction.getCollaborator();
if(coll != null) {
s = coll.toString();
} else {
s = "-----";
}
break;
}
case COL_MONEY: {
//сумма
s = String.format("%.2f", ((float) transaction.getMoney()) / 100);
break;
}
case COL_DESC: {
//Описание
s = transaction.getDescription();
break;
}
case COL_ORDERED: {
if(transaction.getPermitted()) {
s = "Да";
} else {
s = "Нет";
}
break;