gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] branch master updated: #4824, not finished ye


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: #4824, not finished yet.
Date: Mon, 20 Mar 2017 17:55:51 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new b2adea3   #4824, not finished yet.
b2adea3 is described below

commit b2adea3efc1fdc13ee7cf56e229b8b64513b187f
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Mar 20 17:54:57 2017 +0100

     #4824, not finished yet.
---
 talerbank/app/migrations/0001_initial.py | 7 +++++--
 talerbank/app/models.py                  | 5 ++++-
 talerbank/app/views.py                   | 4 ++--
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/talerbank/app/migrations/0001_initial.py 
b/talerbank/app/migrations/0001_initial.py
index 310fc0c..983ed1e 100644
--- a/talerbank/app/migrations/0001_initial.py
+++ b/talerbank/app/migrations/0001_initial.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Generated by Django 1.10.3 on 2016-11-29 14:35
+# Generated by Django 1.10.2 on 2017-03-20 16:24
 from __future__ import unicode_literals
 
 from django.conf import settings
@@ -20,6 +20,8 @@ class Migration(migrations.Migration):
             name='BankAccount',
             fields=[
                 ('is_public', models.BooleanField(default=False)),
+                ('balance_value', models.IntegerField(default=0)),
+                ('balance_fraction', models.IntegerField(default=0)),
                 ('balance', models.FloatField(default=0)),
                 ('currency', models.CharField(default='', max_length=12)),
                 ('account_no', models.AutoField(primary_key=True, 
serialize=False)),
@@ -30,7 +32,8 @@ class Migration(migrations.Migration):
             name='BankTransaction',
             fields=[
                 ('id', models.AutoField(auto_created=True, primary_key=True, 
serialize=False, verbose_name='ID')),
-                ('amount', models.FloatField(default=0)),
+                ('amount_value', models.IntegerField(default=0)),
+                ('amount_fraction', models.IntegerField(default=0)),
                 ('currency', models.CharField(max_length=12)),
                 ('subject', models.CharField(default='(no subject given)', 
max_length=200)),
                 ('date', models.DateTimeField(auto_now=True)),
diff --git a/talerbank/app/models.py b/talerbank/app/models.py
index 1b84fe9..0543fbb 100644
--- a/talerbank/app/models.py
+++ b/talerbank/app/models.py
@@ -22,6 +22,8 @@ from django.db import models
 
 class BankAccount(models.Model):
     is_public = models.BooleanField(default=False)
+    balance_value = models.IntegerField(default=0)
+    balance_fraction = models.IntegerField(default=0)
     balance = models.FloatField(default=0)
     currency = models.CharField(max_length=12, default="")
     account_no = models.AutoField(primary_key=True)
@@ -29,7 +31,8 @@ class BankAccount(models.Model):
 
 
 class BankTransaction(models.Model):
-    amount = models.FloatField(default=0)
+    amount_value = models.IntegerField(default=0)
+    amount_fraction = models.IntegerField(default=0)
     currency = models.CharField(max_length=12)
     debit_account = models.ForeignKey(BankAccount, on_delete=models.CASCADE, 
related_name="debit_account")
     credit_account = models.ForeignKey(BankAccount, on_delete=models.CASCADE, 
related_name="credit_account")
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index a3b8610..4225956 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -385,8 +385,8 @@ def wire_transfer(amount,
                   subject):
     if debit_account.pk == credit_account.pk:
         return
-    float_amount = amounts.floatify(amount)
-    transaction_item = BankTransaction(amount=float_amount,
+    transaction_item = BankTransaction(amount_value=amount["value"],
+                                       amount_fraction=amount["fraction"],
                                        currency=amount["currency"],
                                        credit_account=credit_account,
                                        debit_account=debit_account,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]