Skip to main content

Module projects

Module projects 

Source
Expand description

Projects, time and invoices, for the window: a project’s page, the Time page, time noted by hand, an invoice made from a project’s unbilled hours (its record kept, its hours marked, its payment expected in the project’s budget), and paid.

Structs§

TimeChange 🔒
A stretch of time changed, as its form gives it: its day, from when to when, what it was, its task and project.
TimeEdit 🔒
Time noted by hand, as its form gives it.

Constants§

INVOICES 🔒
The lease’s name for invoices’ numbers.

Functions§

change_line 🔒
A line of the budgets’ file changed: label, amount, date; only when it is still the line the page showed (shown: its row, JSON). Returns what went wrong, else “”.
change_time 🔒
Any stretch of time changed once noted, by the timer or by hand: its start, its end, what it was, its task, its project. Billed time stays as billed. Returns what went wrong, else “”.
client_of 🔒
Who a project bills: the contact it names, with its postal address, else the name as written.
entries 🔒
Every session with its project and title.
export_time_csv 🔒
A project’s billable time from from to to, written as a spreadsheet at target (a file address); returns the file written.
invoice_again 🔒
An invoice made before, to print again: {“html”, “pdf”}.
invoices_held_elsewhere 🔒
Why invoices cannot be numbered here now, as the window’s answer ({“error”, “elsewhere”}: “elsewhere” offers to make them here); None when they can.
keep_invoices 🔒
This computer’s claim on invoices, renewed each minute while you make some (a sender set).
line_said 🔒
What a line’s change or removal came to, said: “” when done; when the line is not in the file as the page showed it (changed meanwhile, here by hand or on another device), that nothing was changed.
make_invoice 🔒
Makes the invoice of a project’s unbilled hours: its record, its hours marked, its payment expected in the project’s budget. Returns {“number”, “html”, “pdf”} for the window to print, or {“error”}.
note_time 🔒
Notes time by hand; returns what went wrong, else “”.
page 🔒
One project’s page, as JSON; “” when it is gone.
pdf_path 🔒
Where an invoice’s PDF goes: the folder set, else ~/Documents/Invoices (Factures in French).
percent_decoded 🔒
A file address’s path with its %-escapes undone (“Mes%20factures” → “Mes factures”).
remove 🔒
A project taken out of the list; its tasks, notes, mail and time stay. Returns what went wrong, else “”.
remove_budget 🔒
A budget taken out, by its id (its lines stay in the file); returns what went wrong, else “”. A line is taken out by remove_line.
remove_line 🔒
One line of the budgets’ file taken out (sioul:budget/<budget>/<place>), only when it is still the line the page showed (shown: its row, JSON); returns what went wrong, else “”.
remove_time 🔒
Takes out time noted by hand; billed time stays.
rows 🔒
The projects, for the list.
save 🔒
Saves a project from its form (a new one when id is empty); returns {“id”} or {“error”}.
save_budget 🔒
A budget made (id empty) or changed; returns {“id”} or {“error”}.
set_paid 🔒
An invoice paid (or not): its record says so, and its budget line is no longer planned but dated today.
store 🔒
take_invoices 🔒
Invoices made on this computer from now on, on purpose; returns what to say.
task_choices 🔒
The tasks time can be given to, as JSON [{uid, title, project}]: the open ones, and keep (the stretch’s own task, done or not).
time 🔒
The Time page for period (“week”, “month”, “year”) around anchor, one project or all.