Phyks (Lucas Verney) 4 years ago
parent
commit
612a715efc
5 changed files with 7 additions and 7 deletions
  1. 1
    1
      i18n/en.php
  2. 1
    1
      i18n/fr.php
  3. 2
    2
      index.php
  4. 2
    2
      install.php
  5. 1
    1
      tpl/default/see_paybacks.html

+ 1
- 1
i18n/en.php View File

@@ -121,7 +121,7 @@ $i18n['confirm'] = 'Confirm';
121 121
 $i18n['a_bill'] = 'a bill';
122 122
 $i18n['doesnt_exist'] = "doesn't exist";
123 123
 $i18n['deleted_user'] = 'Deleted user';
124
-$i18n['confirm_payback'] = "Are you sure you want to confirm this payback? This action can't be undone easily.";
124
+$i18n['confirm_global_payback'] = "Are you sure you want to confirm this payback? This action can't be undone easily.";
125 125
 $i18n['go_back_list_global_paybacks'] = 'Go back to global paybacks list';
126 126
 $i18n['submit'] = 'Submit';
127 127
 

+ 1
- 1
i18n/fr.php View File

@@ -121,7 +121,7 @@ $i18n['confirm'] = 'Confirmer';
121 121
 $i18n['a_bill'] = 'une dépense';
122 122
 $i18n['doesnt_exist'] = "n'existe pas";
123 123
 $i18n['deleted_user'] = 'Utilisateur supprimé';
124
-$i18n['confirm_payback'] = "Êtes-vous sûr de vouloir confirmer ce remboursement ? Cette action ne peut pas être annulée simplement.";
124
+$i18n['confirm_global_payback'] = "Êtes-vous sûr de vouloir confirmer ce remboursement ? Cette action ne peut pas être annulée simplement.";
125 125
 $i18n['go_back_list_global_paybacks'] = 'Retour à la liste des remboursements globaux';
126 126
 $i18n['submit'] = 'Envoyer';
127 127
 

+ 2
- 2
index.php View File

@@ -1188,7 +1188,7 @@
1188 1188
                                 }
1189 1189
                             }
1190 1190
 
1191
-                            if($balances[$user1->getId()][$user2->getId()] == 0) {
1191
+                            if(abs($balances[$user1->getId()][$user2->getId()]) < 0.01) {
1192 1192
                                 $balances[$user1->getId()][$user2->getId()] = '-';
1193 1193
                                 $balances[$user2->getId()][$user1->getId()] = '-';
1194 1194
                             }
@@ -1209,7 +1209,7 @@
1209 1209
                         $user_balance = $user_balance + $balances[$user1->getId()][$current_user->getId()];
1210 1210
                     }
1211 1211
 
1212
-                    $tpl->assign('user_balance', round($user_balance,2));
1212
+                    $tpl->assign('user_balance', round($user_balance, 2));
1213 1213
                 }
1214 1214
 
1215 1215
                 $tpl->assign('users', secureDisplay($users_list));

+ 2
- 2
install.php View File

@@ -75,8 +75,8 @@
75 75
                 amount INT(11),
76 76
                 from_user INT(11),
77 77
                 FOREIGN KEY (from_user) REFERENCES '.$mysql_prefix.'Users(id) ON DELETE CASCADE,
78
-                to_user INT(11)
79
-                FOREIGN KEY (to_user) REFERENCES '.$mysql_prefix.'Users(id) ON DELETE CASCADE,
78
+                to_user INT(11),
79
+                FOREIGN KEY (to_user) REFERENCES '.$mysql_prefix.'Users(id) ON DELETE CASCADE
80 80
             ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci');
81 81
 
82 82
             // Create table "GlobalPaybacks"

+ 1
- 1
tpl/default/see_paybacks.html View File

@@ -41,7 +41,7 @@
41 41
                         {else}
42 42
                             <td>
43 43
                                 {if condition="$table[$key1][$key2] != 0"}
44
-                                <a href="?do=confirm_global_paybacks&amp;from={$key1}&amp;to={$key2}&amp;payback_id={$global_paybacks->getId()}&amp;token={$token}" title="Confirm payback" onclick="return confirm("{$i18n['confirm_payback']}");">{$table[$key1][$key2]}</a>
44
+                                <a href="?do=confirm_global_paybacks&amp;from={$key1}&amp;to={$key2}&amp;payback_id={$global_paybacks->getId()}&amp;token={$token}" title="Confirm payback" onclick="return confirm("{$i18n['confirm_global_payback']}");">{$table[$key1][$key2]}</a>
45 45
                                 {else}
46 46
                                     -
47 47
                                 {/if}