Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2cbcfb2
fix: for version-15
Kalelkar-Noman Aug 28, 2025
b389f1c
fix: file permission
Kalelkar-Noman Aug 29, 2025
ffdb27a
fix: message typo
Kalelkar-Noman Aug 29, 2025
a0c2a17
fix: sales invoice
Kalelkar-Noman Sep 1, 2025
4bc08b8
feat: rigpl general ledger (#1)
Kalelkar-Noman Sep 3, 2025
b7b841d
fix: file customization in attachment
Kalelkar-Noman Sep 11, 2025
774704a
fix: general ledger (#2)
Kalelkar-Noman Sep 12, 2025
cf518a7
fix: file permissions
Kalelkar-Noman Sep 12, 2025
fb1b30f
fix: create_asset_depreciation_schedules_from_assets override the patch
devansh19299 Sep 15, 2025
b7886d3
Merge pull request #6 from castlecraft/feat_dev
devansh19299 Sep 15, 2025
93e423c
fix: general ledger opening balance (#3)
Kalelkar-Noman Sep 16, 2025
4732184
feat: update gst settings
devansh19299 Sep 17, 2025
8995c4e
feat: add running unwanted patch
devansh19299 Sep 17, 2025
036b645
Merge pull request #7 from castlecraft/feat_dev
devansh19299 Sep 17, 2025
70545a7
fix: method to populate payment ledger entry
Kalelkar-Noman Sep 17, 2025
098faa6
fix: file query if shared
Kalelkar-Noman Sep 18, 2025
f935ccc
feat: monkey patched file permissions for system manager access (#8)
Kalelkar-Noman Sep 18, 2025
f1061c1
feat(docs): added docs related to migration and related issues (#9)
Kalelkar-Noman Sep 18, 2025
a19305a
fix: gst return status (#10)
Kalelkar-Noman Sep 22, 2025
50c9a63
feat: address gstin api replaced with india compliance api (#11)
Kalelkar-Noman Sep 23, 2025
f1c2388
fix: einvoice (#12)
Kalelkar-Noman Sep 25, 2025
59e23be
fix(docs): updated docs
Kalelkar-Noman Sep 30, 2025
f9aecc0
fix: updated cdocs
Kalelkar-Noman Sep 30, 2025
992d261
fix: role permission--ship to field and responses import error (#13)
Kalelkar-Noman Oct 8, 2025
cb84d7a
fix: update required_apps and modify address and sales_invoice (#14)
Kalelkar-Noman Oct 13, 2025
7d9c3de
fix: comment out place_of_supply assignment in update_fields function
Kalelkar-Noman Oct 14, 2025
74dd485
feat: implement migration from GL Entries to Payment Ledger with dime…
Kalelkar-Noman Oct 20, 2025
69ebfba
feat(docs): updated
Kalelkar-Noman Oct 23, 2025
88a2cde
fix(docs): added new issues
Kalelkar-Noman Oct 23, 2025
d08884b
fix: auto delete version job (#16)
Kalelkar-Noman Nov 11, 2025
1de840b
fix: clear tax import format and gstr1 (#17)
Kalelkar-Noman Nov 18, 2025
4213da6
feat(doc): script execution docs
Kalelkar-Noman Nov 23, 2025
0bdae8b
fix: for latest migration issue
Kalelkar-Noman Nov 25, 2025
718d300
fix: update migration scripts for local execution and add gl entry up…
Kalelkar-Noman Dec 2, 2025
fe8b24e
fix: clear tax import report (#19)
Kalelkar-Noman Dec 8, 2025
75b0bb3
fix: integrate normalize_place_of_supply function for place of supply…
Kalelkar-Noman Dec 10, 2025
4ee135b
fix: sales invoice e-invoice status
Kalelkar-Noman Dec 11, 2025
636226a
fix: sales invoice qrcode and ack
Kalelkar-Noman Dec 11, 2025
e5c10e9
fix: gst validation
Kalelkar-Noman Dec 11, 2025
4b13dc5
fix: je gstin
Kalelkar-Noman Dec 22, 2025
2783a84
fix: address book report (#20)
Kalelkar-Noman Jan 12, 2026
e2f9c12
fix: contact not showing in address book (#21)
Kalelkar-Noman Jan 14, 2026
75eb271
fix: report issues (#22)
Kalelkar-Noman Jan 16, 2026
0dd0d9a
fix: transporters include FedEx client ID and secret fields (#23)
Kalelkar-Noman Feb 2, 2026
278d84d
fix: fedex_password field
Kalelkar-Noman Feb 3, 2026
bd38f0c
fix: fedex creds fields
Kalelkar-Noman Feb 3, 2026
e7818cf
fix: synced gross_purchase_amount field with eprnext
Kalelkar-Noman Feb 6, 2026
2fe3473
fix: purchase order title issue (#24)
Kalelkar-Noman Feb 26, 2026
de4981d
fix: sales invoice insufficient permission for accounts settings and …
Kalelkar-Noman Mar 2, 2026
f8f279c
fix: delivery note showing not applicable in sales invoice (#26)
Kalelkar-Noman Mar 5, 2026
2f6b962
fix: scheduled jobs (#27)
Kalelkar-Noman Mar 17, 2026
bfcaa49
fix: initial migration guide (#28)
Kalelkar-Noman Mar 19, 2026
280053b
refactor: reports (#29)
Kalelkar-Noman Mar 25, 2026
93763b3
fix: permission sales invoice
Kalelkar-Noman Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions docs/09-2025.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Migration Notes: V12 → V16

## Skipped Steps
- Skipped unnecessary patches (see **before_migrate_patches.py**).
- Reference: [Patch List Spreadsheet](https://docs.google.com/spreadsheets/d/1TUkAwRF6NhEAzFjcM6WAPyT6dEdREkuDl5sANb-eK4o/edit?pli=1&gid=1625746251#gid=1625746251)

---

## Fixed & Pending Issues

### 1. Sales Invoice (Save Failure + E-Invoice)
**Status:** ✅ Resolved

- **Root Cause:** Custom code resetting *Place of Supply* caused save failures.
- **File:** `validations/sales_invoice.py`
- **Method:** `check_local_natl_tax_rules()`
- **Fix:** Removed the faulty custom code.
- **E-Invoice:** Re-enabled via **India Compliance**.
- Requires re-setup for new sites.
- Path: **GST Settings → Enable E-Invoice** (currently in sandbox mode).
- Setup Guide: [India Compliance Docs](https://docs.indiacompliance.app/docs/ewaybill-and-einvoice/gst_settings)
- **Print Format:** Created new print format — **RIGPL IC e-Invoice** — which excludes QR Code, Ack No, and Ack Date.

---

### 2. File List (Search Issues)
**Issue:** File names attached to Doctypes were not searchable.
**Fix:** Corrected hook path and method override.
- **Hook:** `override_whitelisted_methods`
- **Method:** `rohit_common.core.file.get_files_by_search_text`

---

### 3. File List (Permission Issues)
**Issue:** *System Manager* could not view files not attached to any Doctype.
**Root Cause:** Frappe’s `has_permission` hooks run in reverse order, causing our hook to execute before Frappe’s own.
**Fix:** Overrode Frappe’s `File` methods to ensure proper permission evaluation.
- **Reference:** [frappe/permissions.py#L467](https://github.com/frappe/frappe/blob/develop/frappe/permissions.py#L467)
- **Custom Code:**
- `overrides/file.py`
- `hooks/__init__.py`

---

### 4. GST Return Status
**Status:** ✅ Fixed
**Issue:** Unable to fetch GST Return Status.
**Fix:** Integrated **India Compliance API** for fetching GST return data.

---

### 5. Address (GST Validation)
**Status:** ✅ Fixed
**Issue:** GST API validation not working.
**Fix:** Switched to **India Compliance API** for validation.

---

### 6. General Ledger Report
**Issue:** The standard General Ledger displayed detailed opening balances instead of a net opening.
**Fix:** Created a custom report — **RIGPL General Ledger** — which shows only net opening balances.

---

### 7. Asset (Customizations)
**Status:** ✅ Fix deployed.

---

### 8. Asset Report (Analysis)
**Status:** ✅ Fix deployed.

---

### 9. Contact (Search Fields)
**Issue:** Search did not work based on fields defined in **Customize Form**.
**Findings:** The method `rohit_common.utils.contact_utils.rigpl_contact_query` exists but is not used anywhere.
**Status:** ⚙️ Pending review / refactor.

---

### 10. Pricing Rule
**Issue:** Sales Orders not fetching rules for *Item Group* children (worked in V12).
**Action:** Skipped — not related to this app.

---

### 11. Asset Patch Failure
**Status:** ✅ Fixed
**Fix:** Patch execution issue resolved.

---

### 12. Sales Invoice (E-Invoice JSON)
**Issue:** E-Invoice JSON should send only item summaries, not line-wise rates.
**Status:** ⚠️ Limitation
- Quantity and Unit Price fields are mandatory per **India Compliance API** specifications, so they cannot be removed.

---

### 13 & 14. Accounts Receivable (AR) Report
**Issue:** Payment Ledger was empty due to a skipped patch introduced in later versions.
**Fix:** Added a script to backfill Payment Ledger entries.

- **File:** `rohit_common/rohit_common/migration_scripts/migrate_gl_to_payment_ledger.py`
- **Method:** `migrate_gl_to_payment_ledger()`

**Notes:**
- The official Frappe ERPNext patch will run automatically.
- If it fails to populate the Payment Ledger, run the above script manually.
- Ensure **all Fiscal Years are enabled** before running the script.

---

## ✅ Overall Migration Summary
- Core modules are functional.
- India Compliance integrations (E-Invoice, GST Validation, Return Status) are fully operational.
- Custom reports and patches applied successfully.
- All critical migration issues resolved or documented for follow-up.

**Last Updated:** _October 2025_
**Maintained By:** Development Team
198 changes: 198 additions & 0 deletions docs/10-2025.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# New Issues Log: Post Migration (After #14)

This document lists additional issues reported after the initial migration testing phase.
Format and structure follow the main migration notes for consistency.

---

### 15. Sales Invoice (Multiple Save & UI Issues)
**Status:** ✅ Resolved

**Issues Identified:**
1. Ship-to Address not auto-fetching and search not available.
2. Customer Purchase Order not editable.
3. “Total Amount (In Words)” missing in PDF/Print.
4. Letterhead missing in printed invoice.
5. Packing List, Export Invoice, and Custom Invoice not visible.
6. New interface more complex compared to old version.

**Fix:**
- Ship-to Address now auto-fetches.
- Customer Purchase Order field made editable.
- Total Amount (In Words) now displays in print format.
- Letterhead added to PDF/Print.
- All required print formats are now available.

---

### 16. Sales Invoice (Errors While Creating Invoices)
**Status:** ⚙️ Under Review

**Issues Identified:**
1. “No permission for Accounts Settings.”
2. Customer PO details were under *More Info* instead of *Details*.
3. CETSH Code (82078000) missing for certain items.
4. Only Domestic Invoice format available.

**Fix / Developer Notes:**
- Verified System Manager permissions.
- Moved PO details to the **Details** tab.
- Confirmed HSN Code presence.
- Other print formats are available for export invoices.

---

### 17. Purchase Invoice (Unable to Save)
**Status:** ✅ Fixed

**Issue:**
Validation error — *“Please set Account in Warehouse Machinery or Default Inventory Account in Company.”*

**Fix:**
- Created and linked **Stock Account** in Warehouse and Company settings.
- Verified GL posting.
- Reference: [Default Warehouse](http://51.15.187.192:8000/app/warehouse/Default%20Warehouse)

---

### 18. Journal Entry (Letterhead Missing)
**Status:** ✅ Fixed
**Issue:** Letterhead not appearing in PDF or print.
**Fix:** Letterhead template verified and restored.

---

### 19. Payment Entry (Letterhead Missing)
**Status:** ✅ Fixed
**Issue:** Letterhead not appearing in PDF or print.
**Fix:** Verified and restored print format; working fine.

---

### 20. General Ledger (Performance & Print)
**Status:** ⏳ Pending

**Issues:**
- Report takes longer to load.
- Print & PDF options missing.

---

### 21. Customer (Address Save Error)
**Status:** ✅ Fixed

**Issues:**
1. State field not searchable.
2. Error while saving address: `ModuleNotFoundError: No module named 'responses'` (India Compliance).

**Fix:**
- Fixed search filter for State field.
- Added missing India Compliance dependency.

---

### 22. Supplier (Address Save Error)
**Status:** ✅ Fixed

**Issues:**
1. State field not searchable.
2. Error while saving address: `ModuleNotFoundError: No module named 'responses'`.

**Fix:**
- Same fix as Customer: State search and dependency added.

---

### 23. Payment Period Based on Invoice Date (Incorrect Data)
**Status:** ⚙️ To Check
**Issue:** *Payment Posting Date* column missing, causing inaccurate delay calculation.
**Action:** Verify report field mapping and correct data source.

---

### 24. GSTR2A (Permission Error)
**Status:** ⚙️ To Check
**Issue:** “You are not permitted to access this resource. Login to access.”
**Fix / Notes:** Updated user permissions; awaiting confirmation.

---

### 25. GSTR1 (Permission & API Error)
**Status:** ⚙️ To Check

**Issues:**
- Same “not permitted” access issue.
- API configuration error from India Compliance.

**Action:**
- Permissions updated.
- API setup Needs to be verified.

---

### 26. Trial Balance (Incorrect Data)
**Status:** 🟡 Pending
**Issue:** Data mismatch for April 2025 onwards — incorrect AR/AP/Duties and Taxes.
**Action:** Awaiting sample data from accounting team for verification.

---

### 27. ClearTax Import Format (Background Report)
**Status:** ℹ️ Info
**Issue:** “This is a background report. Please set filters before generating.”

---

### 28. Profit & Loss Statement (Incorrect Monthly Totals)
**Status:** 🟡 Pending
**Issue:** Totals for May include April+May, cascading for later months.
**Action:** Require sample dataset for validation.

---

### 29. Balance Sheet (Incorrect Data)
**Status:** 🟡 Pending
**Issue:** AR/AP/Reserves/Duties and Taxes not displaying correctly for Apr 2025.
**Action:** Awaiting sample data for reconciliation testing.

---

### 30. Asset Depreciations & Balances (Incorrect Values)
**Status:** 🟡 Pending
**Issue:** Incorrect depreciation for *Four Wheelers - Cars (Apr 2024 to Mar 2025)*.
**Action:** Cross-verify values with GL Report.

---

### 31. Payment Ledger Entry (Incorrect Voucher Type)
**Status:** ⚙️ To Check
**Priority:** 🔴 Urgent

**Issue:**
- Wrong Voucher Type displayed.
- Missing ledger entries for vendor payments.

**Fix:** Added a script to backfill Payment Ledger entries.

- **File:** `rohit_common/rohit_common/migration_scripts/migrate_gl_to_payment_ledger.py`
- **Method:** `migrate_gl_to_payment_ledger()`

**Notes:**
- The official Frappe ERPNext patch will run automatically.
- If it fails to populate the Payment Ledger, run the above script manually.
- Ensure **all Fiscal Years are enabled** before running the script.

---

### 32. Sales Invoice (India Compliance for Old Transactions)
**Status:** ⏳ Pending
**Priority:** 🔴 Urgent

**Issue:**
India Compliance setup not working for older Sales & Purchase transactions.


---

**Last Updated:** _October 2025_
**Maintained By:** Development Team
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dynamic = ["version"]
dependencies = [
# Core dependencies
"phonenumbers==8.13.13",
"india-compliance @ git+https://github.com/resilient-tech/india-compliance.git#version-15",
"responses>=0.25.8",
]
24 changes: 24 additions & 0 deletions rohit_common/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
__version__ = "15.0.0"

# Monkey-patch AssetDepreciationSchedule to add set_draft_asset_depr_schedule_details

from erpnext.assets.doctype.asset_depreciation_schedule.asset_depreciation_schedule import AssetDepreciationSchedule
import frappe
from rohit_common.patches.asset_depr_schedule_patch_utils import set_draft_asset_depr_schedule_details
AssetDepreciationSchedule.set_draft_asset_depr_schedule_details = set_draft_asset_depr_schedule_details

# Monkey-patched File to allow System Manager to access all files

from rohit_common.overrides.file import get_permission_query_conditions,has_permission
frappe.frappe.core.doctype.file.file.has_permission=has_permission
frappe.frappe.core.doctype.file.file.get_permission_query_conditions=get_permission_query_conditions


import frappe.contacts.doctype.contact.contact as original_contact_module
from rohit_common.core.contact import custom_contact_query
original_contact_module.contact_query = custom_contact_query


# Override for EInvoiceData.get_data
# from india_compliance.gst_india.utils.e_invoice import EInvoiceData
# from rohit_common.overrides.india_compliance_einvoice import custom_get_data
# EInvoiceData.get_data = custom_get_data
6 changes: 6 additions & 0 deletions rohit_common/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import frappe

@frappe.whitelist()
def get_accounts_settings_value(fieldname):
# Ignore permissions to allow fetching this value from Accounts Settings directly
return frappe.db.get_single_value("Accounts Settings", fieldname)
Loading