]> wagnertech.de Git - timetracker.git/commitdiff
Introduced balance output for monthly quotas.
authorNik Okuntseff <support@anuko.com>
Sat, 22 Dec 2018 14:58:30 +0000 (14:58 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 22 Dec 2018 14:58:30 +0000 (14:58 +0000)
34 files changed:
WEB-INF/resources/ca.lang.php
WEB-INF/resources/cs.lang.php
WEB-INF/resources/da.lang.php
WEB-INF/resources/de.lang.php
WEB-INF/resources/en.lang.php
WEB-INF/resources/es.lang.php
WEB-INF/resources/et.lang.php
WEB-INF/resources/fa.lang.php
WEB-INF/resources/fi.lang.php
WEB-INF/resources/fr.lang.php
WEB-INF/resources/gr.lang.php
WEB-INF/resources/he.lang.php
WEB-INF/resources/hu.lang.php
WEB-INF/resources/it.lang.php
WEB-INF/resources/ja.lang.php
WEB-INF/resources/ko.lang.php
WEB-INF/resources/nl.lang.php
WEB-INF/resources/no.lang.php
WEB-INF/resources/pl.lang.php
WEB-INF/resources/pt-br.lang.php
WEB-INF/resources/pt.lang.php
WEB-INF/resources/ro.lang.php
WEB-INF/resources/ru.lang.php
WEB-INF/resources/sk.lang.php
WEB-INF/resources/sl.lang.php
WEB-INF/resources/sr.lang.php
WEB-INF/resources/sv.lang.php
WEB-INF/resources/tr.lang.php
WEB-INF/resources/zh-cn.lang.php
WEB-INF/resources/zh-tw.lang.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/time.tpl
plugins/MonthlyQuota.class.php
time.php

index 549241b06eef31dc926f84510c3cd742cd8709dc..b4d86993008de69395f5c2127360aa8f6cd91d42 100644 (file)
@@ -405,6 +405,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Aquest historial s\\\'ha guardat únicament amb l\\\'hora d\\\'inici. Aixó no és un error.',
index d66af403e62c95d922bfb2058643026de62e2c5f..d12be155e729c2e2fcde19ed5a42563d6a75f6d2 100644 (file)
@@ -415,6 +415,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Záznam byl uložen pouze s časem zahájení. Není to chyba.',
index 061b1fb61dc4a24b713cd535ac4c831d9a84d907..c4974513053b5054c3b39599ff7f04958020b2ac 100644 (file)
@@ -376,6 +376,9 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Uafsluttet',
 'form.time.remaining_quota' => 'Resterende kvota',
 'form.time.over_quota' => 'Over kvota',
+// TODO: translate the following.
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Denne post blev kun gemt med starttidspunkt. Det er ikke en fejl.',
index 82599a628e52904f44b55a463709391a4a3c144a..eab807e85a99bae8924b203952d7f1f8c3407df4 100644 (file)
@@ -357,6 +357,9 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Unvollständig',
 'form.time.remaining_quota' => 'Verbleibende Quote',
 'form.time.over_quota' => 'Über der Quote',
+// TODO: translate the following.
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Dieser Eintrag wurde ohne Startzeit gespeichert. Dies ist kein Fehler.',
index 5d2acd565f05f949c2ca5002170c595ea7e50a64..aadf6f5ac0271ed4ba6b911625a43fc4649828d9 100644 (file)
@@ -355,6 +355,8 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Uncompleted',
 'form.time.remaining_quota' => 'Remaining quota',
 'form.time.over_quota' => 'Over quota',
+'form.time.remaining_balance' => 'Remaining balance',
+'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'This record was saved with only start time. It is not an error.',
index 684d60a35778d54601cacb17e76de660e7b3947e..cc4fe03472fc89412444eddcff14d5b5d7811908 100644 (file)
@@ -418,6 +418,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Este historial fue guardado solamente con la hora de Inicio. Esto no es un error.',
index 97b92fc730b9fc244921feb02c42a253918e5345..a29929afd7080bc8d3caef78f2d1bb1cb753614b 100644 (file)
@@ -414,6 +414,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Kanne salvestati ainult alguse ajaga. See ei ole viga.',
index 4e298f3b8e15f40b0e439b91e2d38d2abee8b10e..f1a37b4f549f87a7f74d3c732d128d34bdc26070 100644 (file)
@@ -398,6 +398,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 // TODO: translate form.time_edit.uncompleted. 
index 7322bf90ef06b8b474cccdffcf1d2d1d19397569..065f71c1ce0033366fd9442b3b30f1b908285666 100644 (file)
@@ -384,6 +384,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Vain aloitusaika tallennettiin tietueeseen. Kyseessä ei ole virhe.',
index 7584f9c6e3c56a0a76ca1db3de134856868d8660..4c6d767497bf5ea8ae2735650244a632de0276b5 100644 (file)
@@ -373,6 +373,9 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Non terminée',
 'form.time.remaining_quota' => 'Quota restant',
 'form.time.over_quota' => 'Quota dépassé',
+// TODO: translate the following.
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Cet enregistrement a été sauvegardé avec une heure de début seulement. Il ne s\\\'agit pas d\\\'une erreur.',
index c354b28a65ad0816ee930c1509d9fa1b0530d637..6be29a04b3ab97b6de578bd14886549d20d25511 100644 (file)
@@ -365,6 +365,9 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Μη ολοκληρωμένο',
 'form.time.remaining_quota' => 'Υπολειπόμενη ποσόστωση',
 'form.time.over_quota' => 'Πάνω από το όριο',
+// TODO: translate the following.
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Η καταχώρηση αποθηκεύτηκε μόνο με ώρα έναρξης. Δεν είναι λάθος.',
index d81832cce9e81deecab9f80d021c4db7cf78bc91..d27edb8c7cc267b487f3dfd71897e6b1aa025da8 100644 (file)
@@ -405,6 +405,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'רישום זה נשמר עם שעת התחלה בלבד. זאת איננה טעות.',
index 2097f9908df0ad9dbc821cc8d531fa13c4eeb08c..27642b47864d498f4003538b9bf630e571da6305 100644 (file)
@@ -407,6 +407,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 // TODO: translate the following.
index 77581731aff2ea19af2f4dab27fbb318f5ba3051..8f35a78ec11050c97fdc28595b1084a0a7555ae7 100644 (file)
@@ -378,6 +378,9 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Incompleti',
 'form.time.remaining_quota' => 'Quota rimanente',
 'form.time.over_quota' => 'Sopra quota',
+// TODO: translate the following.
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Questo record è stato salvato con la sola ora di inzio attività. Non è un errore.',
index 3cb26d69cf1111fe00c55a0e5a508791294ad964..ea158793aab75818bd2edb325c48dc45061f46ed 100644 (file)
@@ -414,6 +414,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'このレコードは開始時間だけで保存されました。これはエラーではありません。',
index dc5a1a415696c21e70b71aae23b735bd41a8bd10..27cbe669297f3db4192a7b0be613abf472ac0aab 100644 (file)
@@ -413,6 +413,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => '이 기록은 시작 시간으로만 저장되었습니다. 이것은 오류는 아닙니다.',
index 99cab30c462a96ab1f17e9975868b5914c83e16a..b0ada311d2503956f7b9151c236caac62c6f9292 100644 (file)
@@ -358,6 +358,9 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Onvolledig',
 'form.time.remaining_quota' => 'Te werken uren voor de doelstelling',
 'form.time.over_quota' => 'Meer gewerkte uren dan de doelstelling',
+// TODO: translate the following.
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Dit tijdrecord is opgeslagen met alleen een starttijd. Dit is geen fout.',
index e3273ca07b56e413aaab2e7b4dc0557dec394736..34f4f6d30ec45c91547a4375f52a5a9670edb3ca 100644 (file)
@@ -410,6 +410,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Denne oppføringen ble lagret kun med starttid. Det er ikke en feil.',
index 461e65611624b66e31b40d4c3b33278de5e998ca..a9220c4eb2284527cd5edeca18d10f6a0c877dd1 100644 (file)
@@ -386,6 +386,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Ten wpis ma określony jedynie czas rozpoczęcia. To nie jest błąd.',
index 241f4544b18b371e17527364549dfe6b6103c058..ee699e11bee2fc9d3e43e122d041b25d021fbf2c 100644 (file)
@@ -381,6 +381,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Eesta entrada foi salva somente com hora de início. Não é um erro.',
index dad9124a4b3e0a4848517da73ae805a381ac5822..8a96bc88243e61ba560886f362c65520aed10a8b 100644 (file)
@@ -392,6 +392,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 // TODO: translate the following.
index c3a6077ba1c1b1668f15eb909422c492bc0b406c..4f027f6b0fc8c41ea9137dd09c6cf386fa7ff258 100644 (file)
@@ -415,6 +415,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Aceasta inregistrare a fost salvata numei cu timpul de inceput. Nu este o eroare.',
index 727ff51eeed13e3e1aea411f855eaecf8e8977e1..466f7cd1e987bb42102ad8adb0b4b3db04db332a 100644 (file)
@@ -352,6 +352,8 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Не завершено',
 'form.time.remaining_quota' => 'Доступная квота',
 'form.time.over_quota' => 'Превышение квоты',
+'form.time.remaining_balance' => 'Доступный баланс',
+'form.time.over_balance' => 'Превышение баланса',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Эта запись сохранена только со временем начала. Это не ошибка.',
index 1a87dd808d328be7ef84e934d47c89d90be1c525..0077e713de4aef29cfffac48de60d411e71a8b19 100644 (file)
@@ -396,6 +396,8 @@ $i18n_key_words = array(
 // TODO: translate the folllowing.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Tento záznam bol uložený iba s časom začiatku. Nie je to chyba.',
index 5b036edd674d9f52753d7750e889362819466c9e..9be563c428629574d375cc504634501be64391c7 100644 (file)
@@ -388,6 +388,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 // TODO: translate the following.
index a8d2bf8f4f293946131c69e869edbdebd961d704..270984d4598b54f6a032b14c8df88e739d4088b7 100644 (file)
@@ -384,6 +384,8 @@ $i18n_key_words = array(
 // TODO: translate the folllowing.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Izmena vremenske forme. Pogledajte primer na https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Ovaj zapis je sačuvan sa početnim vremenom i nije greška.',
index e009c0c57def8f13eba4a7a36134a10bb63adacb..815ad80e131aea7f9520f1d4b5a76b018b038847 100644 (file)
@@ -380,6 +380,9 @@ $i18n_key_words = array(
 'form.time.uncompleted' => 'Oavslutad',
 'form.time.remaining_quota' => 'Återstående kvot',
 'form.time.over_quota' => 'Kvoten överstigen',
+// TODO: translate the following.
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Den här tidsregistreringen har sparats utan sluttid. Fyll i en sluttid och klicka på Spara för att avsluta.',
index 48359a94196324a290a9ee548e7260515a72bef3..720475be6953bff806b94f0c04c819efa9242c20 100644 (file)
@@ -425,6 +425,8 @@ $i18n_key_words = array(
 // 'form.time.uncompleted' => 'Uncompleted',
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => 'Bu kayıt sadece başlangıç zamanıyla silindi. Bu hata değildir.',
index e753c32c394ec1fd31db9f75cd922b633781194c..aa9e7dea8a3e0c9e8f2715e2927a3cea5a0c465c 100644 (file)
@@ -397,6 +397,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => '该记录只保存了开始时间。这不是错误。',
index b9951b1ce22e39e6a9b55ff18c2311ad22bafcde..7346c9ad1b3aedaaecd455dbd4947c4427b46a00 100644 (file)
@@ -406,6 +406,8 @@ $i18n_key_words = array(
 // TODO: translate the following.
 // 'form.time.remaining_quota' => 'Remaining quota',
 // 'form.time.over_quota' => 'Over quota',
+// 'form.time.remaining_balance' => 'Remaining balance',
+// 'form.time.over_balance' => 'Over balance',
 
 // Editing Time Record form. See example at https://timetracker.anuko.com/time_edit.php (get there by editing an uncompleted time record).
 'form.time_edit.uncompleted' => '該記錄只保存了開始時間。這不是錯誤。',
index 19832de86169b399425e6a25fd568a580aedb2df..44b5b1800bec2d4b72f2a4d628fd068992cfdb98 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.34.4679 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.35.4680 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 76338706d2676f32cea469386e1c291f15848e80..7a360800b1b86ab61f3a7aea349e7d4e4628099d 100644 (file)
   </td>
 </tr>
 </table>
-{if $time_records}
+
 <table cellpadding="3" cellspacing="1" width="720">
   <tr>
     <td align="left">{$i18n.label.week_total}: {$week_total}</td>
   {if $user->isPluginEnabled('mq')}
   <tr>
     <td align="left">{$i18n.label.month_total}: {$month_total}</td>
+    {if $over_balance}
+    <td align="right">{$i18n.form.time.over_balance}: <span style="color: green;">{$balance_remaining}</span></td>
+    {else}
+    <td align="right">{$i18n.form.time.remaining_balance}: <span style="color: red;">{$balance_remaining}</span></td>
+    {/if}
+  </tr>
+  <tr>
+    <td></td>
     {if $over_quota}
     <td align="right">{$i18n.form.time.over_quota}: <span style="color: green;">{$quota_remaining}</span></td>
     {else}
   </tr>
   {/if}
 </table>
-{/if}
+
 {$forms.timeRecordForm.close}
index a1c1b5d0985ef06acb1fefecc3898ce69aa9cd0b..21854672bc2e0bef16fd938e1806649a38b0779e 100644 (file)
@@ -94,6 +94,25 @@ class MonthlyQuota {
     return $userMinutes;
   }
 
+  // getUserQuotaFrom1st - obtains a quota for user
+  // from 1st of the month up to and inclusive of $selected_date.
+  public function getUserQuotaFrom1st($selected_date) {
+    // TODO: we may need a better algorithm here. Review.
+    $monthQuotaMinutes = $this->getUserQuota($selected_date->mYear, $selected_date->mMonth);
+    $workdaysInMonth = $this->getNumWorkdays($selected_date->mMonth, $selected_date->mYear);
+
+    // Iterate from 1st up to selected date.
+    $workdaysFrom1st = 0;
+    for ($i = 1; $i <= $selected_date->mDate; $i++) {
+      $date = "$selected_date->mYear-$selected_date->mMonth-$i";
+      if (!ttTimeHelper::isWeekend($date) && !ttTimeHelper::isHoliday($date)) {
+        $workdaysFrom1st++;
+      }
+    }
+    $quotaMinutesFrom1st = (int) ($monthQuotaMinutes * $workdaysFrom1st / $workdaysInMonth);
+    return $quotaMinutesFrom1st;
+  }
+
   // getMany - returns an array of quotas for a given year for group.
   private function getMany($year){
     $sql = "select month, minutes from tt_monthly_quotas".
index ac6b69b5f23dde902116f26b918338c72843c73b..8dbffecfbe4006e6dd7afb5f06087c647dd92b11 100644 (file)
--- a/time.php
+++ b/time.php
@@ -86,10 +86,15 @@ if ($user->isPluginEnabled('mq')){
   require_once('plugins/MonthlyQuota.class.php');
   $quota = new MonthlyQuota();
   $month_quota_minutes = $quota->getUserQuota($selected_date->mYear, $selected_date->mMonth);
+  $quota_minutes_from_1st = $quota->getUserQuotaFrom1st($selected_date);
   $month_total = ttTimeHelper::getTimeForMonth($selected_date);
-  $minutes_left = $month_quota_minutes - ttTimeHelper::toMinutes($month_total);
+  $month_total_minutes = ttTimeHelper::toMinutes($month_total);
+  $balance_left = $quota_minutes_from_1st - $month_total_minutes;
+  $minutes_left = $month_quota_minutes - $month_total_minutes;
   
   $smarty->assign('month_total', $month_total);
+  $smarty->assign('over_balance', $balance_left < 0);
+  $smarty->assign('balance_remaining', ttTimeHelper::toAbsDuration($balance_left));
   $smarty->assign('over_quota', $minutes_left < 0);
   $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left));
 }