key Log In

You are here: wiki.fini > TWiki Web > AccountLedgerComment

Start of topic | Skip to actions
%TMPL:DEF{PROMPT:accountledger_table}%
%TABLE{ valign="top" }%
| <b>Add new ledger entry:</b> |||||
|  Description: | <input %DISABLED% type="text" size="90" name="descr" value="" /> ||||
|  Made By: | %WIKIUSERNAME%    | &nbsp; Date: <input %DISABLED% type="text" size="12" name="date" value="%SERVERTIME{$mo/$day/$year}%" /> | &nbsp; Debit: <input type="text" size="6" name="debit" value="" /> | &nbsp; Credit: <input type="text" size="6" name="credit" value="" /> <input %DISABLED% type="submit" value="%button|Add Entry%" /> |
%TMPL:END%

%TMPL:DEF{OUTPUT:accountledger_table}%%POS:BEFORE%| <!--LEDGERITEM--> | <!-- %MAINWEB%.%USERNAME% --> | %URLPARAM{"date"}% | %URLPARAM{"descr"}% | %URLPARAM{"debit"}% | %URLPARAM{"credit"}% |  %CALC{ %BALANCE% }% |
%TMPL:END%

Time Clock Variation

%TMPL:DEF{PROMPT:timeclock}%
<link type="text/css" rel="stylesheet" href="%PUBURL%/%TWIKIWEB%/JSCalendarContrib/calendar-system.css" /> 
<style>.calendar {z-index:2000;}</style>
%TABLE{ valign="top" }%
| <b>Add new ledger entry:</b> ||||||
|  Description: | <input %DISABLED% type="text" size="90" name="descr" value="" /> |||||
|  Made By: | %WIKIUSERNAME%    | &nbsp; Date: <input %DISABLED% type="text" size="10" name="date" value="%SERVERTIME{$mo/$day/$year}%" /> | <input type="text" id="clock_start_time" name="clock_start_time" size="14" readonly="1" /> | <input type="text" id="clock_end_time" name="clock_end_time" size="14" readonly="1" /> | <input type="submit"value="Submit" /> |

</fieldset>
<!-- end of the form elements -->

<!-- start of the associated javascript -->
<!-- <pre> -->

<script type="text/javascript">

var clockStartTime; 
var clockEndTime;
function updateClockStartTime(cal) {
    var field = document.getElementById("clock_start_time");
    if (field == cal.params.inputField) {
        /* updating clock start time */
        clockStartTime = cal.date.getTime();
       if (clockEndTime == null || clockStartTime > clockEndTime) {
            field = document.getElementById("clock_end_time");
            field.value = cal.date.print("%Y/%m/%d %H:%M");
        }
    }
    else {
        /* updating clock end time */
        clockEndTime = cal.date.getTime();
    }
}

function setDisabledEndDates(date, y, m, d) {
    var field = document.getElementById("appt_start_date");
    /* appointment end date */
    return (date.getTime() < (apptStartDate - 3600*24*999));
}

Calendar.setup({
    inputField     :    "clock_start_time",
    ifFormat       :    "%Y/%m/%d %H:%M",
    showsTime   :    true,
    time24         :    false,
    onUpdate     :    updateClockStartTime,
});
Calendar.setup({
    inputField     :    "clock_end_time",
    ifFormat       :   "%Y/%m/%d %H:%M",
    showsTime  :    true,
    time24         :    false,
    onUpdate     :    updateClockStartTime,
});

</script>
<!-- </pre> -->
<!-- end of the associated javascript -->

%TMPL:END%

%TMPL:DEF{OUTPUT:timeclock}%%POS:BEFORE%| <!--LEDGERITEM--> | <!-- %MAINWEB%.%USERNAME% --> | %URLPARAM{"date"}% | %URLPARAM{"descr"}% | %URLPARAM{"clock_start_time"}% | %URLPARAM{"clock_end_time"}% |  %CALC{ %HOURSWORKED% }% | %CALC{ %HOURSBALANCE% }% |
%TMPL:END%

This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding wiki.fini? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.AccountLedgerComment