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
- Create a Maintenance Job Card with
materials_required
andmaterials_billed
tables filled in. - Ensure correct statuses are marked:
Bill
orSelf Consumption
. 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).
- System creates Sales Invoice(s) for
- Review messages for links to created documents.
- Verify linkage in the material rows (Invoice/Stock Entry fields).
๐ ๏ธ 5. Script Customizations
make_transaction(doc, for_self_consumption=False)
โ main entry methodmake_sales_invoice()
โ handles invoice creation logicmake_stock_entry()
โ handles material issue logicvalidate_materials_required()
โ prevents closure if unbilledvalidate()
โ 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
orClose
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