Recued
Menu
← Back to recipes

Pull hours into pending items

by recued-core v2 8 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 10 pinned recipes

Use Invoice Book in Recued for invoicing, receivables, getting paid, and freelance. It includes 17 built-in actions and 9 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 v2

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 v2

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 v2

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 v2

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 10 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 v2

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 v2

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 v2

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 v2
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. 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.

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 45 steps

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

Process (45 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_parts split
Split now iso into parts
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
entries ?
before_from ?
defaults defaults
Apply defaults
before_ids pluck
Extract id from each item
in_range filter
Filter by condition
candidate_count count
Count items in in range
existing_items ?
existing_rows default
Apply default
already_pulled pluck
Extract source_ref from each item
fresh filter
Filter by condition
fresh_count count
Count items in fresh
skipped math
Calculate: {{step.candidate_count}} - {{step.fresh_count}}
lines map
Extract from each item
priced map
Extract from each item
hours_priced map
Extract from each item
created ?
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
claims filter
Filter by condition
claim ?
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 created count
claim_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
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 =

About

Tags

pack:invoice-bookinvoicingbillablebridgerecordsv2

Details

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