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)
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)