From 84e6cead566a70b67efaaab30a50f89905bb781a Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 28 Jul 2022 12:13:57 +0000 Subject: [PATCH 01/35] chore(release): Bumped to Version 13.36.2 ## [13.36.2](https://github.com/frappe/erpnext/compare/v13.36.1...v13.36.2) (2022-07-28) ### Bug Fixes * (india) (e-invoice) margin & internal company transfer ([b97d30a](https://github.com/frappe/erpnext/commit/b97d30aad098d87e6c95ff1dab37360ac574e17a)) * (india) add overseas in HSN wise report ([1d69ce1](https://github.com/frappe/erpnext/commit/1d69ce1932938ce98e8700a01e7403f747e9bf3d)) * Allow allocating advance amount against Expense Claim taxes ([42f3592](https://github.com/frappe/erpnext/commit/42f3592e959f50633cb57c85221b04d10f9e0aa2)) * assign duplicate_items_msg outside conditional ([#31639](https://github.com/frappe/erpnext/issues/31639)) ([8e23c6a](https://github.com/frappe/erpnext/commit/8e23c6ad69dee213f0252d2b231317490fab760f)) * correct Brazilian portuguese translations (backport [#31498](https://github.com/frappe/erpnext/issues/31498)) ([#31660](https://github.com/frappe/erpnext/issues/31660)) ([794fd08](https://github.com/frappe/erpnext/commit/794fd0819ffff4e0bb7a68e9ab6b42dc45e4eb31)) * discount and test added ([a843e78](https://github.com/frappe/erpnext/commit/a843e784e6f4ce60be8d5d5a39154dca3bad07e6)) * display customer name on picking list ([dbf245c](https://github.com/frappe/erpnext/commit/dbf245c6878fb53e12d0fef6bc4e84f2017570db)) * do not update component amount for timesheet components ([#31696](https://github.com/frappe/erpnext/issues/31696)) ([bc7cfe6](https://github.com/frappe/erpnext/commit/bc7cfe69190f53dd4203717373dc6a51c61b0481)) * enable tax withholding checkbox in PI with supplier_tds ([bc74942](https://github.com/frappe/erpnext/commit/bc7494278dcf2d2d00f34b6915b144cca0e875d8)) * ensure defaults removed in bad frappe patch get set again (backport [#31659](https://github.com/frappe/erpnext/issues/31659)) ([#31661](https://github.com/frappe/erpnext/issues/31661)) ([763787b](https://github.com/frappe/erpnext/commit/763787b0a510027353cfae81aacbaf8939349042)) * hero image not loading in portal homepage ([#31699](https://github.com/frappe/erpnext/issues/31699)) ([8a6432e](https://github.com/frappe/erpnext/commit/8a6432ec3f4bf63c39d1f687f618cec2360ebccf)) * **india:** e-way bill json for unregistered gst category ([01d6df4](https://github.com/frappe/erpnext/commit/01d6df45d00d5b09c46b5fbf689645e2e65a9349)) * make customer_name field read only. ([2381b81](https://github.com/frappe/erpnext/commit/2381b81aaceacddae9a8a326568a955208e8b6d5)) * manually generated salary slips overwritten by structure amount ([#31711](https://github.com/frappe/erpnext/issues/31711)) ([32c1bb6](https://github.com/frappe/erpnext/commit/32c1bb61de5e70cb8ca3d6bfc12eb11b17b96690)) * Map `Item` image to `Website Item` website_image only if published via UI (v13) ([9b1544a](https://github.com/frappe/erpnext/commit/9b1544aa14c50259fba88507ad921a7c4bc8715a)) * payment entry to student ([#31708](https://github.com/frappe/erpnext/issues/31708)) ([4f02375](https://github.com/frappe/erpnext/commit/4f023757dee6545dadb1f4ba85d26c4b164dfa70)) * Reload loan Table in Salary Slip when change Employee ([#31525](https://github.com/frappe/erpnext/issues/31525)) ([a95c011](https://github.com/frappe/erpnext/commit/a95c011a9355aa19ad751b7921f3b3c7de41c8d5)) * rounding errors while closing pos (backport [#31654](https://github.com/frappe/erpnext/issues/31654)) ([#31658](https://github.com/frappe/erpnext/issues/31658)) ([529a47b](https://github.com/frappe/erpnext/commit/529a47bc88ec82ca39a93ad7386184c981104861)) * Route condition set with proper filter ([#31556](https://github.com/frappe/erpnext/issues/31556)) ([5cdc267](https://github.com/frappe/erpnext/commit/5cdc267aeeaa857546538adb7fc93e868377fd6c)) * The Fee details are not fetched in Program Enrollment ([#31153](https://github.com/frappe/erpnext/issues/31153)) ([0602848](https://github.com/frappe/erpnext/commit/0602848caa3be112a1d34d60cf2fe85192674f0e)) * update fr translations ([#31687](https://github.com/frappe/erpnext/issues/31687)) ([89348c1](https://github.com/frappe/erpnext/commit/89348c1bb4b7a104a4cda2a249cad23e05f30675)) * update fr translations (backport [#31526](https://github.com/frappe/erpnext/issues/31526)) ([#31666](https://github.com/frappe/erpnext/issues/31666)) ([95e1021](https://github.com/frappe/erpnext/commit/95e1021caff94d65acfcf2855a9e472dafdb3d50)) * update SO's percentage billed on credit note ([2f2d3de](https://github.com/frappe/erpnext/commit/2f2d3de3068e90fff7463448c901826551c49772)) * use current pos profile on sales return ([c442b4a](https://github.com/frappe/erpnext/commit/c442b4aef1a298c7e19eef2084534e32378a54ee)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 2c928b288de..329e7e87e10 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.36.1" +__version__ = "13.36.2" def get_default_company(user=None): From c15cff05b0f85d499042527fd02e1bc16eb9cb5f Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 9 Aug 2022 14:09:11 +0000 Subject: [PATCH 02/35] chore(release): Bumped to Version 13.36.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [13.36.3](https://github.com/frappe/erpnext/compare/v13.36.2...v13.36.3) (2022-08-09) ### Bug Fixes * (india) HSN wise report ([08c69c7](https://github.com/frappe/erpnext/commit/08c69c7a762dce43f150ea6192e775f5bdebbd0b)) * add asset repair to accounting dimension list ([809d5ca](https://github.com/frappe/erpnext/commit/809d5caf8091c9cfca0550b61043be2fef3e3dbc)) * consider precision while validating advance amount against sanctioned amount ([63cd434](https://github.com/frappe/erpnext/commit/63cd4349a6efeb42eab2afcc4a897d9a202bd8b6)) * **ecommerce:** remove query to non-existing field (backport [#31771](https://github.com/frappe/erpnext/issues/31771)) ([#31774](https://github.com/frappe/erpnext/issues/31774)) ([0e46b33](https://github.com/frappe/erpnext/commit/0e46b33ee3b82ca2ee880431b8548adaca97cfa8)) * f-string and where clause ([42b3959](https://github.com/frappe/erpnext/commit/42b395916dbe35a2bdf2aa2fcdcac7523d19dcef)) * getting error to show sales invoice group or print rep… (backport [#31756](https://github.com/frappe/erpnext/issues/31756)) ([#31768](https://github.com/frappe/erpnext/issues/31768)) ([473a43b](https://github.com/frappe/erpnext/commit/473a43b6b12d2b4370e365c68c9ad68a57359ffa)) * incorrect incoming rate set for inter transfer purchase receipt ([4e8b39a](https://github.com/frappe/erpnext/commit/4e8b39ab3f70792e2b52b2fea568b2895b0fe745)) * incorrect tax calculation in case of reduced payment days ([80981d0](https://github.com/frappe/erpnext/commit/80981d025f63f43e2900f6db4ae6ca58a849040b)) * intercompany SO throws exception ([a17acfd](https://github.com/frappe/erpnext/commit/a17acfdaa2f60a873a823ffcddc2b3e7e07711cf)) * minor changed link ([e9e53a7](https://github.com/frappe/erpnext/commit/e9e53a74c910633660525d660d8833eec3e6e095)) * Payment Entry button is visible even when claim is fully paid ([d820757](https://github.com/frappe/erpnext/commit/d820757359ff21fb342867d67ce3f3623a2a5a30)) * pending principal- amount ([16c94d2](https://github.com/frappe/erpnext/commit/16c94d292c27d06d6f94ceef4f78b73283e79785)) * **pos:** validate product bundles while submitting pos invoice (backport [#31615](https://github.com/frappe/erpnext/issues/31615)) ([#31657](https://github.com/frappe/erpnext/issues/31657)) ([b145fe3](https://github.com/frappe/erpnext/commit/b145fe3b3e7d1e8faaffc29106bbd5784e06e9d1)) * specify allowed doctype in queries ([#31765](https://github.com/frappe/erpnext/issues/31765)) ([0dbfb15](https://github.com/frappe/erpnext/commit/0dbfb1589e1aa15a93d2d9ce815a85d639376320)) * statistical component showing up in salary slip ([#31746](https://github.com/frappe/erpnext/issues/31746)) ([26aef4f](https://github.com/frappe/erpnext/commit/26aef4fb1c00129ff9ea2c717110814a6ee108dd)) * sum stock_value and group by warehouse ([18d93f8](https://github.com/frappe/erpnext/commit/18d93f83982fb1b3b3b76a0b3d19e76fb8d94d69)) * taxable_value and gst_account_heads ([6c574fb](https://github.com/frappe/erpnext/commit/6c574fbf33d6e06a10f8a0154408625e4da855f9)) * update To Date in Employee Work History ([#31811](https://github.com/frappe/erpnext/issues/31811)) ([0057c10](https://github.com/frappe/erpnext/commit/0057c10a7dc5f873963782273f1f12794f0e0ae5)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 329e7e87e10..91d372b2dcd 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.36.2" +__version__ = "13.36.3" def get_default_company(user=None): From bafa3ce150ee84afbf52e8817299733b01b4020c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 18 Aug 2022 06:15:23 +0000 Subject: [PATCH 03/35] chore(release): Bumped to Version 13.36.4 ## [13.36.4](https://github.com/frappe/erpnext/compare/v13.36.3...v13.36.4) (2022-08-18) ### Bug Fixes * check item_code in all rows of po_items (backport [#31741](https://github.com/frappe/erpnext/issues/31741)) ([#31843](https://github.com/frappe/erpnext/issues/31843)) ([ba8dc89](https://github.com/frappe/erpnext/commit/ba8dc8925fe07526e8d65f52807b9527415767db)) * conflicts ([41b8563](https://github.com/frappe/erpnext/commit/41b8563b7ad201a2d8bbf43a6153b64d48f5db43)) * contact search in request for quotation (backport [#31828](https://github.com/frappe/erpnext/issues/31828)) ([#31841](https://github.com/frappe/erpnext/issues/31841)) ([2a615af](https://github.com/frappe/erpnext/commit/2a615af00a754162c202d10f77e1c1d36a6d48cd)) * incorrect produced-qty in production-plan-item (backport [#31706](https://github.com/frappe/erpnext/issues/31706)) ([#31862](https://github.com/frappe/erpnext/issues/31862)) ([7ddb332](https://github.com/frappe/erpnext/commit/7ddb332f47b3777bd789e104249d086c1e560caa)) * incorrect rate in BOM exploded items (backport [#31513](https://github.com/frappe/erpnext/issues/31513)) ([#31865](https://github.com/frappe/erpnext/issues/31865)) ([3274e76](https://github.com/frappe/erpnext/commit/3274e7681d9da02fba1fe92e4825ed1ef260a260)) * Make expense account editable in Purchase Receipt Item (backport [#31730](https://github.com/frappe/erpnext/issues/31730)) ([#31879](https://github.com/frappe/erpnext/issues/31879)) ([4775c42](https://github.com/frappe/erpnext/commit/4775c425934d9844512a3f97d32b029613c91c0c)) * not able to issue expired batches ([7ee75ff](https://github.com/frappe/erpnext/commit/7ee75ff762fd15b4c02a4ca58edece81f00bca5b)) * set `billing_address` for purchases in `get_party_details` ([a7d66fa](https://github.com/frappe/erpnext/commit/a7d66fa3526567f5846469d25b445ee4383fc7d5)) * set `company_address` for purchases in `party.js` ([d1de4b0](https://github.com/frappe/erpnext/commit/d1de4b027cd80637b78ab3b44a57fe73aa1a7f33)) * Transit filter for Default Target Warehouse in SE (backport [#31839](https://github.com/frappe/erpnext/issues/31839)) ([#31874](https://github.com/frappe/erpnext/issues/31874)) ([b0917aa](https://github.com/frappe/erpnext/commit/b0917aaf8af6ff67bd85a58090b9b74f973c027a)) * use old style for `_dict.update` ([15654aa](https://github.com/frappe/erpnext/commit/15654aae8b3c5bb2df53401e25c94bd58a118b63)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 91d372b2dcd..40f630fcf5b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.36.3" +__version__ = "13.36.4" def get_default_company(user=None): From f6248d0259f81cd754752c55b843266c976e92fa Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 23 Aug 2022 13:37:34 +0000 Subject: [PATCH 04/35] chore(release): Bumped to Version 13.36.5 ## [13.36.5](https://github.com/frappe/erpnext/compare/v13.36.4...v13.36.5) (2022-08-23) ### Bug Fixes * added employee name to call log ([476ded2](https://github.com/frappe/erpnext/commit/476ded2972b3a2cd3b8e379229a42cd791c45199)) * added field to show called group, user_id ([66578a5](https://github.com/frappe/erpnext/commit/66578a58cf78647c8eb8b1be21289211f7645737)) * added tests ([aa8a063](https://github.com/frappe/erpnext/commit/aa8a063103cde202120f1fa0c07d178dcc464ac6)) * added type of call select field, additional status for agent rejecting call ([b65bce8](https://github.com/frappe/erpnext/commit/b65bce8f986ae6050e14f40c449817b79e997850)) * call status fix ([ffb1196](https://github.com/frappe/erpnext/commit/ffb1196516559557062422e9eeabc9c9aabd5f6f)) * call type doctype, fixes ([b94154f](https://github.com/frappe/erpnext/commit/b94154f00aef71e10640531e1dbdef2c4a3c6e48)) * Handle exception where no employee is returned ([baab96d](https://github.com/frappe/erpnext/commit/baab96d02ce2e52ebb74df9a1070b86eb1130cf1)) * incorrect buying amount in Gross Profit rpt ([6405a93](https://github.com/frappe/erpnext/commit/6405a9378d2375d1db3a9defb8337207e35a1135)) * incorrect tax amt due to different exchange rate in PR and PI ([ba5ee1c](https://github.com/frappe/erpnext/commit/ba5ee1ca96cebbe06b12a4bcd6f4a6a3941944ed)) * interview rescheduling not working ([a482840](https://github.com/frappe/erpnext/commit/a4828407d09cd41088120671e000afa3c6c484a4)) * limit pos recent order page result ([9751f10](https://github.com/frappe/erpnext/commit/9751f1060e3ca686fdc8535543dffc44a37f76f8)) * linter, sider fixes ([b529627](https://github.com/frappe/erpnext/commit/b52962751c95ced44557cbe14ea5ff2c507a2bf7)) * **minor:** save the employee doc on promotion/transfer update ([36130c6](https://github.com/frappe/erpnext/commit/36130c62926814bd74412ff4c10e9c670157f82c)) * process loan interest accrual ([acbed43](https://github.com/frappe/erpnext/commit/acbed434c28ec0373c3ff4cd5489c7ea75a5581a)) * Replace walrus operator ([23a4412](https://github.com/frappe/erpnext/commit/23a441252b33a018b77ac89162cfb4cae4fd287d)) * sider fixes ([90ed14a](https://github.com/frappe/erpnext/commit/90ed14a055c0e625c3c2a74506d206cec3d7daa5)) * TDS calculation for advance payment ([a452143](https://github.com/frappe/erpnext/commit/a4521437825a960e14556fa3963bd1bd1a55a2dc)) * term loan interest calculation ([8dea238](https://github.com/frappe/erpnext/commit/8dea238d124299d1ca21cdc7afb277cdf4138a97)) * Update received_by if "to" is changed ([9263d5f](https://github.com/frappe/erpnext/commit/9263d5ff4d934d1913f4391c156e85af070e2fe4)) * used get_employees_with_number, strip_number methods ([3f46b2a](https://github.com/frappe/erpnext/commit/3f46b2a0ce4663bbb9a3b81d45cfe356acf39aac)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 40f630fcf5b..d698d6e7ea7 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.36.4" +__version__ = "13.36.5" def get_default_company(user=None): From 11b04acf8ba522e330ce06d964cbf4a71757b453 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 30 Aug 2022 08:05:05 +0000 Subject: [PATCH 05/35] chore(release): Bumped to Version 13.37.0 # [13.37.0](https://github.com/frappe/erpnext/compare/v13.36.5...v13.37.0) (2022-08-30) ### Bug Fixes * Add docstatus filter for voucher_no in Repost Item Valuation ([2cf2885](https://github.com/frappe/erpnext/commit/2cf2885470fcf2a81a27a40cdf3e3c3c47173f41)) * Cash and non trade discount calculation ([20e9599](https://github.com/frappe/erpnext/commit/20e9599fc1db3d09cb79c93d47de2e4369928908)) * do not clear promotion/transfer details if doc is amended ([#32000](https://github.com/frappe/erpnext/issues/32000)) ([074d484](https://github.com/frappe/erpnext/commit/074d484d3cbfd7ca1ef7916dac3b947245fb7d50)) * filter leave types and render leave application dashboard w/o from date ([#32001](https://github.com/frappe/erpnext/issues/32001)) ([7686c9e](https://github.com/frappe/erpnext/commit/7686c9e4504e5a4cb7403ad234fd1861ef7253bc)) * Loan Write-off for term loans ([e64e812](https://github.com/frappe/erpnext/commit/e64e81267941425b781d38437ea3f6fd19240223)) * **minor:** don't print tax rate if its '0' ([#31838](https://github.com/frappe/erpnext/issues/31838)) ([a46dca5](https://github.com/frappe/erpnext/commit/a46dca57cbe32e3cf48090ce19406863be6b2cec)) * permissions for Task Type ([#32016](https://github.com/frappe/erpnext/issues/32016)) ([1157bf8](https://github.com/frappe/erpnext/commit/1157bf887ff84009ddd090d359245cca1df12128)) * **pos:** edge case while closing pos (backport [#31748](https://github.com/frappe/erpnext/issues/31748)) ([#31893](https://github.com/frappe/erpnext/issues/31893)) ([261405c](https://github.com/frappe/erpnext/commit/261405cec1e856977b78fd5d724483c47548f08b)) * Purposes not set ([edfaf99](https://github.com/frappe/erpnext/commit/edfaf993881d040c8d066e4451f0592f26867207)) * Route condition set for stock ledger (backport [#31935](https://github.com/frappe/erpnext/issues/31935)) ([#31946](https://github.com/frappe/erpnext/issues/31946)) ([34537c9](https://github.com/frappe/erpnext/commit/34537c9dc2e9ee0d92f74316fc9adab887a1270a)) * Set the condition to create a purchase receipt ([b4c992d](https://github.com/frappe/erpnext/commit/b4c992dd4da6480b8ca1e261da41af8c13556300)) * Test cases ([7c85b48](https://github.com/frappe/erpnext/commit/7c85b487cd20521f8a44aac37c771139e3926a83)) ### Features * In BOM, Operation time can be fix (backport [#27063](https://github.com/frappe/erpnext/issues/27063)) ([#31923](https://github.com/frappe/erpnext/issues/31923)) ([c2b8d1b](https://github.com/frappe/erpnext/commit/c2b8d1bd9acea306894e02df9c3146f1fb993f09)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d698d6e7ea7..4835dae9731 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.36.5" +__version__ = "13.37.0" def get_default_company(user=None): From 2af489d69d66f3f3b9e979872d884267220df300 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 6 Sep 2022 16:05:26 +0000 Subject: [PATCH 06/35] chore(release): Bumped to Version 13.38.0 # [13.38.0](https://github.com/frappe/erpnext/compare/v13.37.0...v13.38.0) (2022-09-06) ### Bug Fixes * consider Stock Entry purpose while getting total supplied qty ([8964612](https://github.com/frappe/erpnext/commit/8964612b8e08fefa9439584b0d9084596c07f07e)) * force delete old report docs (backport [#32026](https://github.com/frappe/erpnext/issues/32026)) ([#32028](https://github.com/frappe/erpnext/issues/32028)) ([0f1f67d](https://github.com/frappe/erpnext/commit/0f1f67dcaef04a6026fdebac1e41890714afe85b)) * incorrect import parameter for cancel PDA ([814dd36](https://github.com/frappe/erpnext/commit/814dd36a3e1b2e01c926bbd34422d4218bfa5999)) * key error on consolidated financial report ([20919c8](https://github.com/frappe/erpnext/commit/20919c8626171a8d5917b23f223fefb96d4d3db7)) * KSA VAT report multi currency amount issue ([56d8962](https://github.com/frappe/erpnext/commit/56d8962e406a192839a8bf6962d745a9c2f1ea1d)) * Loan Interest accruals for 0 rated loans ([a369852](https://github.com/frappe/erpnext/commit/a3698524ca6ec5d7c961ec9df09bc582d1f3f50e)) * lost quotation not to expired ([ea995de](https://github.com/frappe/erpnext/commit/ea995de4a30b06771f5812a25fd03b58e743e631)) * Naming series in Journal Entry Template ([66cb3fd](https://github.com/frappe/erpnext/commit/66cb3fd63f3aa6d8523b9776eff58267b5de80d9)) * **pos:** error while consolidating pos invoices ([0527393](https://github.com/frappe/erpnext/commit/0527393b09e68df1e3cce521d31be6c40719bdb4)) * QR Code multi currency issue ([b10a2b8](https://github.com/frappe/erpnext/commit/b10a2b87b65f3c29ed0aae7f30099e9c8ad75377)) ### Features * better Item Price list view ([#31954](https://github.com/frappe/erpnext/issues/31954)) ([25d2847](https://github.com/frappe/erpnext/commit/25d2847881419f1db7312364b752038c9758ebd9)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4835dae9731..59eadb75085 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.37.0" +__version__ = "13.38.0" def get_default_company(user=None): From 47aa1910043c7929e5a52209040a1ae1d96860ee Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 13 Sep 2022 11:15:15 +0000 Subject: [PATCH 07/35] chore(release): Bumped to Version 13.39.0 # [13.39.0](https://github.com/frappe/erpnext/compare/v13.38.0...v13.39.0) (2022-09-13) ### Bug Fixes * add missing warehouse filter in BOM Stock Calculated report ([ab32c09](https://github.com/frappe/erpnext/commit/ab32c09ff9721b6f2b1d4b70e521031adf2f3c10)) * calculate amount based on payment days for statistical components too ([3f99522](https://github.com/frappe/erpnext/commit/3f995227641ba5f28978d8293c21277ea3d9f169)) * conflict ([6f2a567](https://github.com/frappe/erpnext/commit/6f2a567c956c85ca26713a7cd07a23e547da92fa)) * linter ([e177f1e](https://github.com/frappe/erpnext/commit/e177f1e51b7f27d5faf096b94f6c7bdc52ace47a)) * Loan amount post write off ([e78a767](https://github.com/frappe/erpnext/commit/e78a7679a4ea18a15789caa39e06403770ef08e2)) * option to start reposting from repost item valuation ([a1826f2](https://github.com/frappe/erpnext/commit/a1826f215a37afe7319b35bdc57329ef8cf2f46d)) * pick_list - picked qty getting set to 1 ([3256e2b](https://github.com/frappe/erpnext/commit/3256e2b8b7cee0e7b95ca58a6f22f96090e2ffaa)) * Purchase Order creation from Sales Order ([d79aacd](https://github.com/frappe/erpnext/commit/d79aacd1cba41d6034d094928af08de3ff8852de)) * Rate for internal PI have non stock UOM items ([638d6b7](https://github.com/frappe/erpnext/commit/638d6b717780fc4e28ca9534fc4a16bfd3ff9e98)) * reposting not working for internal transferred purchase receipt ([bb41d8b](https://github.com/frappe/erpnext/commit/bb41d8bc473716ca7f43a61667a8945f9f93715a)) * require barcode item barcode ([#32112](https://github.com/frappe/erpnext/issues/32112)) ([44c3a32](https://github.com/frappe/erpnext/commit/44c3a322d350a8444e4f9112e038e3b4b3b87a49)), closes [#31957](https://github.com/frappe/erpnext/issues/31957) * required_qty in BOM Stock Calculated report ([f2e63bc](https://github.com/frappe/erpnext/commit/f2e63bc491c87173a4cd3301d6550fc0c7cb4a0a)) * **Salary Slip:** set default amount to 0 if None ([#32184](https://github.com/frappe/erpnext/issues/32184)) ([d29a033](https://github.com/frappe/erpnext/commit/d29a033c09bb8562e1889351622345f85265a8eb)) ### Features * Ability to manually update loan amount in Salary Slips ([ac320e4](https://github.com/frappe/erpnext/commit/ac320e4d555ad4d1f3945c9c370162cbcc336ce8)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 59eadb75085..fa2dbb80644 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.38.0" +__version__ = "13.39.0" def get_default_company(user=None): From be4fdca6c7d568af56ee1eab0eca3f977f8ded42 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 20 Sep 2022 19:12:47 +0000 Subject: [PATCH 08/35] chore(release): Bumped to Version 13.39.1 ## [13.39.1](https://github.com/frappe/erpnext/compare/v13.39.0...v13.39.1) (2022-09-20) ### Bug Fixes * Add child table for tax withheld vouchers ([4165fee](https://github.com/frappe/erpnext/commit/4165fee6a7f09aecc5a2a3e6767732ae773bcbe7)) * Change Department fieldtype to Link in Leave Balance Report ([#32252](https://github.com/frappe/erpnext/issues/32252)) ([e2e69dc](https://github.com/frappe/erpnext/commit/e2e69dced7048d154d2a5b22b67de05d12a4ead3)) * dont show zero qty available items in stock ageing report ([37dbc70](https://github.com/frappe/erpnext/commit/37dbc7043a17f62bbbc150ba25a093c99cbe2408)) * fetch description only if empty on the payment schedule ([07a7fdb](https://github.com/frappe/erpnext/commit/07a7fdbe6cb796310a700548ea4ee305a40b3037)) * Fetch vouchers to show in Invoice ([51d7c0b](https://github.com/frappe/erpnext/commit/51d7c0bfe4f52417a17df4e934e5a62ebfe5253d)) * incorrect gl if tax on multi currency payment entry ([d9d6a07](https://github.com/frappe/erpnext/commit/d9d6a07bbbf18d357434796302439dec3235bd72)) * item wise sales register taxes and charges ([e65990e](https://github.com/frappe/erpnext/commit/e65990eb348620832dbd832d9ee36ee3c6e3c6d1)) * make `po_detail` or `sco_rm_detail` mandatory for SE `Send to Subcontractor` ([0329642](https://github.com/frappe/erpnext/commit/0329642116eeba0729c3cae8e092d29fc1ba7b2a)) * Parent Level project linkning on creating PO from project ([3c3e3cf](https://github.com/frappe/erpnext/commit/3c3e3cfcf8257f3f648100373921b0b30e4ec3a1)) * pending accrual entries ([ef86b43](https://github.com/frappe/erpnext/commit/ef86b437cbfac3a5afa69561ad5da59c1b8a0c4b)) * production plan pending-qty ([2dcb35d](https://github.com/frappe/erpnext/commit/2dcb35da33124f4295a6435a833c772c065402bd)) * remove return pos from pos reconciliation tool ([e9bf74e](https://github.com/frappe/erpnext/commit/e9bf74e5899ba9eebe9fca815e0a65fc1ca60367)) * TDS deduction via journal entry ([ca0cce7](https://github.com/frappe/erpnext/commit/ca0cce7599afaa1d24aa6cc5f853eee01005e101)) * use default supplier currency if default supplier is enabled ([3c10e50](https://github.com/frappe/erpnext/commit/3c10e5066a2601c98d0480c2db091f767a322c7f)) * warehouse filter in `BOM Stock Calculated Report` ([96bf1e2](https://github.com/frappe/erpnext/commit/96bf1e2a0a8d0ef3ef5aa4d71d966062da5f7545)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index fa2dbb80644..f0b86595f68 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.39.0" +__version__ = "13.39.1" def get_default_company(user=None): From a77388d520b18f30b2d3c8a23a7ce83fa2eb9b01 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 28 Sep 2022 10:10:58 +0000 Subject: [PATCH 09/35] chore(release): Bumped to Version 13.39.2 ## [13.39.2](https://github.com/frappe/erpnext/compare/v13.39.1...v13.39.2) (2022-09-28) ### Bug Fixes * `For Quantity` error msg in `Stock Entry` ([a194d28](https://github.com/frappe/erpnext/commit/a194d28b698f0f6d68a196c268897780872dac79)) * Add return against indexes for POS Invoice ([9e8e7aa](https://github.com/frappe/erpnext/commit/9e8e7aab70506c10c9d381eaee583092e6d169fe)) * Add return against indexes for POS Invoice ([6c528d4](https://github.com/frappe/erpnext/commit/6c528d469dfb6efd378700b54f4c89339777b3de)) * allow to return expired batches using purchase return ([02468a9](https://github.com/frappe/erpnext/commit/02468a902f7c6eeb75ef092c8b29bea3e135c57e)) * consider overproduction percentage for WO finish button ([ed4ac10](https://github.com/frappe/erpnext/commit/ed4ac100ba98ff6287ac39025e3dd54caf67ce5e)) * difference amount calculation on payment reconciliation ([d68cdb4](https://github.com/frappe/erpnext/commit/d68cdb4f5e7d91db9d37c5f107b5595344468fdb)) * don't count half day in absent days in Monthly Attendance Sheet summarized view ([#32399](https://github.com/frappe/erpnext/issues/32399)) ([255aa7a](https://github.com/frappe/erpnext/commit/255aa7a84a5f3cc276819ff8705c3d714266d58f)) * **e-invoicing:** local variable 'res' referenced before assignment ([#32352](https://github.com/frappe/erpnext/issues/32352)) ([8f961ab](https://github.com/frappe/erpnext/commit/8f961abe8bf3e82f1b522ff01321c1dfc9506c3d)) * get amount in words for debit note ([0cd1cac](https://github.com/frappe/erpnext/commit/0cd1cacc29c96b14352e45e6256db91c2091d3d1)) * GST Itemised Sales Register GSTIN filter ([#32367](https://github.com/frappe/erpnext/issues/32367)) ([988c5b9](https://github.com/frappe/erpnext/commit/988c5b95e6bd8595a5d8de07de01841065d2673b)) * item_code key error in production plan ([638d5e9](https://github.com/frappe/erpnext/commit/638d5e9dc3185b6bee747407a3b3a2566f483803)) * Move subscription process to hourly long quque ([447c553](https://github.com/frappe/erpnext/commit/447c5539546b04d96332fe895ec8fd86444a8f98)) * opening entry causing discepancy between stock and trial balance ([70c68f0](https://github.com/frappe/erpnext/commit/70c68f011a62516c166c9ae7a6ba8d0f261ed34a)) * POS only validate QTY if is_stock_item ([ac8100f](https://github.com/frappe/erpnext/commit/ac8100f1e53de005e7cd2386b3275433209d20f8)) * POS properly validate stock for bundle products ([96fa14b](https://github.com/frappe/erpnext/commit/96fa14be889832495ad7e87d33106175f6dc1060)) * Reduce font size for Process Statement of accounts print/pdf ([1cfeb93](https://github.com/frappe/erpnext/commit/1cfeb9371cb853604163ad7a3279aa34bbf1c784)) * remove no_copy for ignore_pricing_rule ([8abfdb6](https://github.com/frappe/erpnext/commit/8abfdb65989b88ba21c1b576c8f32e7239e91a53)) * total value in all keys ([80d046a](https://github.com/frappe/erpnext/commit/80d046a38ca3ab9a0be0aa9a398fa39c095ee30a)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index f0b86595f68..1c0cf61907f 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.39.1" +__version__ = "13.39.2" def get_default_company(user=None): From a668d4e7891a9532ed78f346e6fe785a3b2fa1d1 Mon Sep 17 00:00:00 2001 From: anandbaburajan Date: Wed, 28 Sep 2022 21:25:42 +0530 Subject: [PATCH 10/35] fix: asset requiring maintenance sold status (cherry picked from commit 14ab9d91584c7bd90d545de7a93b68b354d06a7e) --- erpnext/assets/doctype/asset/asset.py | 18 +++++++++++-- erpnext/assets/doctype/asset/test_asset.py | 31 +++++++++++++++++++++- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 1ce815ae2bd..653eb745552 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -643,13 +643,27 @@ class Asset(AccountsController): self.db_set("status", status) def get_status(self): - """Returns status based on whether it is draft, submitted, scrapped or depreciated""" + """Returns status based on whether it is draft, submitted, sold, scrapped or depreciated""" if self.docstatus == 0: status = "Draft" elif self.docstatus == 1: status = "Submitted" - if self.journal_entry_for_scrap: + item = frappe.qb.DocType("Sales Invoice Item").as_("item") + si = frappe.qb.DocType("Sales Invoice").as_("si") + + is_asset_sold = ( + frappe.qb.from_(item) + .select(item.parent) + .inner_join(si) + .on(item.parent == si.name) + .where(item.asset == self.name) + .where(si.docstatus == 1) + ).run() + + if is_asset_sold: + status = "Sold" + elif self.journal_entry_for_scrap: status = "Scrapped" elif self.finance_books: idx = self.get_default_finance_book_idx() or 0 diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 13475f34c39..493bd40a5dd 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -7,7 +7,7 @@ import frappe from frappe.utils import add_days, add_months, cstr, flt, get_last_day, getdate, nowdate from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice -from erpnext.assets.doctype.asset.asset import make_sales_invoice +from erpnext.assets.doctype.asset.asset import make_sales_invoice, update_maintenance_status from erpnext.assets.doctype.asset.depreciation import ( post_depreciation_entries, restore_asset, @@ -238,6 +238,34 @@ class TestAsset(AssetSetup): self.assertEqual(frappe.db.get_value("Asset", asset.name, "status"), "Partially Depreciated") + def test_asset_with_maintenance_required_status_after_sale(self): + asset = create_asset( + calculate_depreciation=1, + available_for_use_date="2020-06-06", + purchase_date="2020-01-01", + expected_value_after_useful_life=10000, + total_number_of_depreciations=3, + frequency_of_depreciation=10, + maintenance_required=1, + depreciation_start_date="2020-12-31", + submit=1, + ) + + post_depreciation_entries(date="2021-01-01") + + si = make_sales_invoice(asset=asset.name, item_code="Macbook Pro", company="_Test Company") + si.customer = "_Test Customer" + si.due_date = nowdate() + si.get("items")[0].rate = 25000 + si.insert() + si.submit() + + self.assertEqual(frappe.db.get_value("Asset", asset.name, "status"), "Sold") + + update_maintenance_status() + + self.assertEqual(frappe.db.get_value("Asset", asset.name, "status"), "Sold") + def test_expense_head(self): pr = make_purchase_receipt( item_code="Macbook Pro", qty=2, rate=200000.0, location="Test Location" @@ -1353,6 +1381,7 @@ def create_asset(**args): "number_of_depreciations_booked": args.number_of_depreciations_booked or 0, "gross_purchase_amount": args.gross_purchase_amount or 100000, "purchase_receipt_amount": args.purchase_receipt_amount or 100000, + "maintenance_required": args.maintenance_required or 0, "warehouse": args.warehouse or "_Test Warehouse - _TC", "available_for_use_date": args.available_for_use_date or "2020-06-06", "location": args.location or "Test Location", From bc21ce412b6c10e5133d3821699666d4692dd7c9 Mon Sep 17 00:00:00 2001 From: anandbaburajan Date: Thu, 29 Sep 2022 08:58:33 +0530 Subject: [PATCH 11/35] chore: refactor by creating is_sold (cherry picked from commit 430a4c98a0e90fc1b9fdec137ff86f4497de421d) --- erpnext/assets/doctype/asset/asset.py | 29 +++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 653eb745552..2b0602193d8 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -649,19 +649,7 @@ class Asset(AccountsController): elif self.docstatus == 1: status = "Submitted" - item = frappe.qb.DocType("Sales Invoice Item").as_("item") - si = frappe.qb.DocType("Sales Invoice").as_("si") - - is_asset_sold = ( - frappe.qb.from_(item) - .select(item.parent) - .inner_join(si) - .on(item.parent == si.name) - .where(item.asset == self.name) - .where(si.docstatus == 1) - ).run() - - if is_asset_sold: + if self.is_sold(): status = "Sold" elif self.journal_entry_for_scrap: status = "Scrapped" @@ -679,6 +667,21 @@ class Asset(AccountsController): status = "Cancelled" return status + def is_sold(self): + item = frappe.qb.DocType("Sales Invoice Item").as_("item") + si = frappe.qb.DocType("Sales Invoice").as_("si") + + asset_sales_invoice = ( + frappe.qb.from_(item) + .select(item.parent) + .inner_join(si) + .on(item.parent == si.name) + .where(item.asset == self.name) + .where(si.docstatus == 1) + ).run() + + return True if asset_sales_invoice else False + def get_default_finance_book_idx(self): if not self.get("default_finance_book") and self.company: self.default_finance_book = erpnext.get_default_finance_book(self.company) From 4afd2b74703ecc4f87bfbf3e79426a2b2b61e101 Mon Sep 17 00:00:00 2001 From: anandbaburajan Date: Thu, 29 Sep 2022 15:37:04 +0530 Subject: [PATCH 12/35] chore: refactor by just using a filter (cherry picked from commit 6b21deedae06e9ba8cb5b4e96bf3fa4b62c894e9) --- erpnext/assets/doctype/asset/asset.py | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 2b0602193d8..f4cb63b2ed7 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -643,15 +643,13 @@ class Asset(AccountsController): self.db_set("status", status) def get_status(self): - """Returns status based on whether it is draft, submitted, sold, scrapped or depreciated""" + """Returns status based on whether it is draft, submitted, scrapped or depreciated""" if self.docstatus == 0: status = "Draft" elif self.docstatus == 1: status = "Submitted" - if self.is_sold(): - status = "Sold" - elif self.journal_entry_for_scrap: + if self.journal_entry_for_scrap: status = "Scrapped" elif self.finance_books: idx = self.get_default_finance_book_idx() or 0 @@ -667,21 +665,6 @@ class Asset(AccountsController): status = "Cancelled" return status - def is_sold(self): - item = frappe.qb.DocType("Sales Invoice Item").as_("item") - si = frappe.qb.DocType("Sales Invoice").as_("si") - - asset_sales_invoice = ( - frappe.qb.from_(item) - .select(item.parent) - .inner_join(si) - .on(item.parent == si.name) - .where(item.asset == self.name) - .where(si.docstatus == 1) - ).run() - - return True if asset_sales_invoice else False - def get_default_finance_book_idx(self): if not self.get("default_finance_book") and self.company: self.default_finance_book = erpnext.get_default_finance_book(self.company) @@ -836,7 +819,9 @@ class Asset(AccountsController): def update_maintenance_status(): - assets = frappe.get_all("Asset", filters={"docstatus": 1, "maintenance_required": 1}) + assets = frappe.get_all( + "Asset", filters={"docstatus": 1, "maintenance_required": 1, "disposal_date": ("is", "not set")} + ) for asset in assets: asset = frappe.get_doc("Asset", asset.name) From 34284216cd5ac0b4f2910d5f21e74fcb8aa27846 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sun, 2 Oct 2022 15:39:08 +0000 Subject: [PATCH 13/35] chore(release): Bumped to Version 13.39.3 ## [13.39.3](https://github.com/frappe/erpnext/compare/v13.39.2...v13.39.3) (2022-10-02) ### Bug Fixes * asset requiring maintenance sold status ([a668d4e](https://github.com/frappe/erpnext/commit/a668d4e7891a9532ed78f346e6fe785a3b2fa1d1)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1c0cf61907f..b60bd1506fb 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.39.2" +__version__ = "13.39.3" def get_default_company(user=None): From de584535e9db9a4bd081f7edca2b907809e28675 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 4 Oct 2022 12:14:27 +0000 Subject: [PATCH 14/35] chore(release): Bumped to Version 13.39.4 ## [13.39.4](https://github.com/frappe/erpnext/compare/v13.39.3...v13.39.4) (2022-10-04) ### Bug Fixes * asset requiring maintenance sold status ([14ab9d9](https://github.com/frappe/erpnext/commit/14ab9d91584c7bd90d545de7a93b68b354d06a7e)) * conflict ([0f8e34e](https://github.com/frappe/erpnext/commit/0f8e34e972b73ad48bfb7f4225d50e61f19666f2)) * Disbursement Account in patch to update old loans ([b4a511c](https://github.com/frappe/erpnext/commit/b4a511cbb4aa7f2f7f7d25b6d4d291a3b4075e26)) * e-Way bill JSON for Intra-state internal transfers ([b7fbf75](https://github.com/frappe/erpnext/commit/b7fbf75e10d56884327fe87e4698e8bafabc3424)) * fetch swift_number in payment_request ([6074570](https://github.com/frappe/erpnext/commit/60745705a83a0d8afa01bf51f694cb0531735ab1)) * Incorrect TCS amount deducted in Sales Invoice ([32456bf](https://github.com/frappe/erpnext/commit/32456bff30537811b63bd5c2f37eb731c4bacafe)) * Item details fetching on making transaction from item dashboard ([1aed76f](https://github.com/frappe/erpnext/commit/1aed76f778223bf9962fe9bac29c4abf190b7c17)) * linter issue ([4757a65](https://github.com/frappe/erpnext/commit/4757a658635afcaf090c77f16ce1de156032d3da)) * not able to return sold expired batches ([2fd4485](https://github.com/frappe/erpnext/commit/2fd4485f2f397e74459167631131a8b23ff574d7)) * payment reconciliation tool consider cost_center for JV ([9f98891](https://github.com/frappe/erpnext/commit/9f988910b54a3ca0cf00d1706127f4ad5e349e1c)) * payment request make bank field Link instead of Read Only ([299175e](https://github.com/frappe/erpnext/commit/299175e6feaae4c2cbf2176d699a532b01a9ee6c)) * pick list picked-qty for batch item ([96a6db0](https://github.com/frappe/erpnext/commit/96a6db0422c92bc5a97545c3ce1eb28fb34badb5)) * SEZ Without Payment of Tax don't add tax rows ([a13eecc](https://github.com/frappe/erpnext/commit/a13eecc961df0f73219b878181ff7126f7e555e7)) * show `Make Purchase Invoice` button based on permission ([7124328](https://github.com/frappe/erpnext/commit/712432864095cb193a1e031bb2f3ab33d1619f01)) * typo in sales_register's filter mode_of_payment (backport [#32371](https://github.com/frappe/erpnext/issues/32371)) ([#32447](https://github.com/frappe/erpnext/issues/32447)) ([cdc8297](https://github.com/frappe/erpnext/commit/cdc82970838d328b416dc0fe878e759b6148890d)) * update with new Frappe color. fix [#32455](https://github.com/frappe/erpnext/issues/32455) ([#32456](https://github.com/frappe/erpnext/issues/32456)) ([ad43b18](https://github.com/frappe/erpnext/commit/ad43b18acee4447a7bac2b295e8783478f722b76)) ### Reverts * Revert "fix: fetch swift_number in payment_request" ([8251b84](https://github.com/frappe/erpnext/commit/8251b843ecf51aec8c6d72f57c0c135b05a3912a)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b60bd1506fb..c6a1446601c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.39.3" +__version__ = "13.39.4" def get_default_company(user=None): From 6e9b52d26864231b869964930e6a514f9745297a Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 7 Oct 2022 14:04:36 +0530 Subject: [PATCH 15/35] fix: Tax withholding related fixes (cherry picked from commit abf5b6be3ea13f0d00664e25e7b1742429d4f5e2) (cherry picked from commit 32a9575f07ebfb8ec807f1a5133d063de132ea67) --- .../tax_withholding_category/tax_withholding_category.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 7f79724f3bc..b4d72d6938f 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -419,7 +419,10 @@ def get_tds_amount(ldc, parties, inv, tax_details, tax_deducted, vouchers): ): # Get net total again as TDS is calculated on net total # Grand is used to just check for threshold breach - net_total = frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(net_total)") or 0.0 + net_total = 0 + if vouchers: + net_total = frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(net_total)") + net_total += inv.net_total supp_credit_amt = net_total - cumulative_threshold From be404b77a113bd3299348bf62fd8ed099e8896b1 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 7 Oct 2022 14:22:40 +0530 Subject: [PATCH 16/35] fix: Do not add tax withheld vouchers post tax withheding in one document (cherry picked from commit 781d160c684f9c04b1c799449e484abff3e07d8a) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json (cherry picked from commit e1c41b91950e9a3df2e557ea220a71f3e2eebbe7) --- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 5 +++++ .../tax_withholding_category/tax_withholding_category.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index ff3d5950808..10151e9e553 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1428,6 +1428,7 @@ "fieldname": "tax_withheld_vouchers", "fieldtype": "Table", "label": "Tax Withheld Vouchers", + "no_copy": 1, "options": "Tax Withheld Vouchers", "read_only": 1 } @@ -1436,7 +1437,11 @@ "idx": 204, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2022-09-13 23:39:54.525037", +======= + "modified": "2022-10-07 14:19:14.214157", +>>>>>>> 781d160c68 (fix: Do not add tax withheld vouchers post tax withheding in one document) "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index b4d72d6938f..08ca96afb9f 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -240,6 +240,9 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N ) else: tax_amount = net_total * tax_details.rate / 100 if net_total > 0 else 0 + + # once tds is deducted, not need to add vouchers in the invoice + voucher_wise_amount = {} else: tax_amount = get_tds_amount(ldc, parties, inv, tax_details, tax_deducted, vouchers) From 611dd5c073d3366db8d3844e3fc1a090623284f9 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 7 Oct 2022 17:33:03 +0530 Subject: [PATCH 17/35] chore: resolve conflicts (cherry picked from commit 2bf76f64bd22ac88068c8d65b3d1e9ab3ee33719) --- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 10151e9e553..fdd68c6e3ad 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1437,11 +1437,7 @@ "idx": 204, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2022-09-13 23:39:54.525037", -======= "modified": "2022-10-07 14:19:14.214157", ->>>>>>> 781d160c68 (fix: Do not add tax withheld vouchers post tax withheding in one document) "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", @@ -1505,4 +1501,4 @@ "timeline_field": "supplier", "title_field": "title", "track_changes": 1 -} \ No newline at end of file +} From c66ebcdf9a116a638d7cb582f1a1059a0c52b9bb Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 7 Oct 2022 13:08:29 +0000 Subject: [PATCH 18/35] chore(release): Bumped to Version 13.39.5 ## [13.39.5](https://github.com/frappe/erpnext/compare/v13.39.4...v13.39.5) (2022-10-07) ### Bug Fixes * Do not add tax withheld vouchers post tax withheding in one document ([be404b7](https://github.com/frappe/erpnext/commit/be404b77a113bd3299348bf62fd8ed099e8896b1)) * Tax withholding related fixes ([6e9b52d](https://github.com/frappe/erpnext/commit/6e9b52d26864231b869964930e6a514f9745297a)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index c6a1446601c..a6f9c0b2f98 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.39.4" +__version__ = "13.39.5" def get_default_company(user=None): From 49c9c68e14d5081e8a1fbf75f0cb9d181f7f328c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 12 Oct 2022 07:21:47 +0000 Subject: [PATCH 19/35] chore(release): Bumped to Version 13.40.0 # [13.40.0](https://github.com/frappe/erpnext/compare/v13.39.5...v13.40.0) (2022-10-12) ### Bug Fixes * Do not add tax withheld vouchers post tax withheding in one document ([e1c41b9](https://github.com/frappe/erpnext/commit/e1c41b91950e9a3df2e557ea220a71f3e2eebbe7)) * future attendance marking ([cb4fbd5](https://github.com/frappe/erpnext/commit/cb4fbd54325dbe0a831308b477a7a2a6c0b0c29e)) * make readings status mandatory in Quality Inspection ([257a2a3](https://github.com/frappe/erpnext/commit/257a2a3d71b8cc3ce232f1ebf1c6b3ab2cacf9af)) * mark attendance issue with joining date ([6f8d620](https://github.com/frappe/erpnext/commit/6f8d62088e22bf7ce96e5396b0e24c7ab2c39a86)) * mark attendance issue with relieving date ([a9546dd](https://github.com/frappe/erpnext/commit/a9546dd01f5781c3a64c42bb61d0d05c2f4922da)) * PO cancel post advance payment cancel against PO ([41599cf](https://github.com/frappe/erpnext/commit/41599cf29f804c140953923e6d282abe794cb132)) * set Quality Inspection status based on readings status ([d67b44f](https://github.com/frappe/erpnext/commit/d67b44fcec565defc78599f7c744f2ab6bf56914)) * Tax withholding related fixes ([32a9575](https://github.com/frappe/erpnext/commit/32a9575f07ebfb8ec807f1a5133d063de132ea67)) * **test:** `test_rejected_qi_validation` ([2763d06](https://github.com/frappe/erpnext/commit/2763d063072cd03bc369006f0d5433e65715170d)) * TooManyWritesError during reposting of stock ([476175b](https://github.com/frappe/erpnext/commit/476175b307584b42d400329fed89617fc8c84f6b)) ### Features * cst ux improvement ([552c595](https://github.com/frappe/erpnext/commit/552c5951bd3a83518d35ed26dfab729c67b44c94)) * **JE:** trigger account field when fetched from template ([baa4fec](https://github.com/frappe/erpnext/commit/baa4fec61198596a283cb4453d857adadbf59951)), closes [#32409](https://github.com/frappe/erpnext/issues/32409) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index a6f9c0b2f98..77f317fdbe1 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.39.5" +__version__ = "13.40.0" def get_default_company(user=None): From 1609129e1ec0609f1d711b15d84c1733b61353a2 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 12 Oct 2022 12:34:41 +0000 Subject: [PATCH 20/35] chore(release): Bumped to Version 13.40.1 ## [13.40.1](https://github.com/frappe/erpnext/compare/v13.40.0...v13.40.1) (2022-10-12) ### Bug Fixes * conflct in test purchase receipt ([6ae2f90](https://github.com/frappe/erpnext/commit/6ae2f90683b6c3309bcafbb8e9772770c0264741)) * conflict ([cb7aef5](https://github.com/frappe/erpnext/commit/cb7aef505dec2f53590bd92fd40e8662687d22b4)) * consider outgoingrate while valuation rate calculate ([6f43133](https://github.com/frappe/erpnext/commit/6f43133c04637e252965e28ce1df7bb16ffefb48)) * consider sales rate as incoming rate for transit warehouse in purchase flow ([f72602e](https://github.com/frappe/erpnext/commit/f72602ebf3c8c641225dfc4afcde354bf8ead13a)) * Hanlde rounding loss for internal transfer ([dd26ef9](https://github.com/frappe/erpnext/commit/dd26ef96e0c1baeb650dab1fa07e3c2b6ef172b0)) * Incoming rate precision fixes for intra company transfer ([227ce5f](https://github.com/frappe/erpnext/commit/227ce5f8a28b1d469f7ee9820d460ef05ff4a9df)) * incorrect import ([8238b89](https://github.com/frappe/erpnext/commit/8238b89907a91d5830ed372bbcc609b999a62345)) * linter issue ([aa0552d](https://github.com/frappe/erpnext/commit/aa0552d7884a543e3e97235b52a8af222ad4ae0a)) * test case ([acd64ba](https://github.com/frappe/erpnext/commit/acd64ba7c137d32fa217af1a349d5663a7086251)) * value error on pos submit ([4383980](https://github.com/frappe/erpnext/commit/4383980bcc2d38564b60bc1163bbd50b9b9b12f6)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 77f317fdbe1..51f2c18f5c8 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.40.0" +__version__ = "13.40.1" def get_default_company(user=None): From 7ba029b140fe97626aa8d167294f715c288de625 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 19 Oct 2022 03:57:46 +0000 Subject: [PATCH 21/35] chore(release): Bumped to Version 13.40.2 ## [13.40.2](https://github.com/frappe/erpnext/compare/v13.40.1...v13.40.2) (2022-10-19) ### Bug Fixes * `Brand Defaults` filters ([b1c70af](https://github.com/frappe/erpnext/commit/b1c70af4db0f5007b3e83b560a8d619ab99cfbe2)) * don't try to update youtube data if disabled in settings (backport [#32588](https://github.com/frappe/erpnext/issues/32588)) ([#32590](https://github.com/frappe/erpnext/issues/32590)) ([7e7122b](https://github.com/frappe/erpnext/commit/7e7122b6682942da8d3bb9f4c7c113f5c25b6cc9)) * Ignore linked purchase invoice on cancel ([eec770a](https://github.com/frappe/erpnext/commit/eec770a4a895aebbcb4b849d235055f6592cf507)) * Party account for multi-order invoices ([0ae2a4f](https://github.com/frappe/erpnext/commit/0ae2a4f1c4b1d30e1e407b913b79c629005e782e)) * pricing rule item code UOM apply & conversions (backport [#32566](https://github.com/frappe/erpnext/issues/32566)) ([#32636](https://github.com/frappe/erpnext/issues/32636)) ([b8d97b8](https://github.com/frappe/erpnext/commit/b8d97b82b81704e893cb75229457ec5dcda7c804)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 51f2c18f5c8..7de11e670ae 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.40.1" +__version__ = "13.40.2" def get_default_company(user=None): From 1d31ab1ab7a6a71553fb48d3e035027d746aa09f Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 26 Oct 2022 05:09:20 +0000 Subject: [PATCH 22/35] chore(release): Bumped to Version 13.40.3 ## [13.40.3](https://github.com/frappe/erpnext/compare/v13.40.2...v13.40.3) (2022-10-26) ### Bug Fixes * allow to create Sales Order from expired Quotation ([#32641](https://github.com/frappe/erpnext/issues/32641)) ([ea03289](https://github.com/frappe/erpnext/commit/ea032893d379e796de118996e2fc2974248eb77c)) * Billing Address for inter-company purchase docs ([3a2f08f](https://github.com/frappe/erpnext/commit/3a2f08fbda9b94333f7f61457f3f599061fea237)) * BOM cost update message ([98bcb72](https://github.com/frappe/erpnext/commit/98bcb7255d77d828f4ca56959eb888017aa5fb84)) * conflicts ([447485a](https://github.com/frappe/erpnext/commit/447485ae909df20b1c52012186e4a04056caaabc)) * incorrect qty in material request ([1741501](https://github.com/frappe/erpnext/commit/1741501ea81424f11a859a217610873a20059afb)) * overlap error not raised for job card in case of workstation with production capacity ([b5376ce](https://github.com/frappe/erpnext/commit/b5376ce5cb93a100376e1c5afb43a7b10917232c)) * unset contact details ([7afb19f](https://github.com/frappe/erpnext/commit/7afb19f9656d1f4fb70a19f237ff87c5ce225b84)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7de11e670ae..30518cde79a 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.40.2" +__version__ = "13.40.3" def get_default_company(user=None): From 6d1ae68d703fa654c76a4474de2eb401c26a8b16 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 1 Nov 2022 17:19:09 +0000 Subject: [PATCH 23/35] chore(release): Bumped to Version 13.41.0 # [13.41.0](https://github.com/frappe/erpnext/compare/v13.40.3...v13.41.0) (2022-11-01) ### Bug Fixes * add `Sales Order` reference in Material Request Dashboard ([cb89dba](https://github.com/frappe/erpnext/commit/cb89dba5ab488a52f56f6f7cf7eb7230b113bc91)) * Do not force eligibilgity of itc for reverse charge ([9dc0edf](https://github.com/frappe/erpnext/commit/9dc0edfb8a71204fc9d6b7806fb63c59f2215a26)) * filter return pos in reconciliation tool ([b877b0d](https://github.com/frappe/erpnext/commit/b877b0d3a2e47a26534b842931288c6405ee5dc6)) * group warehouse filter not working for Batch-wise Balance history report ([310e7c5](https://github.com/frappe/erpnext/commit/310e7c522c3462de84415ea0c0825202819c7020)) * Issues while cancel/amending Purchase Invoice with TDS enabled ([8888957](https://github.com/frappe/erpnext/commit/88889579529db4f4222125cab1300b463f535d93)) * Mode of payment for returns in POS Sales Invoice ([9b63a1a](https://github.com/frappe/erpnext/commit/9b63a1a2e9716113f266f76977bb6a29e56e1703)) ### Features * Repayment schedule types for term loans ([c2817be](https://github.com/frappe/erpnext/commit/c2817bed0b640b5a804af8ccc9faac5f2fd204b1)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 30518cde79a..7118f73f2f1 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.40.3" +__version__ = "13.41.0" def get_default_company(user=None): From 9cf5e9e61e80c566a1813ac66eadf048d308df8c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 8 Nov 2022 12:14:53 +0000 Subject: [PATCH 24/35] chore(release): Bumped to Version 13.41.1 ## [13.41.1](https://github.com/frappe/erpnext/compare/v13.41.0...v13.41.1) (2022-11-08) ### Bug Fixes * `Material Consumption` option in case of `Skip Transfer to WIP` in WO ([418c131](https://github.com/frappe/erpnext/commit/418c13133153d5f7fd369a26282f1048e05b9365)) * Create POS Opening Entry POS Profile filter. ([76e4bb4](https://github.com/frappe/erpnext/commit/76e4bb44f18676655c3de42e39279cd3921560b4)) * Disable tax included prices for internal transfers ([#32794](https://github.com/frappe/erpnext/issues/32794)) ([84ee1b8](https://github.com/frappe/erpnext/commit/84ee1b86af608c5474e73ca05ccdb5f27447c76b)) * for asset's purchase_date, if bill_date is set, use that instead of posting_date ([1d23c9a](https://github.com/frappe/erpnext/commit/1d23c9a9fddca8d64432a2cfafbcd2e0adb81f05)) * Reset advance paid amount on Oreder cancel and amend ([e32e0bc](https://github.com/frappe/erpnext/commit/e32e0bc8fac4bae0bbec5045b1b1bc0df7a47eb0)) * use `flt` instead of `cint` in `get_batch_no` ([601b1e3](https://github.com/frappe/erpnext/commit/601b1e38216af26b2a0dceb3d01424b2beda5220)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7118f73f2f1..31275dba272 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.41.0" +__version__ = "13.41.1" def get_default_company(user=None): From f3f6d35a846aeec71e61ab9e712eb8bc8399daba Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 15 Nov 2022 13:02:04 +0000 Subject: [PATCH 25/35] chore(release): Bumped to Version 13.42.0 # [13.42.0](https://github.com/frappe/erpnext/compare/v13.41.1...v13.42.0) (2022-11-15) ### Bug Fixes * add Document Date in E-Invoice print format ([a16347f](https://github.com/frappe/erpnext/commit/a16347f325f70cecd4990537a6ebac609ae2c0df)) * ambiguous 'cost_center' on payment reconciliation ([e9e5ded](https://github.com/frappe/erpnext/commit/e9e5ded36b227dc71ef27bb514bb0ea1b9a9c4c8)) * check type for reference name ([ad648f3](https://github.com/frappe/erpnext/commit/ad648f313c9adf66dfe841f5dfd0d897e8697ae6)) * don't set WIP Warehouse if is checked in WO ([4a17711](https://github.com/frappe/erpnext/commit/4a177113c6c64cee3ef6419f0341b511abd4bb42)) * Label for applicable dimension table ([cbc8b2d](https://github.com/frappe/erpnext/commit/cbc8b2da0a47ff8d9b79453bdce7a239ac820b91)) * Pricing rule item group consider UOM ([1ed0b6e](https://github.com/frappe/erpnext/commit/1ed0b6e89b9dd98fb89d59c0ead9175a89037d53)), closes [#32566](https://github.com/frappe/erpnext/issues/32566) * query condition change ([88ce59a](https://github.com/frappe/erpnext/commit/88ce59a1cacb354db8629597a27764409c593c75)) * repayment schedule regeneration ([a19031c](https://github.com/frappe/erpnext/commit/a19031cf9adcd4168570cdc29c5159f82c7f16f4)) * set `WIP Warehouse` in Job Card ([f09e427](https://github.com/frappe/erpnext/commit/f09e4273d9133b24bd3b046bdcf4c9db12c1fb7f)) * set stock UOM in args to ensure item price is fetched ([bd2242b](https://github.com/frappe/erpnext/commit/bd2242b285e5d2b627fda77c9f974069b1273c0c)) * wrong totals in hsn summary report ([79d508f](https://github.com/frappe/erpnext/commit/79d508f4ffed04c468bde057393cf3a63d04dbc5)) ### Features * page break in SoA pdf ([e93ac3c](https://github.com/frappe/erpnext/commit/e93ac3c9a8eb9b83b7fc5523c775cacdea22e57f)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 31275dba272..bd478a080e0 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.41.1" +__version__ = "13.42.0" def get_default_company(user=None): From f106b9e884cc0063a7f1c15218361e2d44003021 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 22 Nov 2022 16:00:21 +0000 Subject: [PATCH 26/35] chore(release): Bumped to Version 13.42.1 ## [13.42.1](https://github.com/frappe/erpnext/compare/v13.42.0...v13.42.1) (2022-11-22) ### Bug Fixes * Accounting Dimension filtering for Sales and Purchase Report ([58f3f2b](https://github.com/frappe/erpnext/commit/58f3f2b6d9e124c705c76e3536a308b4c6450bf8)) * cast POS query inputs to integers (backport [#32975](https://github.com/frappe/erpnext/issues/32975)) ([#32978](https://github.com/frappe/erpnext/issues/32978)) ([3aba14f](https://github.com/frappe/erpnext/commit/3aba14f71adaae18f2c11fe4ef187ca6fa6e011a)) * GP incorrect buying amount if no upd on SI and Delivery Note ([40bb2cb](https://github.com/frappe/erpnext/commit/40bb2cba933bfe07cc24df37c65495d66c9da4f2)) * incorrect fix of conversion factor in PP ([726c3d3](https://github.com/frappe/erpnext/commit/726c3d32be0af09965d2a405d8534e1a72553e19)) * linter issue ([72f9308](https://github.com/frappe/erpnext/commit/72f9308df612d3e7e5c69fe9ba3985d5570da113)) * make `is_internal_supplier` read-only ([30b5d1c](https://github.com/frappe/erpnext/commit/30b5d1c4006f613102fcb6f32920e09302331a6f)) * Opening journal entry templates ([4ad3e28](https://github.com/frappe/erpnext/commit/4ad3e28147c6b5b92c2e446740cf99b427b5add3)) * **pos:** item selector image border radius ([ab31eb4](https://github.com/frappe/erpnext/commit/ab31eb4ee7622780a910b2edac3447c0bec4a21b)) * **realtime:** Restrict updates to only last modified or current user ([#33034](https://github.com/frappe/erpnext/issues/33034)) ([ecdd849](https://github.com/frappe/erpnext/commit/ecdd8493ea9136e93d9dedfd53ea6825ff3add9a)) * use `list()` on self mutating iteration ([0070b5e](https://github.com/frappe/erpnext/commit/0070b5ef9afecfc0ab586acf809d0c50b9f77e03)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index bd478a080e0..2606efa308c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.42.0" +__version__ = "13.42.1" def get_default_company(user=None): From e54b23d71ba5d9da1aa5c1eee77f983c5852608c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 29 Nov 2022 13:19:11 +0000 Subject: [PATCH 27/35] chore(release): Bumped to Version 13.42.2 ## [13.42.2](https://github.com/frappe/erpnext/compare/v13.42.1...v13.42.2) (2022-11-29) ### Bug Fixes * `production_item` filter in `Job Card Summary Report` ([ce54198](https://github.com/frappe/erpnext/commit/ce5419888b8ef65c083918413561e1765955e08b)) * `Work Order` filter typo in `Job Card Summary Report` ([2de239c](https://github.com/frappe/erpnext/commit/2de239c73b63c6c46911af329649ac8b3c041fa1)) * cannot update auth token until token expiry if credentials change ([2121714](https://github.com/frappe/erpnext/commit/21217148567cc997d00b1bc1ffed312b21f04dc1)) * company name with `,` in `Job Card Summary Report` ([ffef0cb](https://github.com/frappe/erpnext/commit/ffef0cb771d677dd2f1623f8305a3a41e4a73da2)) * company name with `,` in `Work Order Summary Report` ([11978fc](https://github.com/frappe/erpnext/commit/11978fca4e61fa483926fb74919b083b7036947c)) * create rounding gl entry for PCV during gle post processing ([7af4597](https://github.com/frappe/erpnext/commit/7af45972aeb37e2e14fec63e618d7d34b06e17b3)) * disbursable amount on currrent security price ([eca2d96](https://github.com/frappe/erpnext/commit/eca2d96419dd6f9ee4ea036e625974a24380778c)) * Dispatch address display ([10cfcb5](https://github.com/frappe/erpnext/commit/10cfcb5e8af81f4cb568093e08418a64d4c0e8dd)) * incorrect balance qty ([78e64fa](https://github.com/frappe/erpnext/commit/78e64fa486ff7c2643d4c16792de916cb941cccf)) * linter ([b91860d](https://github.com/frappe/erpnext/commit/b91860ddf23ba60bb0089a7dd4a12ca1adcb717e)) * MR Item `description` and `item_name` gets reset on `qty` change ([b66976b](https://github.com/frappe/erpnext/commit/b66976bd36f6fa4a6f5e13eeb09d66905b06eaa5)) * Multicurrency invoice with exchange gain and loss showing up in AR/AP report ([d38a289](https://github.com/frappe/erpnext/commit/d38a2895b0cd285da44e071956a7446fd8d49adf)) * only consider draft pending asset repair docs ([6da7b38](https://github.com/frappe/erpnext/commit/6da7b38f6e2cda1399e6ab044bae9551e0182d1d)) * only show serial no batch selector only once ([0c6a7ce](https://github.com/frappe/erpnext/commit/0c6a7cef95acfe48f02230d682f0c59cea69c5b7)) * reset `voucher_type` and `voucher_no` if `based_on` is set to `Item and Warehouse` ([ff59483](https://github.com/frappe/erpnext/commit/ff594831b05d8a71d440428e3fee8424148fed2d)) * validate voucher type while checking journal entry against payroll entry ([07c25ac](https://github.com/frappe/erpnext/commit/07c25ace5c413acec3592255f653228b5c592913)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 2606efa308c..400d15eb356 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.42.1" +__version__ = "13.42.2" def get_default_company(user=None): From 104967881d1bce419e6a70beeedb8e228e569fb1 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 6 Dec 2022 14:37:49 +0000 Subject: [PATCH 28/35] chore(release): Bumped to Version 13.42.3 ## [13.42.3](https://github.com/frappe/erpnext/compare/v13.42.2...v13.42.3) (2022-12-06) ### Bug Fixes * add company filter in RFQ Items ([a716f78](https://github.com/frappe/erpnext/commit/a716f780a8f0256d9c2a9cc946d2a3e7ebfcc149)) * key error on p/l and balance sheet reports on foreign currency ([0003e0c](https://github.com/frappe/erpnext/commit/0003e0cb5b8ea14e3f0d71a907876f91a75887fe)) * key error while filtering on date range and different currency ([84ef814](https://github.com/frappe/erpnext/commit/84ef814f452a3997440d622914753d7a3e40e7fd)) * non empty FG batch picked while completing work order ([635d80d](https://github.com/frappe/erpnext/commit/635d80dc2fd51f6a345eb236a8b7654c7077c35e)) * remove duplicate schema ([4ad9aa2](https://github.com/frappe/erpnext/commit/4ad9aa29eef957421f557b879b48452d06cf549d)) * replace sql code with fields list in get_cached_value ([b3ccad8](https://github.com/frappe/erpnext/commit/b3ccad8cf4fb5a30990c66acf3114439fbe77613)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 400d15eb356..c5ef6a35ebe 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.42.2" +__version__ = "13.42.3" def get_default_company(user=None): From b3a9c1eb2a41a20a1cdfa2b0fb7baf1309d51d07 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 13 Dec 2022 12:31:01 +0000 Subject: [PATCH 29/35] chore(release): Bumped to Version 13.42.4 ## [13.42.4](https://github.com/frappe/erpnext/compare/v13.42.3...v13.42.4) (2022-12-13) ### Bug Fixes * `Enough Parts to Build` in `BOM Stock Report` ([50b2898](https://github.com/frappe/erpnext/commit/50b2898a2c13ffe5a71eea3242b771d11ba8abb5)) * `Material Request` reference in internal `Sales Order` ([988a327](https://github.com/frappe/erpnext/commit/988a327b58b6dee234103c86f552b1d705e1d4df)) * incorrect balance on parent company due to key mismatch ([b17ac52](https://github.com/frappe/erpnext/commit/b17ac522f5aa5d16d77f048999dd1f5abd8bb402)) * order status in `Production Planning Report` ([2880469](https://github.com/frappe/erpnext/commit/2880469706fc69778218849b231dc2166801912b)) ### Performance Improvements * add indexes on payment entry reference (backport [#33288](https://github.com/frappe/erpnext/issues/33288)) ([#33290](https://github.com/frappe/erpnext/issues/33290)) ([45f79ef](https://github.com/frappe/erpnext/commit/45f79ef6444b9ae99603fa4b5a731a80a4e69636)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index c5ef6a35ebe..11d6cc3fd0d 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.42.3" +__version__ = "13.42.4" def get_default_company(user=None): From 35c71f5923a05d576bcb9608b87b1ffaf1d2743f Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 20 Dec 2022 14:02:06 +0000 Subject: [PATCH 30/35] chore(release): Bumped to Version 13.42.5 ## [13.42.5](https://github.com/frappe/erpnext/compare/v13.42.4...v13.42.5) (2022-12-20) ### Bug Fixes * conflict ([7ef0c6b](https://github.com/frappe/erpnext/commit/7ef0c6bb015166163447d3c463fd04351f699fc6)) * conflict in hooks file ([2a18067](https://github.com/frappe/erpnext/commit/2a18067aadb2e03cf42b8feea12436909979b0a6)) * conflict in stock_entry ([4587bb3](https://github.com/frappe/erpnext/commit/4587bb376713405cac2a310339b3480eba45cf71)) * conflicts ([086e747](https://github.com/frappe/erpnext/commit/086e74791bc9419ca8d103c6225becb58c9baa51)) * Consolidated financial report ([7825c56](https://github.com/frappe/erpnext/commit/7825c564eb640cb3b1b31f90f1351eab957928e4)) * Cost center filter not working in cash flow report ([684a45f](https://github.com/frappe/erpnext/commit/684a45f234bd62a94de97136ef445d158b3fc516)) * daily scheduler to identify and fix stock transfer entries having incorrect valuation ([b82154c](https://github.com/frappe/erpnext/commit/b82154cb9e1d9376519c62c864fc53b265c64268)) * disabled items showing in the report 'Itemwise Recommended Reorder Level ([c3fca3c](https://github.com/frappe/erpnext/commit/c3fca3cfcb89a373bd8bac7d0bde4739dee28f4d)) * get_serial_nos not defined ([e5b3748](https://github.com/frappe/erpnext/commit/e5b3748b49165438e962c4d1fa61bc6e21bb133d)) * get_serial_nos_for_fg() missing 1 required positional argument: 'args' ([eddb7b4](https://github.com/frappe/erpnext/commit/eddb7b429eb97dbaff40aa9af1f0336acb69e4ef)) * linter issue ([ab2f250](https://github.com/frappe/erpnext/commit/ab2f250960b33d4b084d03e8dd51f71818aab78a)) * translation for warning on Overbilling/-receipt/-delivery ([b13ee4f](https://github.com/frappe/erpnext/commit/b13ee4fc8cdb9e38612213b303da500337562217)) * unsupported operand type(s) for +: 'int' and 'NoneType' ([a6241fc](https://github.com/frappe/erpnext/commit/a6241fc813cb2eaf9312c0834439defbc25a42dd)) * unsupported operand type(s) for +=: 'int' and 'NoneType' ([b573d97](https://github.com/frappe/erpnext/commit/b573d9739fd1232938e41ee47945b25bf0dc7d61)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 11d6cc3fd0d..bdc69919324 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.42.4" +__version__ = "13.42.5" def get_default_company(user=None): From cbda28d73944d3f33463d851b4fdcf5181701e9b Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 27 Dec 2022 17:49:51 +0530 Subject: [PATCH 31/35] chore: release v13 (#33453) * fix: typerror on multi warehouse in Packed Items DN(with bundled item with varying warehouses)-> Sales Invoice. (cherry picked from commit e684eb32d0cf62f67f2b1de30ec7368d36708321) * test: type error on bundled products with different warehouses (cherry picked from commit 5918bb03f7db388a27cb9319530b56c383304242) * fix: No permission to read doctype (cherry picked from commit c0da948a4ef9f5fb1dd5764ee1908bd6f0475c7e) * fix: `shipping_address` in PO (cherry picked from commit 7e1b6b3c2aa114331ad9085cfefee340b8ca2ad0) # Conflicts: # erpnext/buying/doctype/purchase_order/purchase_order.json * chore: conflicts * chore: linter * refactor: Customer and Supplier Ledger summary will have hidden fields for better handling of user permission (#33432) * feat: provision to setup opening balances for earnings and deductions while creating SSA * fix: use get_all instead of get_value as get_value api dont supports between condition * fix: patch * fix: provision to set tax_deducted_till_date after document is subnmmited * fix: `shipping_address` for non-drop shipping item (cherry picked from commit 67a7ccf3cead654e66a3d1b5ccb253d90b19c43b) * chore: linter (#33455) fix: linter Co-authored-by: ruthra kumar Co-authored-by: Nabin Hait Co-authored-by: s-aga-r Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Saurabh --- .../bank_clearance_summary.py | 9 +- .../customer_ledger_summary.py | 72 ++++++++++++++ .../report/gross_profit/gross_profit.py | 1 + .../report/gross_profit/test_gross_profit.py | 95 ++++++++++++++++++ .../supplier_ledger_summary.js | 18 ---- .../purchase_order/purchase_order.json | 4 +- .../create_salary_structure_assignments.py | 2 + .../payroll_settings/payroll_settings.json | 10 +- .../doctype/salary_slip/salary_slip.py | 26 ++++- .../doctype/salary_slip/test_salary_slip.py | 98 +++++++++++++++++++ .../salary_structure_assignment.js | 39 +++++++- .../salary_structure_assignment.json | 26 ++++- .../salary_structure_assignment.py | 72 ++++++++++++++ .../doctype/sales_order/sales_order.py | 19 +++- .../customer_group/customer_group.json | 14 ++- .../supplier_group/supplier_group.json | 16 ++- .../setup/doctype/territory/territory.json | 14 ++- .../stock/doctype/stock_entry/stock_entry.py | 3 +- 18 files changed, 498 insertions(+), 40 deletions(-) diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py index 9d2deea523b..449ebdcd924 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py @@ -22,8 +22,7 @@ def get_columns(): { "label": _("Payment Document Type"), "fieldname": "payment_document_type", - "fieldtype": "Link", - "options": "Doctype", + "fieldtype": "Data", "width": 130, }, { @@ -33,15 +32,15 @@ def get_columns(): "options": "payment_document_type", "width": 140, }, - {"label": _("Posting Date"), "fieldname": "posting_date", "fieldtype": "Date", "width": 100}, + {"label": _("Posting Date"), "fieldname": "posting_date", "fieldtype": "Date", "width": 120}, {"label": _("Cheque/Reference No"), "fieldname": "cheque_no", "width": 120}, - {"label": _("Clearance Date"), "fieldname": "clearance_date", "fieldtype": "Date", "width": 100}, + {"label": _("Clearance Date"), "fieldname": "clearance_date", "fieldtype": "Date", "width": 120}, { "label": _("Against Account"), "fieldname": "against", "fieldtype": "Link", "options": "Account", - "width": 170, + "width": 200, }, {"label": _("Amount"), "fieldname": "amount", "fieldtype": "Currency", "width": 120}, ] diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 3beaa2bfe74..f5b46bde586 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -27,6 +27,7 @@ class PartyLedgerSummaryReport(object): ) self.get_gl_entries() + self.get_additional_columns() self.get_return_invoices() self.get_party_adjustment_amounts() @@ -34,6 +35,42 @@ class PartyLedgerSummaryReport(object): data = self.get_data() return columns, data + def get_additional_columns(self): + """ + Additional Columns for 'User Permission' based access control + """ + from frappe import qb + + if self.filters.party_type == "Customer": + self.territories = frappe._dict({}) + self.customer_group = frappe._dict({}) + + customer = qb.DocType("Customer") + result = ( + frappe.qb.from_(customer) + .select( + customer.name, customer.territory, customer.customer_group, customer.default_sales_partner + ) + .where((customer.disabled == 0)) + .run(as_dict=True) + ) + + for x in result: + self.territories[x.name] = x.territory + self.customer_group[x.name] = x.customer_group + else: + self.supplier_group = frappe._dict({}) + supplier = qb.DocType("Supplier") + result = ( + frappe.qb.from_(supplier) + .select(supplier.name, supplier.supplier_group) + .where((supplier.disabled == 0)) + .run(as_dict=True) + ) + + for x in result: + self.supplier_group[x.name] = x.supplier_group + def get_columns(self): columns = [ { @@ -117,6 +154,35 @@ class PartyLedgerSummaryReport(object): }, ] + # Hidden columns for handling 'User Permissions' + if self.filters.party_type == "Customer": + columns += [ + { + "label": _("Territory"), + "fieldname": "territory", + "fieldtype": "Link", + "options": "Territory", + "hidden": 1, + }, + { + "label": _("Customer Group"), + "fieldname": "customer_group", + "fieldtype": "Link", + "options": "Customer Group", + "hidden": 1, + }, + ] + else: + columns += [ + { + "label": _("Supplier Group"), + "fieldname": "supplier_group", + "fieldtype": "Link", + "options": "Supplier Group", + "hidden": 1, + } + ] + return columns def get_data(self): @@ -144,6 +210,12 @@ class PartyLedgerSummaryReport(object): ), ) + if self.filters.party_type == "Customer": + self.party_data[gle.party].update({"territory": self.territories.get(gle.party)}) + self.party_data[gle.party].update({"customer_group": self.customer_group.get(gle.party)}) + else: + self.party_data[gle.party].update({"supplier_group": self.supplier_group.get(gle.party)}) + amount = gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr) self.party_data[gle.party].closing_balance += amount diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index b71b31a5ec2..6bd3ee5aa6b 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -551,6 +551,7 @@ class GrossProfitGenerator(object): return abs(previous_stock_value - flt(sle.stock_value)) * flt(row.qty) / abs(flt(sle.qty)) else: return flt(row.qty) * self.get_average_buying_rate(row, item_code) + return 0.0 def get_buying_amount(self, row, item_code): # IMP NOTE diff --git a/erpnext/accounts/report/gross_profit/test_gross_profit.py b/erpnext/accounts/report/gross_profit/test_gross_profit.py index 1279dec25af..d9febb74fd4 100644 --- a/erpnext/accounts/report/gross_profit/test_gross_profit.py +++ b/erpnext/accounts/report/gross_profit/test_gross_profit.py @@ -6,6 +6,8 @@ from frappe.utils import add_days, flt, nowdate from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_delivery_note from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice from erpnext.accounts.report.gross_profit.gross_profit import execute +from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_invoice +from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note from erpnext.stock.doctype.item.test_item import create_item from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry @@ -14,6 +16,7 @@ class TestGrossProfit(FrappeTestCase): def setUp(self): self.create_company() self.create_item() + self.create_bundle() self.create_customer() self.create_sales_invoice() self.clear_old_entries() @@ -42,6 +45,7 @@ class TestGrossProfit(FrappeTestCase): self.company = company.name self.cost_center = company.cost_center self.warehouse = "Stores - " + abbr + self.finished_warehouse = "Finished Goods - " + abbr self.income_account = "Sales - " + abbr self.expense_account = "Cost of Goods Sold - " + abbr self.debit_to = "Debtors - " + abbr @@ -53,6 +57,23 @@ class TestGrossProfit(FrappeTestCase): ) self.item = item if isinstance(item, str) else item.item_code + def create_bundle(self): + from erpnext.selling.doctype.product_bundle.test_product_bundle import make_product_bundle + + item2 = create_item( + item_code="_Test GP Item 2", is_stock_item=1, company=self.company, warehouse=self.warehouse + ) + self.item2 = item2 if isinstance(item2, str) else item2.item_code + + # This will be parent item + bundle = create_item( + item_code="_Test GP bundle", is_stock_item=0, company=self.company, warehouse=self.warehouse + ) + self.bundle = bundle if isinstance(bundle, str) else bundle.item_code + + # Create Product Bundle + self.product_bundle = make_product_bundle(parent=self.bundle, items=[self.item, self.item2]) + def create_customer(self): name = "_Test GP Customer" if frappe.db.exists("Customer", name): @@ -93,6 +114,28 @@ class TestGrossProfit(FrappeTestCase): ) return sinv + def create_delivery_note( + self, item=None, qty=1, rate=100, posting_date=nowdate(), do_not_save=False, do_not_submit=False + ): + """ + Helper function to populate default values in Delivery Note + """ + dnote = create_delivery_note( + company=self.company, + customer=self.customer, + currency="INR", + item=item or self.item, + qty=qty, + rate=rate, + cost_center=self.cost_center, + warehouse=self.warehouse, + return_against=None, + expense_account=self.expense_account, + do_not_save=do_not_save, + do_not_submit=do_not_submit, + ) + return dnote + def clear_old_entries(self): doctype_list = [ "Sales Invoice", @@ -206,3 +249,55 @@ class TestGrossProfit(FrappeTestCase): } gp_entry = [x for x in data if x.parent_invoice == sinv.name] self.assertDictContainsSubset(expected_entry_with_dn, gp_entry[0]) + + def test_bundled_delivery_note_with_different_warehouses(self): + """ + Test Delivery Note with bundled item. Packed Item from the bundle having different warehouses + """ + se = make_stock_entry( + company=self.company, + item_code=self.item, + target=self.warehouse, + qty=1, + basic_rate=100, + do_not_submit=True, + ) + item = se.items[0] + se.append( + "items", + { + "item_code": self.item2, + "s_warehouse": "", + "t_warehouse": self.finished_warehouse, + "qty": 1, + "basic_rate": 100, + "conversion_factor": item.conversion_factor or 1.0, + "transfer_qty": flt(item.qty) * (flt(item.conversion_factor) or 1.0), + "serial_no": item.serial_no, + "batch_no": item.batch_no, + "cost_center": item.cost_center, + "expense_account": item.expense_account, + }, + ) + se = se.save().submit() + + # Make a Delivery note with Product bundle + # Packed Items will have different warehouses + dnote = self.create_delivery_note(item=self.bundle, qty=1, rate=200, do_not_submit=True) + dnote.packed_items[1].warehouse = self.finished_warehouse + dnote = dnote.submit() + + # make Sales Invoice for above delivery note + sinv = make_sales_invoice(dnote.name) + sinv = sinv.save().submit() + + filters = frappe._dict( + company=self.company, + from_date=nowdate(), + to_date=nowdate(), + group_by="Invoice", + sales_invoice=sinv.name, + ) + + columns, data = execute(filters=filters) + self.assertGreater(len(data), 0) diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js index f81297760ed..5dc4c3d1c15 100644 --- a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js @@ -63,24 +63,6 @@ frappe.query_reports["Supplier Ledger Summary"] = { "fieldtype": "Link", "options": "Payment Terms Template" }, - { - "fieldname":"territory", - "label": __("Territory"), - "fieldtype": "Link", - "options": "Territory" - }, - { - "fieldname":"sales_partner", - "label": __("Sales Partner"), - "fieldtype": "Link", - "options": "Sales Partner" - }, - { - "fieldname":"sales_person", - "label": __("Sales Person"), - "fieldtype": "Link", - "options": "Sales Person" - }, { "fieldname":"tax_id", "label": __("Tax Id"), diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index 2144ae00366..6358896e7dc 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -370,7 +370,7 @@ { "fieldname": "shipping_address", "fieldtype": "Link", - "label": "Company Shipping Address", + "label": "Shipping Address", "options": "Address", "print_hide": 1 }, @@ -1170,7 +1170,7 @@ "idx": 105, "is_submittable": 1, "links": [], - "modified": "2022-11-17 12:34:36.033363", + "modified": "2022-12-25 18:08:59.074182", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", diff --git a/erpnext/patches/v11_0/create_salary_structure_assignments.py b/erpnext/patches/v11_0/create_salary_structure_assignments.py index b81e867b9dd..51b2a2cc0b1 100644 --- a/erpnext/patches/v11_0/create_salary_structure_assignments.py +++ b/erpnext/patches/v11_0/create_salary_structure_assignments.py @@ -13,8 +13,10 @@ from erpnext.payroll.doctype.salary_structure_assignment.salary_structure_assign def execute(): + frappe.reload_doc("Payroll", "doctype", "Payroll Settings") frappe.reload_doc("Payroll", "doctype", "Salary Structure") frappe.reload_doc("Payroll", "doctype", "Salary Structure Assignment") + frappe.db.sql( """ delete from `tabSalary Structure Assignment` diff --git a/erpnext/payroll/doctype/payroll_settings/payroll_settings.json b/erpnext/payroll/doctype/payroll_settings/payroll_settings.json index 54377e94b30..f4db6f099a6 100644 --- a/erpnext/payroll/doctype/payroll_settings/payroll_settings.json +++ b/erpnext/payroll/doctype/payroll_settings/payroll_settings.json @@ -11,6 +11,7 @@ "max_working_hours_against_timesheet", "include_holidays_in_total_working_days", "disable_rounded_total", + "define_opening_balance_for_earning_and_deductions", "column_break_11", "daily_wages_fraction_for_half_day", "email_salary_slip_to_employee", @@ -91,13 +92,20 @@ "fieldname": "show_leave_balances_in_salary_slip", "fieldtype": "Check", "label": "Show Leave Balances in Salary Slip" + }, + { + "default": "0", + "description": "If checked, then the system will enable the provision to set the opening balance for earnings and deductions till date while creating a Salary Structure Assignment (if any)", + "fieldname": "define_opening_balance_for_earning_and_deductions", + "fieldtype": "Check", + "label": "Define Opening Balance for Earning and Deductions" } ], "icon": "fa fa-cog", "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2021-03-03 17:49:59.579723", + "modified": "2022-12-21 17:30:08.704247", "modified_by": "Administrator", "module": "Payroll", "name": "Payroll Settings", diff --git a/erpnext/payroll/doctype/salary_slip/salary_slip.py b/erpnext/payroll/doctype/salary_slip/salary_slip.py index b2243838202..0563541eaa5 100644 --- a/erpnext/payroll/doctype/salary_slip/salary_slip.py +++ b/erpnext/payroll/doctype/salary_slip/salary_slip.py @@ -1063,7 +1063,25 @@ class SalarySlip(TransactionBase): ) exempted_amount = flt(exempted_amount[0][0]) if exempted_amount else 0 - return taxable_earnings - exempted_amount + opening_taxable_earning = self.get_opening_balance_for( + "taxable_earnings_till_date", start_date, end_date + ) + + return (taxable_earnings + opening_taxable_earning) - exempted_amount + + def get_opening_balance_for(self, field_to_select, start_date, end_date): + opening_balance = frappe.db.get_all( + "Salary Structure Assignment", + { + "employee": self.employee, + "salary_structure": self.salary_structure, + "from_date": ["between", (start_date, end_date)], + "docstatus": 1, + }, + field_to_select, + ) + + return opening_balance[0].get(field_to_select) if opening_balance else 0.0 def get_tax_paid_in_period(self, start_date, end_date, tax_component): # find total_tax_paid, tax paid for benefit, additional_salary @@ -1092,7 +1110,11 @@ class SalarySlip(TransactionBase): )[0][0] ) - return total_tax_paid + tax_deducted_till_date = self.get_opening_balance_for( + "tax_deducted_till_date", start_date, end_date + ) + + return total_tax_paid + tax_deducted_till_date def get_taxable_earnings( self, allow_tax_exemption=False, based_on_payment_days=0, payroll_period=None diff --git a/erpnext/payroll/doctype/salary_slip/test_salary_slip.py b/erpnext/payroll/doctype/salary_slip/test_salary_slip.py index 6e3b57239d4..32d0c7ed08f 100644 --- a/erpnext/payroll/doctype/salary_slip/test_salary_slip.py +++ b/erpnext/payroll/doctype/salary_slip/test_salary_slip.py @@ -1030,6 +1030,104 @@ class TestSalarySlip(FrappeTestCase): activity_type.wage_rate = 25 activity_type.save() + def test_salary_slip_generation_against_opening_entries_in_ssa(self): + import math + + from erpnext.payroll.doctype.payroll_period.payroll_period import get_period_factor + from erpnext.payroll.doctype.salary_structure.test_salary_structure import make_salary_structure + + payroll_period = frappe.db.get_value( + "Payroll Period", + { + "company": "_Test Company", + "start_date": ["<=", "2023-03-31"], + "end_date": [">=", "2022-04-01"], + }, + "name", + ) + + if not payroll_period: + payroll_period = create_payroll_period( + name="_Test Payroll Period for Tax", + company="_Test Company", + start_date="2022-04-01", + end_date="2023-03-31", + ) + else: + payroll_period = frappe.get_cached_doc("Payroll Period", payroll_period) + + emp = make_employee( + "test_employee_ss_with_opening_balance@salary.com", + company="_Test Company", + **{"date_of_joining": "2021-12-01"}, + ) + employee_doc = frappe.get_doc("Employee", emp) + + create_tax_slab(payroll_period, allow_tax_exemption=True) + + salary_structure_name = "Test Salary Structure for Opening Balance" + if not frappe.db.exists("Salary Structure", salary_structure_name): + salary_structure_doc = make_salary_structure( + salary_structure_name, + "Monthly", + company="_Test Company", + employee=emp, + from_date="2022-04-01", + payroll_period=payroll_period, + test_tax=True, + ) + + # validate no salary slip exists for the employee + self.assertTrue( + frappe.db.count( + "Salary Slip", + { + "employee": emp, + "salary_structure": salary_structure_doc.name, + "docstatus": 1, + "start_date": [">=", "2022-04-01"], + }, + ) + == 0 + ) + + remaining_sub_periods = get_period_factor( + emp, + get_first_day("2022-10-01"), + get_last_day("2022-10-01"), + "Monthly", + payroll_period, + depends_on_payment_days=0, + )[1] + + prev_period = math.ceil(remaining_sub_periods) + + annual_tax = 93036 # 89220 #data[0].get('applicable_tax') + monthly_tax_amount = 7732.40 # 7435 #annual_tax/12 + annual_earnings = 933600 # data[0].get('ctc') + monthly_earnings = 77800 # annual_earnings/12 + + # Get Salary Structure Assignment + ssa = frappe.get_value( + "Salary Structure Assignment", + {"employee": emp, "salary_structure": salary_structure_doc.name}, + "name", + ) + ssa_doc = frappe.get_doc("Salary Structure Assignment", ssa) + + # Set opening balance for earning and tax deduction in Salary Structure Assignment + ssa_doc.taxable_earnings_till_date = monthly_earnings * prev_period + ssa_doc.tax_deducted_till_date = monthly_tax_amount * prev_period + ssa_doc.save() + + # Create Salary Slip + salary_slip = make_salary_slip( + salary_structure_doc.name, employee=employee_doc.name, posting_date=getdate("2022-10-01") + ) + for deduction in salary_slip.deductions: + if deduction.salary_component == "TDS": + self.assertEqual(deduction.amount, rounded(monthly_tax_amount)) + def get_no_of_days(): no_of_days_in_month = calendar.monthrange(getdate(nowdate()).year, getdate(nowdate()).month) diff --git a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.js b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.js index 6cd897e95d1..7cb573d6307 100644 --- a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.js +++ b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.js @@ -42,6 +42,13 @@ frappe.ui.form.on('Salary Structure Assignment', { }); }, + refresh: function(frm) { + if(frm.doc.__onload){ + frm.unhide_earnings_and_taxation_section = frm.doc.__onload.earning_and_deduction_entries_does_not_exists; + frm.trigger("set_earnings_and_taxation_section_visibility"); + } + }, + employee: function(frm) { if(frm.doc.employee){ frappe.call({ @@ -59,6 +66,8 @@ frappe.ui.form.on('Salary Structure Assignment', { } } }); + + frm.trigger("valiadte_joining_date_and_salary_slips"); } else{ frm.set_value("company", null); @@ -71,5 +80,33 @@ frappe.ui.form.on('Salary Structure Assignment', { frm.set_value("payroll_payable_account", r.default_payroll_payable_account); }); } - } + }, + + valiadte_joining_date_and_salary_slips: function(frm) { + frappe.call({ + method: "earning_and_deduction_entries_does_not_exists", + doc: frm.doc, + callback: function(data) { + let earning_and_deduction_entries_does_not_exists = data.message; + frm.unhide_earnings_and_taxation_section = earning_and_deduction_entries_does_not_exists; + frm.trigger("set_earnings_and_taxation_section_visibility"); + } + }); + }, + + set_earnings_and_taxation_section_visibility: function(frm) { + if(frm.unhide_earnings_and_taxation_section){ + frm.set_df_property('earnings_and_taxation_section', 'hidden', 0); + } + else{ + frm.set_df_property('earnings_and_taxation_section', 'hidden', 1); + } + }, + + from_date: function(frm) { + if (frm.doc.from_date) { + frm.trigger("valiadte_joining_date_and_salary_slips" ); + } + }, + }); diff --git a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json index c8b98e5aafc..4db023c6d51 100644 --- a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json +++ b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json @@ -22,6 +22,10 @@ "base", "column_break_9", "variable", + "earnings_and_taxation_section", + "taxable_earnings_till_date", + "column_break_18", + "tax_deducted_till_date", "amended_from" ], "fields": [ @@ -141,11 +145,31 @@ "fieldtype": "Link", "label": "Payroll Payable Account", "options": "Account" + }, + { + "fieldname": "earnings_and_taxation_section", + "fieldtype": "Section Break" + }, + { + "allow_on_submit": 1, + "fieldname": "tax_deducted_till_date", + "fieldtype": "Currency", + "label": "Tax Deducted Till Date" + }, + { + "fieldname": "column_break_18", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "taxable_earnings_till_date", + "fieldtype": "Currency", + "label": "Taxable Earnings Till Date" } ], "is_submittable": 1, "links": [], - "modified": "2021-03-31 22:44:46.267974", + "modified": "2022-12-26 12:47:42.521891", "modified_by": "Administrator", "module": "Payroll", "name": "Salary Structure Assignment", diff --git a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py index e34e48e6c05..21196c3e52d 100644 --- a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py +++ b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py @@ -13,10 +13,32 @@ class DuplicateAssignment(frappe.ValidationError): class SalaryStructureAssignment(Document): + def onload(self): + if self.employee: + self.set_onload( + "earning_and_deduction_entries_exists", self.earning_and_deduction_entries_does_not_exists() + ) + def validate(self): self.validate_dates() self.validate_income_tax_slab() self.set_payroll_payable_account() + self.valiadte_missing_taxable_earnings_and_deductions_till_date() + + def valiadte_missing_taxable_earnings_and_deductions_till_date(self): + if self.earning_and_deduction_entries_does_not_exists(): + if not self.taxable_earnings_till_date and not self.tax_deducted_till_date: + frappe.msgprint( + _( + """Not found any salary slip record(s) for the employee {0}.

Please specify {1} and {2} (if any), for the correct tax calculation in future salary slips.""" + ).format( + self.employee, + "" + _("Taxable Earnings Till Date") + "", + "" + _("Tax Deducted Till Date") + "", + ), + indicator="orange", + title=_("Warning"), + ) def validate_dates(self): joining_date, relieving_date = frappe.db.get_value( @@ -76,6 +98,56 @@ class SalaryStructureAssignment(Document): ) self.payroll_payable_account = payroll_payable_account + @frappe.whitelist() + def earning_and_deduction_entries_does_not_exists(self): + if self.enabled_settings_to_specify_earnings_and_deductions_till_date(): + if not self.joined_in_the_same_month() and not self.have_salary_slips(): + return True + else: + if self.docstatus in [1, 2] and ( + self.taxable_earnings_till_date or self.tax_deducted_till_date + ): + return True + return False + else: + return False + + def enabled_settings_to_specify_earnings_and_deductions_till_date(self): + """returns True if settings are enabled to specify earnings and deductions till date else False""" + + if frappe.db.get_single_value( + "Payroll Settings", "define_opening_balance_for_earning_and_deductions" + ): + return True + return False + + def have_salary_slips(self): + """returns True if salary structure assignment has salary slips else False""" + + salary_slip = frappe.db.get_value( + "Salary Slip", filters={"employee": self.employee, "docstatus": 1} + ) + + if salary_slip: + return True + + return False + + def joined_in_the_same_month(self): + """returns True if employee joined in same month as salary structure assignment from date else False""" + + date_of_joining = frappe.db.get_value("Employee", self.employee, "date_of_joining") + from_date = getdate(self.from_date) + + if not self.from_date or not date_of_joining: + return False + + elif date_of_joining.month == from_date.month: + return True + + else: + return False + def get_assigned_salary_structure(employee, on_date): if not employee or not on_date: diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 303e4fff4af..8b28e02797d 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1090,6 +1090,15 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None): ] items_to_map = list(set(items_to_map)) + def is_drop_ship_order(target): + drop_ship = True + for item in target.items: + if not item.delivered_by_supplier: + drop_ship = False + break + + return drop_ship + def set_missing_values(source, target): target.supplier = "" target.apply_discount_on = "" @@ -1097,8 +1106,14 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None): target.discount_amount = 0.0 target.inter_company_order_reference = "" target.shipping_rule = "" - target.customer = "" - target.customer_name = "" + + if is_drop_ship_order(target): + target.customer = source.customer + target.customer_name = source.customer_name + target.shipping_address = source.shipping_address_name + else: + target.customer = target.customer_name = target.shipping_address = None + target.run_method("set_missing_values") target.run_method("calculate_taxes_and_totals") diff --git a/erpnext/setup/doctype/customer_group/customer_group.json b/erpnext/setup/doctype/customer_group/customer_group.json index 0e2ed9efcf8..d6a431ea616 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.json +++ b/erpnext/setup/doctype/customer_group/customer_group.json @@ -139,10 +139,11 @@ "idx": 1, "is_tree": 1, "links": [], - "modified": "2021-02-08 17:01:52.162202", + "modified": "2022-12-24 11:15:17.142746", "modified_by": "Administrator", "module": "Setup", "name": "Customer Group", + "naming_rule": "By fieldname", "nsm_parent_field": "parent_customer_group", "owner": "Administrator", "permissions": [ @@ -198,10 +199,19 @@ "role": "Customer", "select": 1, "share": 1 + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1 } ], "search_fields": "parent_customer_group", "show_name_in_global_search": 1, "sort_field": "modified", - "sort_order": "DESC" + "sort_order": "DESC", + "states": [] } \ No newline at end of file diff --git a/erpnext/setup/doctype/supplier_group/supplier_group.json b/erpnext/setup/doctype/supplier_group/supplier_group.json index 9119bb947cb..b3ed608cd03 100644 --- a/erpnext/setup/doctype/supplier_group/supplier_group.json +++ b/erpnext/setup/doctype/supplier_group/supplier_group.json @@ -6,6 +6,7 @@ "creation": "2013-01-10 16:34:24", "doctype": "DocType", "document_type": "Setup", + "engine": "InnoDB", "field_order": [ "supplier_group_name", "parent_supplier_group", @@ -106,10 +107,11 @@ "idx": 1, "is_tree": 1, "links": [], - "modified": "2020-03-18 18:10:49.228407", + "modified": "2022-12-24 11:16:12.486719", "modified_by": "Administrator", "module": "Setup", "name": "Supplier Group", + "naming_rule": "By fieldname", "nsm_parent_field": "parent_supplier_group", "owner": "Administrator", "permissions": [ @@ -156,8 +158,18 @@ "permlevel": 1, "read": 1, "role": "Purchase User" + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1 } ], "show_name_in_global_search": 1, - "sort_order": "ASC" + "sort_field": "modified", + "sort_order": "ASC", + "states": [] } \ No newline at end of file diff --git a/erpnext/setup/doctype/territory/territory.json b/erpnext/setup/doctype/territory/territory.json index a25bda054b9..c3a49933746 100644 --- a/erpnext/setup/doctype/territory/territory.json +++ b/erpnext/setup/doctype/territory/territory.json @@ -123,11 +123,12 @@ "idx": 1, "is_tree": 1, "links": [], - "modified": "2021-02-08 17:10:03.767426", + "modified": "2022-12-24 11:16:39.964956", "modified_by": "Administrator", "module": "Setup", "name": "Territory", "name_case": "Title Case", + "naming_rule": "By fieldname", "nsm_parent_field": "parent_territory", "owner": "Administrator", "permissions": [ @@ -175,10 +176,19 @@ "role": "Customer", "select": 1, "share": 1 + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1 } ], "search_fields": "parent_territory,territory_manager", "show_name_in_global_search": 1, "sort_field": "modified", - "sort_order": "DESC" + "sort_order": "DESC", + "states": [] } \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index d53f4cdbac9..b27abae513e 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -10,7 +10,6 @@ import frappe from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.query_builder.functions import Sum -from six import iteritems, itervalues, string_types from frappe.utils import ( add_days, cint, @@ -23,6 +22,7 @@ from frappe.utils import ( nowdate, today, ) +from six import iteritems, itervalues, string_types import erpnext from erpnext.accounts.general_ledger import process_gl_map @@ -2625,4 +2625,3 @@ def get_incorrect_stock_entries() -> Dict: stock_entries.setdefault(row.name, row) return stock_entries - From 37ae2dfe7f1557db37858dbd4bf0295c8ba99702 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 29 Dec 2022 10:31:06 +0530 Subject: [PATCH 32/35] fix: reconciled credit notes being fetched again in Payment Reconciliation tool (#33471) fix: reconciled cr note showing up as Payments (cherry picked from commit 5ec11bad4fecc0bd3a16b53952608ce34e76ed00) --- .../payment_reconciliation/payment_reconciliation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 56c9ff07e26..f42583cb34c 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -172,22 +172,22 @@ class PaymentReconciliation(Document): query = ( qb.from_(gl) .select( - gl.voucher_type.as_("reference_type"), - gl.voucher_no.as_("reference_name"), + gl.against_voucher_type.as_("reference_type"), + gl.against_voucher.as_("reference_name"), (Sum(dr_or_cr) - Sum(reconciled_dr_or_cr)).as_("amount"), gl.posting_date, gl.account_currency.as_("currency"), ) .where( - (gl.voucher_type == voucher_type) - & (gl.voucher_no.isin(sub_query)) + (gl.against_voucher.isin(sub_query)) + & (gl.against_voucher_type == voucher_type) & (gl.is_cancelled == 0) & (gl.account == self.receivable_payable_account) & (gl.party_type == self.party_type) & (gl.party == self.party) ) .where(Criterion.all(conditions)) - .groupby(gl.voucher_no) + .groupby(gl.against_voucher) .having(qb.Field("amount") > 0) ) dr_cr_notes = query.run(as_dict=True) From 8d99763bea5b9297b833f5edee8fceac7397730b Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 29 Dec 2022 05:30:04 +0000 Subject: [PATCH 33/35] chore(release): Bumped to Version 13.42.6 ## [13.42.6](https://github.com/frappe/erpnext/compare/v13.42.5...v13.42.6) (2022-12-29) ### Bug Fixes * reconciled credit notes being fetched again in Payment Reconciliation tool ([#33471](https://github.com/frappe/erpnext/issues/33471)) ([b4589d8](https://github.com/frappe/erpnext/commit/b4589d8b8f0727019289d68a5d71882d4538630f)) * reconciled credit notes being fetched again in Payment Reconciliation tool ([#33471](https://github.com/frappe/erpnext/issues/33471)) ([37ae2df](https://github.com/frappe/erpnext/commit/37ae2dfe7f1557db37858dbd4bf0295c8ba99702)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index bdc69919324..76683161356 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.42.5" +__version__ = "13.42.6" def get_default_company(user=None): From e01ff0df404160d96627d2bea0b6275c88facf87 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 29 Dec 2022 14:45:10 +0530 Subject: [PATCH 34/35] fix: debit note not pulled on reconciliation tool (cherry picked from commit cf133b2f1ce0a66164144071bd9cb300648ddf8f) --- .../payment_reconciliation/payment_reconciliation.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index f42583cb34c..1e75471c848 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -149,14 +149,16 @@ class PaymentReconciliation(Document): reconciled_dr_or_cr = ( gl["debit_in_account_currency"] - if dr_or_cr == gl["credit_in_account_currency"] + if dr_or_cr.name == "credit_in_account_currency" else gl["credit_in_account_currency"] ) + having_clause = qb.Field("amount") > 0 + if self.minimum_payment_amount: - conditions.append(dr_or_cr.gte(self.minimum_payment_amount)) + having_clause = qb.Field("amount") >= self.minimum_payment_amount if self.maximum_payment_amount: - conditions.append(dr_or_cr.lte(self.maximum_payment_amount)) + having_clause = having_clause & qb.Field("amount") <= self.maximum_payment_amount sub_query = ( qb.from_(doc) @@ -188,7 +190,7 @@ class PaymentReconciliation(Document): ) .where(Criterion.all(conditions)) .groupby(gl.against_voucher) - .having(qb.Field("amount") > 0) + .having(having_clause) ) dr_cr_notes = query.run(as_dict=True) return dr_cr_notes From d97e6738748a8fbfbfa9f0dd10e213730eeed220 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 30 Dec 2022 15:21:51 +0000 Subject: [PATCH 35/35] chore(release): Bumped to Version 13.42.7 ## [13.42.7](https://github.com/frappe/erpnext/compare/v13.42.6...v13.42.7) (2022-12-30) ### Bug Fixes * debit note not pulled on reconciliation tool ([e01ff0d](https://github.com/frappe/erpnext/commit/e01ff0df404160d96627d2bea0b6275c88facf87)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 76683161356..f102a71850f 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.42.6" +__version__ = "13.42.7" def get_default_company(user=None):