Ejemplo n.º 1
0
 public Transaction toTransaction(Account a) {
   Transaction t;
   Money m = new Money(a.currency, amount);
   if (isSplit()) {
     t = new SplitTransaction(a.getId(), m);
   } else if (isTransfer()) {
     t = new Transfer(a.getId(), m);
   } else {
     t = new Transaction(a.getId(), m);
   }
   if (date != null) {
     t.setDate(date);
   }
   t.comment = memo;
   t.crStatus = Transaction.CrStatus.fromQifName(status);
   t.referenceNumber = number;
   return t;
 }
Ejemplo n.º 2
0
 public CrStatusAdapter(Context context) {
   super(context, R.layout.custom_spinner_item, android.R.id.text1, Transaction.CrStatus.values());
   setDropDownViewResource(R.layout.custom_spinner_dropdown_item);
 }