-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Provisional accounting for expenses (#29451)
* feat: Provisonal accounting for expenses * fix: Method for provisional accounting entry * chore: Add test case * fix: Remove test case * fix: Use company doctype * fix: Add provisional expense account field in Purchase Receipt Item * fix: Test case * fix: Move provisional expense account to parent * fix: Patch (cherry picked from commit 528c713) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py # erpnext/patches.txt # erpnext/setup/doctype/company/company.json # erpnext/stock/doctype/purchase_receipt/purchase_receipt.py # erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py (cherry picked from commit a54c847) # Conflicts: # erpnext/patches.txt
- Loading branch information
1 parent
8c0613a
commit 061a569
Showing
11 changed files
with
289 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import frappe | ||
|
||
|
||
def execute(): | ||
frappe.reload_doc("setup", "doctype", "company") | ||
|
||
company = frappe.qb.DocType("Company") | ||
|
||
frappe.qb.update( | ||
company | ||
).set( | ||
company.enable_provisional_accounting_for_non_stock_items, company.enable_perpetual_inventory_for_non_stock_items | ||
).set( | ||
company.default_provisional_account, company.service_received_but_not_billed | ||
).where( | ||
company.enable_perpetual_inventory_for_non_stock_items == 1 | ||
).where( | ||
company.service_received_but_not_billed.isnotnull() | ||
).run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.