Recued
Menu
← Back to recipes

Pull hours into pending items

by recued-core v6 65 views

Use “Pull hours into pending items” in Recued. Turn unbilled time entries into pending billable items, priced at a rate you give.

Complete workflow

Invoice Book 12 pinned recipes

Use Invoice Book in Recued for invoicing, receivables, getting paid, and freelance. It includes 18 built-in actions and 11 ready-to-run workflows. Actions that change data use Recued's approval controls.

You are viewing one recipe in this workflow. Installing it opens the complete pack so its other recipes and background automations arrive together.

Use “Pull hours into pending items” in Recued. Turn unbilled time entries into pending billable items, priced at a rate you give.

pack:invoice-bookinvoicingbillablebridge
by recued-core pinned v6

Use “Issue an invoice” in Recued. Turn the entries you picked into an invoice: lines frozen at issue time, total computed once from minutes, and a balance that payments come off.

pack:invoice-bookinvoicingreceivablesrecords
by recued-core pinned v6

Use “Record a payment” in Recued. Take a payment off an invoice's balance. Part payments are supported; overpayment is refused rather than absorbed, and the invoice settles when the balance reaches zero.

pack:invoice-bookinvoicingreceivablespayments
by recued-core pinned v6

Use “Who owes you” in Recued. Every open invoice with what is outstanding, which are overdue, and the oldest one still unpaid.

pack:invoice-bookinvoicingreceivablesoverdue
by recued-core pinned v4

Use “What each client owes” in Recued. One line per client: what is outstanding, across how many invoices, and how long the oldest has been due.

pack:invoice-bookinvoicingrecordsaggregate
by recued-core pinned v2
Show all 12 recipes

Use “Add something billable” in Recued. Anything you can charge for that is not logged time — a fixed fee, materials, a call-out. A negative amount is a credit.

pack:invoice-bookinvoicingbillablerecords
by recued-core pinned v4

Use “Delete a pending item” in Recued. Remove something from the pending list. If it came from logged hours, you choose whether those hours go back on the unbilled list or get deleted with it.

pack:invoice-bookinvoicingbillablerecords
by recued-core pinned v6

Use “What could go on an invoice” in Recued. Everything billable and not yet invoiced — hours you pulled across and fees you typed in — each with its id, so you can choose.

pack:invoice-bookinvoicingbillablerecords
by recued-core pinned v3

Use “Carry a balance forward” in Recued. Close a part-paid invoice and issue a new one for exactly what is left, with the VAT carried in proportion. The new invoice takes no items.

pack:invoice-bookinvoicingreceivablesrecords
by recued-core pinned v6

Use “One invoice” in Recued. Open one invoice from the list that names it, and read everything recorded about that invoice on one page.

pack:invoice-bookinvoicedetailnavigation
by recued-core pinned v1

Use “One billable item” in Recued. Open one billable item from the list that names it, and read everything recorded about that billable item on one page.

pack:invoice-bookbillable-itemdetailnavigation
by recued-core pinned v1
View pack details, dependencies, and permissions →

The bridge

This is the one recipe in invoice-book that reads another pack, and the pack declares that dependency rather than reaching across quietly.

⛔⛔ AN HOUR CANNOT BECOME TWO BILLABLE ITEMS. Every item this creates carries the time entry's id in source_ref, and a second pull skips anything already carried across. It looks each candidate up by that id (source_ref in the candidates' ids), never by reading a page of every item ever pulled: until 2026-10-11 it read 200 items in id order, which is no order at all, so once more than 200 existed the check could miss the one item that mattered. Without that, pulling the same range twice would put the same hour on two invoices — the exact failure bill-period's never-bill-twice guard exists to stop, arriving through a side door that guard cannot see.

⛔⛔ PULLED HOURS ARE MARKED CLAIMED IN billable-hours, with invoice_ref set to item:<id> so the claim points at what made it. This is deliberate and it is the opposite of what an earlier version did.

⚠ Two packs write that flag, and that is correct — because they write it with the SAME meaning: this hour has been claimed for billing. bill-period claims by invoicing directly; this claims by turning the hour into a pending item. A single guard then covers both paths. The version that left the entries untouched had the opposite property: neither path could see the other, so an hour pulled here could still be billed there, and keeping the two ledgers straight was left to whoever remembered.

⚠ A claim is not an invoice. Delete the pending item and the hour stays claimed — the same as running bill-period and never sending the invoice. invoice_ref carries the item id so you can see what happened.

⚠ If a claim fails the card says so loudly. An hour that became an item but was not claimed is exactly the double-billable state, and it must not be reported as a clean run. Running it again finishes the job: an unclaimed hour that already has an item is claimed against that item, and no second item is made. (Until 2026-10-11 the re-run skipped it, claimed nothing and said nothing, so the hour stayed billable.)

⚠ One run pulls at most limit entries (200), oldest first from the start of the range. The range is read upward from its start, so older unbilled hours cannot fill the page and hide it (they did until 2026-10-11: 200 unbilled hours before the range pulled nothing in it). When a run reaches the limit the card says there may be more; run it again.

⚠ Pricing happens here, once, at the rate you give. Items carry money; hours carry minutes. Changing the rate afterwards does not reprice an item that already exists, which is correct — you decided a price.

How it works 61 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Process (61 steps)
■ engagement_id trim
Trim whitespace from setting engagement id
■ has_engagement compare
Check if engagement id has data
⚠ engagement_guard guard
Stop if has engagement equals
■ rate_positive compare
Check if setting rate per hour is greater than 0
⚠ rate_guard guard
Stop if rate positive equals
■ engagement_ref template
Generate text from a template
■ now_iso date_add
Add 0 seconds to
■ today_local date_format
Format as a date
■ today default
Apply default
■ to_in trim
Trim whitespace from setting to date
■ to_date default
Apply default
■ from_in trim
Trim whitespace from setting from date
■ from_date default
Apply default
■ range_days date_diff
Calculate days between from date and to date
■ range_valid compare
Check if range days is at least 0
⚠ range_guard guard
Stop if range valid equals
◆ entries recued-core.billable-hours.entry.search
Search entry on billable hours
◆ after_to recued-core.billable-hours.entry.search
Search entry on billable hours
■ defaults defaults
Apply defaults
■ after_ids pluck
Extract id from each item
■ in_range filter
Filter by condition
■ candidate_count count
Count items in in range
■ row_count count
Count items in rows
■ page_all_in_range compare
Check if candidate count equals row count
■ has_next_page compare
Check if entries next cursor has data
■ more_left all
Check if all conditions are true
■ candidate_ids pluck
Extract id from each item
■ id_chunks chunk
Apply chunk
◆ existing_items recued-core.invoice-book.billable_item.search
Search billable item on invoice book
skip: step.candidate_count equal 0
◆ existing_items_more recued-core.invoice-book.billable_item.search
Search billable item on invoice book
skip: step.candidate_count less_or_equal 100
■ existing_found defaults
Apply defaults
■ existing_rows flatten
Flatten nested lists in
■ already_pulled pluck
Extract source_ref from each item
■ fresh filter
Filter by condition
■ fresh_count count
Count items in fresh
■ reclaim_rows filter
Filter by condition
■ reclaim_lines enrich_by
Apply enrich_by
■ reclaim_count count
Count items in reclaim rows
■ lines map
Extract from each item
■ priced map
Extract from each item
■ hours_priced map
Extract from each item
◆ created recued-core.invoice-book.billable_item.create
Create billable item on invoice book
■ results map
Extract from each item
■ ok_rows filter
Filter by condition
■ failed_rows filter
Filter by condition
■ created_count count
Count items in ok rows
■ reclaim_claims map
Extract from each item
■ claims flatten
Flatten nested lists in
■ claims_count count
Count items in claims
◆ claim recued-core.billable-hours.entry.update
Update entry on billable hours
■ claim_results map
Extract from each item
■ claimed_ok filter
Filter by condition
■ claimed_count count
Count items in claimed ok
■ claims_complete compare
Check if claimed count equals claims count
■ claim_warning ternary
Apply ternary
■ more_warning ternary
Apply ternary
■ failed_count count
Count items in failed rows
■ value_raw sum
Sum values in
■ value round
Round value raw to 2 decimal places
■ table to_table
Format results as a data table
■ card to_summary
Format results as a summary card
▼
Output
summary card
table table
Settings 6 configurable

Configurable at install. Defaults shown — change them anytime in Recued.

limit setting = 200
to date setting =
from date setting =
engagement id setting = [object Object]
rate per hour setting = 0
client contact setting =

Uses (4 operations)

Pack operation Search entry on billable hours recued-core.billable-hours.entry.search
Pack operation Search billable item on invoice book recued-core.invoice-book.billable_item.search
Pack operation Create billable item on invoice book recued-core.invoice-book.billable_item.create
Pack operation Update entry on billable hours recued-core.billable-hours.entry.update

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

What it's allowed to do

Write Pack Invoice Book external change
Read: billable_item.search · No approvalWrite: billable_item.create · No approval

2 more aren't listed here. You'll see them at install.

About

Tags

pack:invoice-bookinvoicingbillablebridgerecordsv2

Details

61 steps 6 configurable settings recipe_id: pull-billable-hours