Browse Source

Show overdue status of reminders

Neal Wilson 9 years ago
parent
commit
d42965abb4
1 changed files with 4 additions and 8 deletions
  1. 4
    8
      config/Reports/reminders.xml

+ 4
- 8
config/Reports/reminders.xml View File

45
                         if(reminder.value == 0 || (reminder.value < Number(dq.value(0))))
45
                         if(reminder.value == 0 || (reminder.value < Number(dq.value(0))))
46
                         {
46
                         {
47
                             proportion = 1;
47
                             proportion = 1;
48
-                            remain = 0;
49
                         }
48
                         }
50
                         else
49
                         else
51
                         {
50
                         {
52
                             proportion = Number(dq.value(0)) / reminder.value;
51
                             proportion = Number(dq.value(0)) / reminder.value;
53
-                            remain = (reminder.value - Number(dq.value(0))).toFixed(0);
54
                         }
52
                         }
53
+                        remain = (reminder.value - Number(dq.value(0))).toFixed(0);
55
                         reminder.completion = proportion;
54
                         reminder.completion = proportion;
56
                         reminder.detail = remain + unittext;
55
                         reminder.detail = remain + unittext;
57
                         dq = dq.invalidate();
56
                         dq = dq.invalidate();
68
                         if(reminder.value == 0 || (reminder.value < Number(dq.value(0))))
67
                         if(reminder.value == 0 || (reminder.value < Number(dq.value(0))))
69
                         {
68
                         {
70
                             proportion = 1;
69
                             proportion = 1;
71
-                            remain = 0;
72
                         }
70
                         }
73
                         else
71
                         else
74
                         {
72
                         {
75
                             proportion = Number(dq.value(0)) / reminder.value;
73
                             proportion = Number(dq.value(0)) / reminder.value;
76
-                            remain = reminder.value - Number(dq.value(0));
77
                         }
74
                         }
75
+                        remain = reminder.value - Number(dq.value(0));
78
                         reminder.completion = proportion;
76
                         reminder.completion = proportion;
79
                         reminder.detail = remain + " Days";
77
                         reminder.detail = remain + " Days";
80
                         dq = dq.invalidate();
78
                         dq = dq.invalidate();
91
                         if(reminder.value == 0 || (reminder.value < Number(dq.value(0))))
89
                         if(reminder.value == 0 || (reminder.value < Number(dq.value(0))))
92
                         {
90
                         {
93
                             proportion = 1;
91
                             proportion = 1;
94
-                            remain = 0;
95
                         }
92
                         }
96
                         else
93
                         else
97
                         {
94
                         {
98
                             proportion = Number(dq.value(0)) / reminder.value;
95
                             proportion = Number(dq.value(0)) / reminder.value;
99
-                            remain = reminder.value - Number(dq.value(0));
100
                         }
96
                         }
97
+                        remain = reminder.value - Number(dq.value(0));
101
                         reminder.completion = proportion;
98
                         reminder.completion = proportion;
102
                         reminder.detail = remain + " Batches";
99
                         reminder.detail = remain + " Batches";
103
                         dq = dq.invalidate();
100
                         dq = dq.invalidate();
114
                         if(reminder.value == 0 || (reminder.value < Number(dq.value(0))))
111
                         if(reminder.value == 0 || (reminder.value < Number(dq.value(0))))
115
                         {
112
                         {
116
                             proportion = 1;
113
                             proportion = 1;
117
-                            remain = 0;
118
                         }
114
                         }
119
                         else
115
                         else
120
                         {
116
                         {
121
                             proportion = Number(dq.value(0)) / reminder.value;
117
                             proportion = Number(dq.value(0)) / reminder.value;
122
-                            remain = reminder.value - Number(dq.value(0));
123
                         }
118
                         }
119
+                        remain = reminder.value - Number(dq.value(0));
124
                         reminder.completion = proportion;
120
                         reminder.completion = proportion;
125
                         reminder.detail = remain.toFixed(1) + " Hours";
121
                         reminder.detail = remain.toFixed(1) + " Hours";
126
                         dq = dq.invalidate();
122
                         dq = dq.invalidate();

Loading…
Cancel
Save