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

# Invoices: Create, Issue, and Manage Charges in Prvaha

> Generate invoices for appointments, add line items, apply discounts, issue to patients, and download printable PDFs from Prvaha's billing section.

Prvaha's invoicing system ties every bill directly to a patient appointment, giving your clinic a clean, auditable record of all charges. Admins and receptionists can create invoices, add or edit line items, apply discounts, and issue a final PDF — all from the **Dashboard → Invoices** section. Doctors have read-only access to invoices linked to their own appointments.

## Creating an invoice

Each invoice must be linked to an existing appointment. You create a new invoice from the appointment itself — Prvaha pre-fills the appointment details automatically so there is no risk of billing the wrong visit.

<Note>
  An invoice can only be created after a doctor or admin has marked the appointment as ready for billing. If the appointment is still in progress or awaiting review, the invoice form will warn you and prevent submission.
</Note>

<Steps>
  <Step title="Open the appointment">
    Go to **Dashboard → Appointments** and open the relevant appointment. From the appointment detail page, click **New Invoice** to open the invoice form pre-linked to that appointment.
  </Step>

  <Step title="Add line items">
    Click **Add Line Item** to enter each charge. For every item provide a description, quantity, rate, and optional per-item discount. Common line items include:

    * **Consultation fee** — the doctor's visit charge
    * **Procedures** — any in-clinic treatments or tests performed
    * **Medications** — drugs or consumables dispensed during the visit

    Prvaha calculates the line total automatically.
  </Step>

  <Step title="Apply an invoice-level discount">
    Under **Discount Type**, choose one of the three options:

    * **No Discount** — no reduction applied
    * **Percentage (%)** — deducts a percentage from the subtotal
    * **Fixed (rupees)** — deducts a flat amount from the subtotal

    Enter the discount value after selecting the type. Prvaha updates the total in real time.
  </Step>

  <Step title="Save as draft or issue immediately">
    * Click **Save Draft** to store the invoice without finalising it. You can return to edit it later.
    * Click **Issue Invoice** to finalise the invoice immediately, making it ready for payment. Issuing also marks the appointment as billed.
  </Step>
</Steps>

## Downloading and printing

To generate a PDF, open any issued or paid invoice from **Dashboard → Invoices** and click **Download**. The PDF is saved locally and can be printed or shared with the patient.

<Tip>
  PDF download is available only for issued and paid invoices. Draft invoices must be issued before a patient-ready PDF can be generated.
</Tip>

## Invoice statuses

Prvaha tracks each invoice through a clear lifecycle. Understanding these statuses helps your team know what action, if any, is still required.

| Status             | What it means                                                                                                                    |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| **Draft**          | The invoice has been saved but not yet issued. It can still be edited or deleted.                                                |
| **Issued**         | The invoice has been finalised and is ready for payment. No further edits to line items are permitted.                           |
| **Paid**           | Payment has been received and confirmed — either online via Razorpay or recorded manually as an offline payment.                 |
| **Payment failed** | An online payment attempt was initiated but did not complete successfully. The invoice remains open for another payment attempt. |
| **Cancelled**      | The invoice has been voided and is no longer payable. Cancelled invoices are retained for audit purposes.                        |

## Editing and voiding invoices

**Editing a draft:** Open the invoice from **Dashboard → Invoices** and click **Edit Draft**. You can change line items and discounts as long as the invoice is still in **Draft** status. The appointment the invoice is linked to cannot be changed after creation.

**Issuing a draft:** From the invoice detail page, click **Issue Invoice**. Once issued, line items can no longer be changed.

**Deleting a draft:** From the invoice detail page, click **Delete Draft**. Only invoices in **Draft** status can be deleted. Deletion is permanent.

**Cancelling an invoice:** If an issued invoice needs to be voided, open it and click the cancel icon. You will be asked to confirm the cancellation. Cancellation is permanent — a cancelled invoice cannot be reopened. To bill the patient again, create a new invoice for the same appointment.

<Warning>
  A **Paid** invoice cannot be cancelled. If a payment was recorded in error, contact your admin to determine the correct course of action.
</Warning>

<Note>
  Only **Admins** and **Receptionists** can create, edit, issue, or cancel invoices. Doctors have read-only access to invoices linked to their own appointments.
</Note>
