> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equated.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect an invoice (AR)

> Record what a customer owes and close it when the deposit lands.

export const AgentChat = ({messages = []}) => <div style={{
  border: "1px solid rgba(128,128,128,0.18)",
  borderRadius: "12px",
  padding: "16px",
  background: "rgba(128,128,128,0.05)",
  display: "flex",
  flexDirection: "column",
  gap: "14px",
  fontSize: "14px",
  lineHeight: 1.5,
  color: "inherit"
}}>
    {messages.map((m, i) => m.from === "you" ? <div key={i} style={{
  alignSelf: "flex-end",
  maxWidth: "85%",
  textAlign: "right"
}}>
          <div style={{
  fontSize: "11px",
  opacity: 0.5,
  marginBottom: "3px"
}}>You</div>
          <div style={{
  display: "inline-block",
  background: "rgba(128,128,128,0.16)",
  color: "inherit",
  padding: "8px 12px",
  borderRadius: "12px 12px 2px 12px",
  whiteSpace: "pre-wrap",
  textAlign: "left"
}}>
            {m.text}
          </div>
        </div> : <div key={i} style={{
  alignSelf: "flex-start",
  maxWidth: "90%"
}}>
          <div style={{
  display: "flex",
  alignItems: "center",
  gap: "6px",
  marginBottom: "4px"
}}>
            <span style={{
  fontSize: "11px",
  opacity: 0.5
}}>Agent</span>
            {m.tool ? <span style={{
  fontSize: "11px",
  opacity: 0.6,
  background: "rgba(128,128,128,0.15)",
  borderRadius: "6px",
  padding: "1px 6px"
}}>
                used {m.tool}
              </span> : null}
          </div>
          <div style={{
  whiteSpace: "pre-wrap"
}}>{m.text}</div>
          {m.choices ? <div style={{
  display: "flex",
  flexWrap: "wrap",
  gap: "6px",
  marginTop: "10px"
}}>
              {m.choices.map((c, j) => {
  const rec = c.toLowerCase().includes("recommend");
  return <span key={j} style={{
    borderRadius: "999px",
    padding: "4px 12px",
    fontSize: "13px",
    color: "inherit",
    border: "1px solid " + (rec ? "rgba(128,128,128,0.45)" : "rgba(128,128,128,0.25)"),
    background: rec ? "rgba(128,128,128,0.12)" : "transparent",
    fontWeight: rec ? 600 : 400
  }}>
                    {c}
                  </span>;
})}
            </div> : null}
        </div>)}
  </div>;

An invoice is money a customer owes you. Recording it before they pay matters, because it shows the revenue you've earned and the cash you're still waiting on.

"Accounts receivable" is just the accounting term for one question: who owes us money?

## Example

You invoice a customer \$18,000 for a renovation milestone. They pay two weeks later. Equated records the invoice when you issue it and links the bank deposit when the money arrives.

## Two ways to do it

<Tabs>
  <Tab title="In the app">
    <Steps>
      <Step title="Create or import the invoice">
        The invoice enters Equated with the customer, amount, date, due date, and line details.
      </Step>

      <Step title="Confirm it">
        Confirming the invoice records the receivable in your books.
      </Step>

      <Step title="Collect payment">
        When the customer's payment lands in your bank feed, link it to the invoice.
      </Step>

      <Step title="Close the receivable">
        Equated marks the invoice open, partly paid, or paid based on the linked deposits.
      </Step>
    </Steps>
  </Tab>

  <Tab title="With your AI">
    Ask your AI which deposits paid which invoices. It spots exact matches and flags partials.

    Not sure what to ask? The sparkle button in the **Invoices** header copies a ready-made prompt — one for reviewing what's in your inbox, one for linking open invoices to bank deposits.

    <AgentChat
      messages={[
  { from: "you", text: "Which June deposits paid which invoices?" },
  { from: "agent", tool: "equated", text: "3 open invoices. 2 deposits line up:\n\n• $18,000 deposit → invoice #1042 ($18,000), exact match\n• $5,000 deposit → invoice #1048 ($12,000), partial payment\n\nApply both?", choices: ["Apply both", "Only the exact match", "Let me look first"] },
  { from: "you", text: "Apply both." },
  { from: "agent", tool: "equated", text: "Done. Invoice #1042 is paid in full. Invoice #1048 is partly paid with $7,000 outstanding, so I kept it open." },
]}
    />
  </Tab>
</Tabs>

## Why it matters

Invoices separate real income from money you're still owed, so month-end revenue reflects what you actually earned.
