Commit Graph

867 Commits

Author SHA1 Message Date
RJPvT
9d256e131d fix: wrong file name
file name is actually reversed.

In [1]: from premailer import Premailer
   ...:
   ...: from frappe.utils.jinja_globals import bundled_asset
   ...:
   ...: # get email css files from hooks
   ...: css_files = frappe.get_hooks("email_css")
   ...: css_files = [frappe.utils.jinja_globals.bundled_asset(path) for path in
   ...: css_files]
   ...: css_files = [path.lstrip("/") for path in css_files]

In [2]: css_files
Out[2]:
['assets/frappe/dist/css/email.bundle.ELTO33N3.css',
 'email_erpnext.bundle.css',
 'assets/css/email.css']

In [3]: css_files = [css_file for css_file in css_files if os.path.exists(os.pat
   ...: h.abspath(css_file))]

In [4]: css_files
Out[4]: ['assets/frappe/dist/css/email.bundle.ELTO33N3.css', 'assets/css/email.css']
2024-01-02 22:01:51 +01:00
mergify[bot]
c2a137f0fb feat: add employee number to client user bootinfo (backport #38477) (#38602)
feat: add employee number to client user bootinfo (#38477)

(cherry picked from commit 525f656cc1)

Co-authored-by: Richard Case <110036763+casesolved-co-uk@users.noreply.github.com>
2023-12-06 20:55:06 +05:30
ruthra kumar
562a55122b refactor: update scheduled job for bulk transaction
(cherry picked from commit fb06ad7330)
2023-11-20 08:51:08 +00:00
Deepesh Garg
51e33e1556 feat: Add accounting dimensions to Supplier Quotation
(cherry picked from commit 089da459f7)

# Conflicts:
#	erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
#	erpnext/patches.txt
2023-11-18 14:11:16 +00:00
Deepesh Garg
bfa93cd3f6 chore: Add accounting dimensions to Sales Order Item table
(cherry picked from commit e31db18912)

# Conflicts:
#	erpnext/patches.txt
2023-10-17 17:25:57 +00:00
Anand Baburajan
cd1c175439 perf: asset depreciation entry posting (#36461)
* perf: make post depr entries job daily_long

* perf: optimise post_depreciation_entries and make_depreciation_entry

* chore: more optimisation and dont fail all schedule dates if one date fails

* chore: don't post entries before acc_frozen_upto

* chore: using get_single_value

* refactor: destructure asset object
2023-08-08 15:09:55 +05:30
mergify[bot]
4ac60cd73b perf: move project status reminder to hourly (backport #36372) (#36373)
perf: move project status reminder to hourly (#36372)

Only used for sending daily/weekly/bi-daily

[skip ci]

(cherry picked from commit e36c8ce5be)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-07-28 12:54:39 +05:30
Anand Baburajan
5985e02574 fix: validate docs in closed accounting period on save (#36157) 2023-07-18 16:40:06 +05:30
mergify[bot]
ea66f18032 refactor: Leave Application should not be in hook.py (backport #36008) (#36158)
Co-authored-by: Kitti U. @ Ecosoft <kittiu@gmail.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2023-07-18 14:26:47 +05:30
mergify[bot]
b877fa60db fix: Remove current fiscal year from Global Defaults (#35960)
* fix: Remove current fiscal year from Global Defaults (#35960)

* fix: Remove current fiscal year from Global Defaults

* fix: Remove button to set default

* fix: Add utils to get fiscal year

* fix: Incorrect import

* feat: Add hook for naming series parser

(cherry picked from commit 6270607c6d)

# Conflicts:
#	erpnext/accounts/doctype/fiscal_year/fiscal_year.py
#	erpnext/patches.txt
#	erpnext/public/js/utils.js

* chore: resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-07-17 11:52:37 +05:30
Ankush Menat
adb6918834 perf: send SLA doctypes in boot
This request is fired on every load, data rarely if ever changes though.

(cherry picked from commit bd9ef74ef7)
2023-07-16 07:01:32 +00:00
mergify[bot]
ebf3c0173e feat: Closing balance for period closing and reporting (#34257)
* feat: Introduce opening entry for reporting

(cherry picked from commit 9739d8b52a)

* feat: Introduce opening entry for reporting

(cherry picked from commit b44a19bd1a)

* fix: Add patches to create accounting dimension in Closing Balance

(cherry picked from commit 36c08d0835)

* feat: Cascade closing balances on PCV submit

(cherry picked from commit c3f39c3f32)

# Conflicts:
#	erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
#	erpnext/patches.txt

* feat: Add views in standard filter

(cherry picked from commit e18336ebe7)

* chore: Rewrite query using query builder

(cherry picked from commit 7fa7d6b5e4)

# Conflicts:
#	erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py

* feat: Add validations against period closing voucher

(cherry picked from commit f92c63fb10)

* fix: Order by issue in aggregation query

(cherry picked from commit 6607c8bd82)

* fix: Add patch to update closing balances

(cherry picked from commit a663df376c)

* fix: Closing balance entries for period closing voucher

(cherry picked from commit 436fc03eda)

* fix: Update patch to generate closing balance entries

(cherry picked from commit 95c9aafda9)

# Conflicts:
#	erpnext/patches.txt

* perf: Apply closing balance in Trial Balance report

(cherry picked from commit e5f603c9d9)

# Conflicts:
#	erpnext/accounts/report/trial_balance/trial_balance.py

* chore: Minor fixes

(cherry picked from commit c089c4156c)

# Conflicts:
#	erpnext/patches.txt

* fix: Aggregation with previous closing balance

(cherry picked from commit 4a2046dfb6)

# Conflicts:
#	erpnext/patches.txt

* test: Add static posting dates to tests

(cherry picked from commit 310f71c313)

* chore: Add index to period closing voucher column

(cherry picked from commit 5dabc98ba5)

* chore: rename Closing Balance to Account Closing Balance

(cherry picked from commit 3249a79f07)

* test: Add test case for closing balance

(cherry picked from commit f0267feca8)

* chore: Use account closing balance in set gl entries

(cherry picked from commit 0157fa15eb)

# Conflicts:
#	erpnext/accounts/report/financial_statements.py

* fix: Update patch

(cherry picked from commit 76775a3e49)

* fix: Account sub query

(cherry picked from commit 7f11373b58)

* chore: Simplify query

(cherry picked from commit 00fe3042b2)

# Conflicts:
#	erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py

* chore: Add missing validations

(cherry picked from commit 0aadb680eb)

* chore: Remove unnecessary list comprehension

(cherry picked from commit 44053db010)

# Conflicts:
#	erpnext/accounts/report/financial_statements.py

* fix: Ignore opening entries if PCV posted

(cherry picked from commit f9397a87ac)

# Conflicts:
#	erpnext/accounts/report/financial_statements.py

* fix: Don't validate if no GL Entry exists

(cherry picked from commit 528ab503f2)

* chore: Fix Typo

(cherry picked from commit 3fd95200da)

* fix: Validation for cancelation

(cherry picked from commit 30eb6c8512)

* fix: Partial trial balance view

(cherry picked from commit b7dcf27b01)

* fix: CS financial statement param

(cherry picked from commit f8cff09129)

* chore: Improve validation message

(cherry picked from commit 8ce1da111e)

* chore: Resolve conflicts

* chore: Resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-07-10 18:04:45 +05:30
ruthra kumar
862c5145c1 refactor: submit and make JV through background job
(cherry picked from commit 4f51c5a433)

# Conflicts:
#	erpnext/setup/doctype/company/company.json
2023-07-10 07:31:19 +00:00
mergify[bot]
5923a80a0f feat: Reconcile Payments in background (#34596)
feat: Reconcile Payments in background (#34596)

* feat: auto reconcile in background

* chore: Option to enable auto reconciliation in settings

* refactor: validate if feature is enabled in settings

* refactor: check for running job while using reconciliation tool

* chore: using doc to get filter values

* chore: use frappe.db.get_value in validations

* chore: cleanup commented out code

* chore: replace get_list with get_all

* chore: use block scope variable

* chore: type information for functions

* refactor: flag to ignore job validation check

* refactor: update parent doc status if all reconciled

* chore: create test_records file

* test: create a bunch of vouchers for testing auto reconcile

* chore: renamed auto_reconcile to process_payment_reconciliation

* chore: another child doctype to hold payments

* chore: remove duplicate field

* chore: add fetched payments to log

* chore: Popup comment message update

* chore: replace get_all with get_value

* chore: replace label in settings page

* chore: remove unit test and records

* refactor: status in reconciliation log

* refactor: set status in log as well

* chore: fix field name

* chore: change triggered job name

* chore: use status field in list view of log

* chore: status while there are no allocations

* refactor: split trigger function into two

* chore: adding cancelled status

* refactor: function trigger queued docs

* chore: cron job scheduled

* chore: fixing accouts settings json file

* chore: typos and variable scope

* chore: use 'pluck' in db call

* chore: remove redundant whitelist decorator

* chore: use single DB call to fetch values

* chore: replace get_all with get_value

* refactor: use raw db calls to fetch reconciliation log records

Using get_doc on `Process Payment Reconciliation Log` is costly when
handling large volumes of invoices.

Use raw frappe.db.get_all to selectively pull status and reconciled count

* chore: update status on successful batch operation

* chore: make payment table readonly

* chore: ability to pause the background job

* chore: remove isolate_each_allocation

* chore: more description in progress bar

* refactor: partially working state

* refactor: update reconcile flag and setting hard limits for fetching

* chore: make allocation editable -- NEED TO REVERT

* chore: pause button

* refactor: skip setter function in Payment Entry for better performan

* refactor: split reconcile function and skip a setter function

1. Split reconcile function into 2
2. While reconciling against payment entry, skip a
set_missing_ref_details setter method

* chore: increase payment limit

* refactor: replace frappe.db.get_all with frappe.db.get_value

* chore: remove unwanted doctypes

* refactor: make allocation table readonly

* perf: update ref_details only for newly linked invoices

* chore: rename skip flag

* refactor(UI): receivable_payable field should auto populate

* refactor: no control statements in finally block

* chore: cleanup section and rename checkbox

* chore: update new fieldname in code

* chore: update error msg

* refactor: start and pause integrated into status

pause checkbox has been removed

* refactor: added cancelled status to the log doctype

1. Moved the status section to the bottom in parent doc
2. Using alerts to indicate Job trigger status

(cherry picked from commit ed14d1ce44)

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2023-04-25 19:20:06 +05:30
Ritwik Puri
8a331e0f26 revert: remove frappe.send_message (v14) (#34816)
revert: remove frappe.send_message
2023-04-11 16:10:32 +05:30
mergify[bot]
3c0cc024aa fix!: require sender and message for contact us page (#34707)
fix!: require sender and message for contact us page (#34707)

* fix: require sender and message for contact us page

* refactor: dont override frappe.send_message from client side

used override_whitelisted_method hook for the same

(cherry picked from commit f193393f57)

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
2023-04-05 12:33:55 +05:30
mergify[bot]
67576ad5bd feat: deprecate get_customer_list (#34563)
feat: deprecate get_customer_list (#34563)

(cherry picked from commit 8c7fa5712b)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-03-24 15:14:25 +05:30
Rohit Waghchaure
235ecca9fa fix: BOM Update log not completed
(cherry picked from commit 2f157fa5d3)
2023-03-06 17:54:50 +00:00
mergify[bot]
9bc2675493 refactor: make payments app a soft dependency (backport #33245) (#33677)
refactor: make payments app a soft dependency (#33245)

refactor: make payment app a soft dependency
(cherry picked from commit 0b86b1baca)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-01-18 21:11:37 +05:30
rohitwaghchaure
a7901c2b9c Revert "fix: daily scheduler to identify and fix stock transfer entries having incorrect valuation"
(cherry picked from commit 728dc1acf4)
2022-12-30 08:51:29 +00:00
Rohit Waghchaure
64b25fba48 test: added test case to validate audit for incorrect entries
(cherry picked from commit f31612376a)
2022-12-20 04:17:51 +00:00
Rohit Waghchaure
deb3efdd9a fix: daily scheduler to identify and fix stock transfer entries having incorrect valuation
(cherry picked from commit b1721b79ce)
2022-12-20 04:17:51 +00:00
mergify[bot]
6a89cb57b0 chore: drop dead code (backport #32595) (#32596)
chore: drop dead code (#32595)

[skip ci]

(cherry picked from commit 50e9698932)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-10-13 15:27:17 +05:30
Nabin Hait
9ec0d104a5 fix: Create accounting dimension fields in asset capitalization
(cherry picked from commit fe891aa488)
2022-09-30 10:26:33 +00:00
Deepesh Garg
b2f280dee6 fix: Move subscription process to hourly long quque
(cherry picked from commit 82a2f31ada)
2022-09-27 18:09:50 +00:00
mergify[bot]
50ad612453 fix: Add dimension section in subcontracting doctypes (backport #31849) (#31877)
* fix: Add dimension section in subcontracting doctypes (#31849)

(cherry picked from commit 8704ca783d)

# Conflicts:
#	erpnext/patches.txt

* chore: conflicts

Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
2022-08-18 12:04:07 +05:30
ruthra kumar
65bb1d8cc2 fix: add asset repair to accounting dimension list
(cherry picked from commit 452584c4bd)
2022-08-08 11:10:25 +00:00
phot0n
8004550444 fix: add payments as a required app for erpnext 2022-07-25 10:46:46 +05:30
Rucha Mahabal
108cce2785 refactor: rewrite raw sql queries with frappe.qb and database API 2022-07-07 19:00:19 +05:30
Rucha Mahabal
ef02e58859 Merge branch 'develop' into hr-separation 2022-07-07 13:46:54 +05:30
Sagar Vora
05351bee8b Merge remote-tracking branch 'upstream/develop' into remove-india 2022-07-03 18:07:44 +05:30
Rucha Mahabal
466bf99835 fix: Remove Expense Claim from Bank Reconciliation
- add hooks `get_matching_queries` and `bank_reconciliation_doctypes` to extend the functionality in other apps
2022-07-01 19:01:17 +05:30
Rucha Mahabal
211b46b7e6 fix: Loan Application test 2022-06-29 18:00:48 +05:30
Rucha Mahabal
ef63c61ebd Merge branch 'develop' into hr-separation 2022-06-29 12:35:51 +05:30
Ankush Menat
5d73697c64 fix: offset some scheduled jobs to avoid locks (#31466)
If your site has multiple background workers then there's possibility
that two jobs will execute in parallal, this creates problem when both
are on operating on same data.

This PR adds a separate section for hourly and daily jobs which have
frequency offset from default frequency to avoid such conflicts.
2022-06-28 12:22:17 +05:30
Rucha Mahabal
6a65c8aff4 Merge branch 'develop' into hr-separation 2022-06-28 11:51:59 +05:30
Nabin Hait
925b9d985e fix: open lead and opportunities based on today's event 2022-06-27 22:13:09 +05:30
Sagar Vora
7f390fb755 Merge branch 'develop' into remove-india 2022-06-26 18:10:44 +05:30
Nabin Hait
f904ac599e fix: merge conflicts and sider issues 2022-06-25 11:40:23 +05:30
Sagar Vora
9b057d15b2 fix: move hooks to reduce diff 2022-06-24 15:04:28 +05:30
Sagar Vora
12b7e14fde chore: keep back code to be a part of other apps / to be ported later 2022-06-24 13:38:13 +05:30
Rucha Mahabal
1ff0e4519f chore: Extract Expense Claim, FnF, Gratuity, Employee Advance related code from accounting
- Added hooks `advance_payment_doctypes`, `invoice_doctypes`, `period_closing_doctypes` for other apps to extend accounting functionality

- Removed `set_query` code from `journal_entry.js` and `payment_entry.js`

- removed `update_status_for_full_and_final_statement` trigger on JE submission/cancellation

- refactored `payment_entry.py`: split functions for validating reference doctypes for easy overriding, removed hrms references from `get_reference_details` and `get_payment_entry`

- removed dead code: functions `get_bill_no_and_update_amounts`, `get_total_amount_exchange_rate_base_on_currency`, `get_total_amount_exchange_rate_for_employee_advance`, `get_amounts_based_on_ref_doc`, `get_amounts_based_on_reference_doctype`
2022-06-23 16:17:34 +05:30
Sagar Vora
e48a8cd1e8 fix: remove india hook 2022-06-19 23:20:28 +05:30
Sagar Vora
ec9861266e Merge remote-tracking branch 'upstream/develop' into remove-india 2022-06-19 22:57:22 +05:30
Rucha Mahabal
fbc1330ab0 chore: Remove HR/Payroll related setups and fixtures
- Fixtures moved to HRMS app

- 'HR' field in Terms and Conditions removed, added via HRMS setup
2022-06-17 16:34:13 +05:30
Rucha Mahabal
3fe2ef6790 chore: update import paths for HR 2022-06-15 12:43:45 +05:30
Rucha Mahabal
ab8df98cab chore: Remove regional code for India HR, moved to HRMS 2022-06-10 18:22:07 +05:30
Rucha Mahabal
85b18e23d7 fix: remove employee reminders, move to HRMS app
- change `erpnext.hr.EmployeeController` to `erpnext.setup.EmployeeController`
2022-06-10 16:26:07 +05:30
Rucha Mahabal
512c82f76d chore: Update imports/paths for doctypes moved to erpnext setup module 2022-06-10 15:06:54 +05:30
Marica
ff0a6b7cbd Merge branch 'develop' into perf-bom-update-tool 2022-06-07 14:49:59 +05:30