From 612a715efcf4ad801811f9ef8f246aacaf2ebbec Mon Sep 17 00:00:00 2001 From: Phyks Date: Sun, 31 Aug 2014 18:49:52 +0200 Subject: [PATCH] Fix i18n --- i18n/en.php | 2 +- i18n/fr.php | 2 +- index.php | 4 ++-- install.php | 4 ++-- tpl/default/see_paybacks.html | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/i18n/en.php b/i18n/en.php index b6f2153..0fdce12 100644 --- a/i18n/en.php +++ b/i18n/en.php @@ -121,7 +121,7 @@ $i18n['confirm'] = 'Confirm'; $i18n['a_bill'] = 'a bill'; $i18n['doesnt_exist'] = "doesn't exist"; $i18n['deleted_user'] = 'Deleted user'; -$i18n['confirm_payback'] = "Are you sure you want to confirm this payback? This action can't be undone easily."; +$i18n['confirm_global_payback'] = "Are you sure you want to confirm this payback? This action can't be undone easily."; $i18n['go_back_list_global_paybacks'] = 'Go back to global paybacks list'; $i18n['submit'] = 'Submit'; diff --git a/i18n/fr.php b/i18n/fr.php index a8f4553..b84196d 100644 --- a/i18n/fr.php +++ b/i18n/fr.php @@ -121,7 +121,7 @@ $i18n['confirm'] = 'Confirmer'; $i18n['a_bill'] = 'une dépense'; $i18n['doesnt_exist'] = "n'existe pas"; $i18n['deleted_user'] = 'Utilisateur supprimé'; -$i18n['confirm_payback'] = "Êtes-vous sûr de vouloir confirmer ce remboursement ? Cette action ne peut pas être annulée simplement."; +$i18n['confirm_global_payback'] = "Êtes-vous sûr de vouloir confirmer ce remboursement ? Cette action ne peut pas être annulée simplement."; $i18n['go_back_list_global_paybacks'] = 'Retour à la liste des remboursements globaux'; $i18n['submit'] = 'Envoyer'; diff --git a/index.php b/index.php index 6fac5fc..49948d8 100644 --- a/index.php +++ b/index.php @@ -1188,7 +1188,7 @@ } } - if($balances[$user1->getId()][$user2->getId()] == 0) { + if(abs($balances[$user1->getId()][$user2->getId()]) < 0.01) { $balances[$user1->getId()][$user2->getId()] = '-'; $balances[$user2->getId()][$user1->getId()] = '-'; } @@ -1209,7 +1209,7 @@ $user_balance = $user_balance + $balances[$user1->getId()][$current_user->getId()]; } - $tpl->assign('user_balance', round($user_balance,2)); + $tpl->assign('user_balance', round($user_balance, 2)); } $tpl->assign('users', secureDisplay($users_list)); diff --git a/install.php b/install.php index c59ba24..17ff90a 100644 --- a/install.php +++ b/install.php @@ -75,8 +75,8 @@ amount INT(11), from_user INT(11), FOREIGN KEY (from_user) REFERENCES '.$mysql_prefix.'Users(id) ON DELETE CASCADE, - to_user INT(11) - FOREIGN KEY (to_user) REFERENCES '.$mysql_prefix.'Users(id) ON DELETE CASCADE, + to_user INT(11), + FOREIGN KEY (to_user) REFERENCES '.$mysql_prefix.'Users(id) ON DELETE CASCADE ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci'); // Create table "GlobalPaybacks" diff --git a/tpl/default/see_paybacks.html b/tpl/default/see_paybacks.html index dd963d3..b775e28 100644 --- a/tpl/default/see_paybacks.html +++ b/tpl/default/see_paybacks.html @@ -41,7 +41,7 @@ {else} {if condition="$table[$key1][$key2] != 0"} - {$table[$key1][$key2]} + {$table[$key1][$key2]} {else} - {/if}