---
tags: [purchases, service]
module: Purchases
---

# [Service]PurchaseBillServices

## Connections
[[_Purchases]] · [[[Model]PurchaseBill]] · [[[Model]Supplier]] · [[[Model]SupplierPaymentReceipt]] · [[[Controller]Controllers]] · [[[Controller]ApiControllers]] · [[[Repo]Repositories]] · [[[Cross]CrossModuleDependencies]]

## Source
`Modules/Purchases/Services/PurchaseBill/`

---

## Services

| Service | Key Dependencies | Purpose |
|---|---|---|
| StoringPurchaseBillService | PurchaseBillsRepository · CreatingNewJournalEntryService · GetSuggestedCodeForPurchaseBillService · RetrievingCurrentFinancialYearService · RetrievingTenantCurrencyService · RetrievingInventorySystemService · TaxesRepository · ProductsRepository · StoringSupplierReceiptFromBillService | Create bill with inventory updates, journal entries, tax calculations, attachments |
| UpdatingPurchaseBillService | PurchaseBillsRepository · CreatingNewJournalEntryService · RetrievingInventorySystemService · TaxesRepository · ProductsRepository · StoringSupplierReceiptFromBillService | Update bill: reverses old inventory/JE, recalculates, re-saves |
| DeletingPurchaseBillService | PurchaseBillsRepository · CreatingNewJournalEntryService | Delete + reverse inventory quantities + reverse journal entry |
| DeletingPurchaseBillWithEntriesService | — | Delete with full journal entry reversal (separate from normal delete) |
| RetrievingPurchaceBillService | — | Single bill with computed outstanding amounts + available receipts |
| PurchaseBillsIndexService | PurchaseBillsRepository · RetrievingCurrentFinancialYearService · GetAccountingSettingsCountService · SuppliersRepository | Filtered list with status mapping, pagination |
| PreparingDataForCreatingPurchaseBillService | — | Assembles form data (suppliers, taxes, payment terms, form designs) |
| GetSuggestedCodeForPurchaseBillService | — | Auto-increments next bill reference code |
| AssigningBillToReceiptService | — | Link a bill to a supplier payment receipt with allocated amount |
| UnassigningBillFromReceiptService | — | Remove bill ↔ receipt link |
| SendPurchaseBillToEmailService | — | Render bill PDF and deliver via email |

## Destination Controllers (post-save routing)
`SaveAndClose` · `SaveAndClosePrint` · `SaveAndNew` · `SaveAndNewPrint`
