Filters
Why don't the Card totals match the Filtered totals for that Card?
Applicable Versions: Single User Free, Single User Pro, Multi User Pro
The totals for your cards (billable dollars and unbilled dollars) should match the totals at the bottom of the Log Time screen, providing that the Filters match the card.
When you select a card on the Log Time tab, the filters are set to match those of the card- in this way the Cards can be thought of as a way to save filters. Having just clicked on a card, the heading of the Filters section will read something like "Filters for Selected Card" followed by the card name in green. This lets you know that the filters are those of the selected card. Should you then change the filters, the heading of the Filters section will read "Filters (no longer match selected card)". In this state, with the filters not matching, you should not expect the total at the bottom of the Log Time tab to match the total for the selected card.
If the filters match (the heading of the filters section reads "Filters for Selected Card") and the totals for the card still do not match the totals at the bottom of the screen, there is likely a mismatch between the relationships between the Card and its Time Records and the relationships between the Filters and their Time Records. These two relationships need to be symetrical- that is, they need to be based on exactly the same criteria.
The relationships to be conscered about are between Filters and FiltersTimeRecords, in the CCTime.fp7 file, and the relationship between TimeCards and CardTimeRecords in the CCTimeData file. The CCTime version of this relationship has two additional "Not equals" criteria that are not in the CCTimeData version of the relationship, but aside from that you should keep these relationships parallel as you're editing the files.
Note, if you’re making changes to CC Time, you can easily test for the situation where filters do or do not match the selecetd card. The field “Filters::FiltersMatchCardCalcGlob” will retirn a 1 if the filters match the selected card and will return a zero if the filters and selected card do not match.
How can I force users to log time against cards instead of using the Filters?
Applicable Versions: Single User Free, Single User Pro, Multi User Pro
This is easiy done by editing the “Test for Additional Criteria” script in CC Time. Simply replace the IF statement beginning that script with the following calc and then add your own comments to the error message: “Filters::FiltersMatchCardCalcGlob ≠ 1” This tests to see if the filters have been changed from matching the selected card.
You’ll also want to edit the “New Time Record” script in CCTime. This script begins with two If statements that test to see if the currently selected filters (and by extension, the selected card) exclude the current user or the current date. In both cases the script offers the use an opportunity to clear the filters if they wish: you’d want to remove this option from the script, simply exiting the script if either situation occurs.
With these changes, users will still be able to uze filters to browse time; should you wish to prohibit that you could also just remove the fiters section from the screen(s) on which non admin users log time.