Maintenance Job Card

๐Ÿงพ 1. Overview

This module handles the automatic generation of Sales Invoices and Stock Entries for materials used during maintenance jobs in the Property Management module. It differentiates between POS billing, normal billing, and internal consumption (self-consumption).


๐Ÿ”‘ 2. Key Features

  • Grouped and non-grouped billing logic
  • Automatic creation of Sales Invoices (POS & Non-POS)
  • Stock Entry creation for self-consumed items
  • Tax template validation
  • POS auto-payment handling
  • Linkage between maintenance materials and generated documents

๐Ÿงฐ 3. Pre-Requisites

Ensure the following configurations are in place before using the system:

  • โœ… Default Company
  • โœ… Property Cost Center
  • โœ… POS Profile (for POS billing)
  • โœ… Tax Templates for Maintenance
  • โœ… Default Warehouse in Stock Settings
  • โœ… Maintenance Item Groups in Property Settings

๐Ÿงญ 4. Step-by-Step Usage

  1. Create a Maintenance Job Card with materials_required and materials_billed tables filled in.
  2. Ensure correct statuses are marked: Bill or Self Consumption.
  3. Save the Job Card. On save:

    • System creates Sales Invoice(s) for Bill items.
    • System creates Stock Entry for Self Consumption items (if Job Card is closed).
  4. Review messages for links to created documents.
  5. Verify linkage in the material rows (Invoice/Stock Entry fields).

๐Ÿ› ๏ธ 5. Script Customizations

  • make_transaction(doc, for_self_consumption=False) โ€” main entry method
  • make_sales_invoice() โ€” handles invoice creation logic
  • make_stock_entry() โ€” handles material issue logic
  • validate_materials_required() โ€” prevents closure if unbilled
  • validate() โ€” ERPNext lifecycle hook to auto-trigger transactions

๐Ÿงฏ 6. Troubleshooting (Common Errors and Resolutions)

Error Reason Resolution
"Please Setup Default Maintenance Tax Template" Tax template missing in Company Set default_maintenance_tax_template in Company
"Job cannot be closed" Unbilled materials exist Ensure all Bill items are invoiced
"POS Stock Entry cannot be created" POS is not allowed for stock entries Uncheck POS flag for Self Consumption items

๐Ÿ‘ฅ 7. User Roles and Permissions

Role Permission Required
Property Manager Read & Write on Job Card, Sales Invoice, Stock Entry
Accounts User Read on Sales Invoice, access to tax templates
Stores Clerk Read & Submit Stock Entry

๐Ÿ“Œ 8. Key Notes

  • POS and self-consumption items are treated differently.
  • Grouping logic is controlled via Property Management Settings.
  • Auto-submission of invoices is configurable.
  • All transactions are triggered automatically upon Save or Close of Job Card.

๐Ÿšซ 9. What Business Process Pain Point Does It Help Remove

  • Eliminates manual billing for job materials
  • Ensures inventory accuracy through automatic stock deduction
  • Reduces human error in invoice creation
  • Enforces compliance by validating tax and billing logic
  • Speeds up job-to-invoice cycle for maintenance operations
Discard
Save
Was this article helpful?

On this page

Review Changes โ† Back to Content
Message Status Space Raised By Last update on