import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
+import net.ktnx.mobileledger.utils.Globals;
import net.ktnx.mobileledger.utils.MLDB;
import java.util.ArrayList;
public String getName() {
return name;
}
- public void setName(CharSequence text) {
- setName(String.valueOf(text));
- }
public void setName(String name) {
this.name = name;
}
+ public void setName(CharSequence text) {
+ setName(String.valueOf(text));
+ }
public String getUrl() {
return url;
}
- public void setUrl(CharSequence text) {
- setUrl(String.valueOf(text));
- }
public void setUrl(String url) {
this.url = url;
}
+ public void setUrl(CharSequence text) {
+ setUrl(String.valueOf(text));
+ }
public boolean isAuthEnabled() {
return authEnabled;
}
public String getAuthUserName() {
return authUserName;
}
- public void setAuthUserName(CharSequence text) {
- setAuthUserName(String.valueOf(text));
- }
public void setAuthUserName(String authUserName) {
this.authUserName = authUserName;
}
+ public void setAuthUserName(CharSequence text) {
+ setAuthUserName(String.valueOf(text));
+ }
public String getAuthPassword() {
return authPassword;
}
- public void setAuthPassword(CharSequence text) {
- setAuthPassword(String.valueOf(text));
- }
public void setAuthPassword(String authPassword) {
this.authPassword = authPassword;
}
+ public void setAuthPassword(CharSequence text) {
+ setAuthPassword(String.valueOf(text));
+ }
public void storeInDB() {
SQLiteDatabase db = MLDB.getWritableDatabase();
db.beginTransaction();
db.execSQL("INSERT INTO transactions(profile, id, date, description, data_hash, keep) " +
"values(?,?,?,?,?,1)",
- new Object[]{uuid, tr.getId(), tr.getDate(), tr.getDescription(), tr.getDataHash()
+ new Object[]{uuid, tr.getId(), Globals.formatLedgerDate(tr.getDate()),
+ tr.getDescription(), tr.getDataHash()
});
for (LedgerTransactionAccount item : tr.getAccounts()) {