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

# Expenses

> Review monthly operating costs and invoices, then add, correct or delete records.

**Outcome:** the month includes your operating costs without counting ingredient purchases twice.

Open **Performance → Expenses**. Use the ‹ › buttons to move between months; **This month** returns to the current one. Your selected tab stays open when you change months.

Performance expenses are separate from older records. Those records are not automatically moved into Performance. To read them, choose **Older expenses (before Performance)** at the bottom of the page; see [Older expenses](https://docs.petakopi.my/manage-shop/performance/legacy-expenses.md).

## Choose a tab

| Tab | What you see |
| - | - |
| Running costs | Costs assigned to the service month, showing their category, basis and included amount |
| Invoices | Invoices dated in the selected month, showing their supplier, status and recorded total |

Expenses opens on **Running costs** when the month still has costs marked **Not entered**; otherwise it opens on **Invoices**.

The summary beside the tabs shows the month's total. If the month has drafts, choose **· 1 draft** (or **· 2 drafts**, and so on) to open **Invoices** filtered to drafts.

Each row has a **⋯** menu with its actions. Choosing a row's name does the most common one: it edits an estimate, or opens an invoice.

An invoice dated September can pay for October rent. Find the invoice in September's **Invoices** and its allocated cost in October's **Running costs**. An undated draft appears in the month you added it, using Malaysia time, with **Date unknown** and its added date. Editing an undated draft does not move it to another month. A new invoice opened for the current month starts with today's date, and a scan that finds a date replaces it.

Invoices have pages of up to 25 rows. **Previous page** and **Next page** move through that month's invoices; the month controls choose another month. **Filter** on the Invoices tab searches by text and narrows by status or category.

## Add or edit an estimate

Open **Running costs**.

1. Choose **Add estimate**, or choose an existing row's name (or **⋯ → Edit estimate**).
2. Enter a cost name and category, such as Rent. An existing estimate keeps its category and service month.
3. Enter the expected amount, leaving an unknown amount blank.
4. If you enter 0, tick **No cost this month**, then choose **Save estimate**.

The form opens in a dialog. **Cancel** closes it without saving. The **Basis** column shows **Estimate**, **Actual**, **Not entered** or **No cost**. A row covered by invoices shows its actual allocated amount; **Edit estimate** changes its underlying estimate, not those invoices.

**Copy from earlier month** opens a list of earlier Performance estimates. Choose **Use estimate**, review the copied amount and category, then save it as a new estimate for the selected month. The source stays unchanged; copying does not bring earlier invoices into this month.

Our café starts with RM 500 rent, RM 100 utilities, and RM 50 payment fees. Other operating categories are confirmed as having no cost for this fictional example.

## Invoices

Open **Invoices**. **Add invoice** opens a separate page; **Open** opens an existing invoice. The **Expenses** breadcrumb returns to your selected month, tab and result page.

1. Create a draft for one invoice and attach its files, or enter it manually.
2. Check the supplier, invoice number, date, and total.
3. Choose what the invoice is for. A single-cost invoice, such as rent, then shows one sentence: **Counts as Rent in October 2026 · RM 2,450.00**. Purchases show **Purchase · not counted as an operating cost**.
4. For anything more, choose **Edit lines**. The full list under **What's on this invoice** opens by itself when there is more than one line, a line has another category, the lines do not add up to the total, a cost is split across months, or a line has no category. Use **Add tax or discount** for tax, discounts, shipping, or rounding; enter discounts as negative amounts. Each line has a **Month it covers** and an **Amount for this month**.
5. Confirm the invoice when the details are correct.

You can attach up to five JPEG, PNG, WEBP, or PDF files for one invoice: at most 5 MB per file and 10 MB combined. Confirmed invoices use MYR.

If AI extraction is available, it suggests invoice details and items. **Review and apply suggestions yourself.** Extraction does not confirm a bill. Manual drafts remain available when extraction is disabled.

Drafts stay outside operating totals. The invoice table shows **Draft** or **Confirmed**, and its draft count belongs to the selected invoice month. Unknown totals stay unknown; invoices in another currency show that currency rather than an RM total.

## Categories and months

Use the invoice category as a starting point, then override individual lines when needed. Put costs in the month they relate to, even if you paid later. Split lines or allocations when costs cover different months or purposes.

Ingredient purchases are recorded separately from ingredients consumed in sales. Buying RM 200 of beans does not mean RM 200 was consumed that month. Purchases do not automatically update recipe prices or inventory.

## Replace an estimate

When an estimate exists for the same category and month, the invoice asks: **You estimated Rent at RM 2,500.00 for October. This invoice is…** Choose **that cost** to replace the estimate, or **an extra cost** to keep the estimate and add this on top. If several estimates match, each has its own choice. An estimate already replaced by another invoice says which one.

When the amount is within 20% of a single estimate, it is chosen for you and shown as **Replaces your Rent estimate**; choose **Change** to answer differently. If you later change the amount far from the estimate, the question returns.

**A linked actual replaces the whole estimate.** Do not link a partial bill as though it covers the full expected cost.

Choose **⋯ → Linked invoices** on an actual row to see the bills behind it. An unmatched actual row has **⋯ → Open invoice**, or choose its name.

If our café’s utilities bill is RM 180, it replaces the RM 100 estimate. The month now includes RM 180 for utilities, not RM 280.

## Correct a bill

Use the correction flow and give a reason. Check possible duplicates before acknowledging them. Drafts are not confirmed expenses; review outstanding drafts before confirming monthly completeness.

If a saved allocation refers to an estimate you deleted, its match is labelled **Deleted estimate**. You can keep that historical match when the allocation is unchanged. To change its amount, month or category, clear the match or choose a current estimate. The actual cost remains counted.

## Delete an estimate or invoice

Choose **⋯ → Delete** on its table row, or **Delete expense** on an existing invoice page. Check the confirmation, then choose **Delete**. **Cancel** leaves the record unchanged.

| Record | What changes |
| - | - |
| Estimate | Its estimate is removed. Linked actual invoice costs remain counted as actual costs |
| Draft invoice | The draft is removed and pending extraction is stopped; operating totals stay unchanged |
| Confirmed invoice | Its operating allocations are removed from every affected service month, listed in the confirmation |
| Purchase-only invoice | The invoice is removed; operating totals stay unchanged |

If you delete a confirmed invoice, a linked estimate uses any other surviving invoices. When none remain, its estimated amount returns. If an estimate was already deleted, no estimate returns.

Deleted records leave the active Expenses tables. Their audit records are retained, and a deleted invoice keeps its attachments; this action does not erase the retained invoice files. Costs and monthly review status are recalculated. Recheck **Monthly review** after deletion; actual costs released from a deleted estimate need their fixed or variable treatment reviewed again.

**Ready when:** confirmed bills reconcile, costs belong to the right service months, and estimates cover bills still missing.

**Next:** [Record sales events](https://docs.petakopi.my/manage-shop/performance/sales.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.