| 1 |
/* |
| 2 |
* FeliCa2Money |
| 3 |
* |
| 4 |
* Copyright (C) 2001-2007 Takuya Murakami |
| 5 |
* |
| 6 |
* This program is free software; you can redistribute it and/or modify |
| 7 |
* it under the terms of the GNU General Public License as published by |
| 8 |
* the Free Software Foundation; either version 2 of the License, or |
| 9 |
* (at your option) any later version. |
| 10 |
* |
| 11 |
* This program is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU General Public License |
| 17 |
* along with this program; if not, write to the Free Software |
| 18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 19 |
*/ |
| 20 |
#ifndef _TRANSACTION_H |
| 21 |
#define _TRANSACTION_H |
| 22 |
|
| 23 |
#include <vector> |
| 24 |
|
| 25 |
using namespace std; |
| 26 |
|
| 27 |
/** |
| 28 |
@brief ćříŢ |
| 29 |
*/ |
| 30 |
typedef enum { |
| 31 |
// üŕ |
| 32 |
T_INT=0, ///< § |
| 33 |
T_DIV, ///< z |
| 34 |
T_DIRECTDEP, ///< UüŕAć§üŕAŠŽřßľüŕ |
| 35 |
T_DEP, ///< ťĚźüŕ |
| 36 |
|
| 37 |
// oŕ |
| 38 |
T_PAYMENT, ///< ŠŽřŤĆľ |
| 39 |
T_CASH, ///< ťŕřŤoľ |
| 40 |
T_ATM, ///< J[hÉćéřŤoľ |
| 41 |
T_CHECK, ///< ŹŘčÖAćř |
| 42 |
T_DEBIT, ///< ťĚźoŕ |
| 43 |
} trntype; |
| 44 |
|
| 45 |
// |
| 46 |
// ćříŢź (ăĚlĆęvˇéąĆ) |
| 47 |
// |
| 48 |
#ifdef DEFINE_TRNNAME |
| 49 |
const char *trnname[] = { |
| 50 |
"INT", "DIV", "DIRECTDEP", "DEP", |
| 51 |
"PAYMENT", "CASH", "ATM", "CHECK", "DEBIT" |
| 52 |
}; |
| 53 |
#endif |
| 54 |
|
| 55 |
/** |
| 56 |
@brief ćříŢϡ\ |
| 57 |
*/ |
| 58 |
struct trntable { |
| 59 |
const char *key; ///< L[ |
| 60 |
trntype type; ///< ćříŢ |
| 61 |
}; |
| 62 |
|
| 63 |
#define T_INCOME 0 |
| 64 |
#define T_OUTGO 1 |
| 65 |
|
| 66 |
/** |
| 67 |
@brief útîń |
| 68 |
*/ |
| 69 |
typedef struct { |
| 70 |
int year; |
| 71 |
int month; |
| 72 |
int date; |
| 73 |
int hour; |
| 74 |
int minutes; |
| 75 |
int seconds; |
| 76 |
} DateTime; |
| 77 |
|
| 78 |
|
| 79 |
/** |
| 80 |
@brief gUNVf[^ |
| 81 |
*/ |
| 82 |
class Transaction { |
| 83 |
public: |
| 84 |
DateTime date; ///< út |
| 85 |
unsigned long id; ///< ID |
| 86 |
AnsiString desc; ///< ŕž |
| 87 |
AnsiString memo; ///< |
| 88 |
trntype type; ///< íĘ |
| 89 |
long value; ///< ŕz |
| 90 |
long balance; ///< c |
| 91 |
|
| 92 |
void SetTransactionType(const char *desc, int type); |
| 93 |
|
| 94 |
const char *GetTrnTypeStr(void); |
| 95 |
}; |
| 96 |
|
| 97 |
// [eBeBÖ |
| 98 |
AnsiString sjis2utf8(const AnsiString & sjis); |
| 99 |
|
| 100 |
#endif |
| 101 |
|