Example #1
0
def command(timebook, config, rate, sheet, **kwargs):
    # get the db
    cfg=parse_config(config)
    db=Database(timebook, cfg)

    sheet = sheet or db.get_current_sheet()
    if sheet not in db.get_sheet_names():
        parser.error('%s is not a known timesheet' % sheet)

    money(db, sheet, rate)
Example #2
0
def command(timebook, config, at, sheet, **kwargs):
    # get the db
    cfg=parse_config(config)
    db=Database(timebook, cfg)

    sheet = sheet or db.get_current_sheet()
    timestamp = parse_date_time_or_now(at)

    if sheet not in db.get_sheet_names():
        parser.error('%s is not a known timesheet' % sheet)

    end(db, sheet, timestamp)