Skip to content

feat(lease): implement lease renewal enhancement and UI consolidation#61

Merged
aakvatech merged 1 commit into
Aakvatech-Limited:version-15-hotfixfrom
iamtalib13:feat/lease-renewal-enhancement
Jun 8, 2026
Merged

feat(lease): implement lease renewal enhancement and UI consolidation#61
aakvatech merged 1 commit into
Aakvatech-Limited:version-15-hotfixfrom
iamtalib13:feat/lease-renewal-enhancement

Conversation

@iamtalib13

Copy link
Copy Markdown
Contributor

PR Description

Summary
This PR introduces a structured Lease Renewal feature and optimizes the Lease Doctype UI by consolidating custom action buttons. It addresses the requirement for a controlled, authorized, and audited renewal process while improving the user experience.

Key Changes

  1. UI/UX Consolidation
  • Grouped the following buttons under a new "Actions" dropdown to reduce header clutter:
    • Make Invoice Schedule
    • Generate Pending Invoice
    • Make Invoice Schedule for all Lease
    • Renew Lease (New)
  • Maintained existing report-related buttons under the "View" dropdown.
  • Refactored intro banners to use frm.trigger("custom_set_intro") for a cleaner refresh event.
  1. Lease Renewal Enhancement
  • Trigger: Added a "Renew Lease" button accessible only for leases with Active or Expired status.
  • Confirmation: Integrated frappe.confirm to ensure intentional action before renewal initiation.
  • Validation:
    • Restricted initiation to Property Manager and System Manager roles.
    • Prevents duplicate renewals if a pending renewal already exists.
  • Automation:
    • Automatically clones the existing lease document (excluding previous invoice schedules).
    • Sets the next start_date based on the previous lease's end date and maintains duration.
    • populates Renewed From and Renewal Initiated By fields for full traceability.
  • Audit Trail: Automatically posts a comment to the original lease referencing the newly created draft.
  1. Schema Updates (lease.json)
  • Added Lease Renewal Details section.
  • Added link fields: renewed_from (Lease) and renewal_initiated_by (User).

@aakvatech aakvatech merged commit 43e08a4 into Aakvatech-Limited:version-15-hotfix Jun 8, 2026
2 of 3 checks passed
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Successfully created backport PR for version-15:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants