From b77b3780d637c65ccd20dfd7e2b2ac28b727ca6d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 26 Apr 2022 07:52:13 +0000 Subject: [PATCH 01/22] chore(release): Bumped to Version 13.27.1 ## [13.27.1](https://github.com/frappe/erpnext/compare/v13.27.0...v13.27.1) (2022-04-26) ### Bug Fixes * Add accounting dimensions for round off GL Entry ([dedb90e](https://github.com/frappe/erpnext/commit/dedb90ea72e5d2eb5f213f3aa7887672d4f68078)) * batch_no filtering not working when batch no is also a number in scientific notation ([#30770](https://github.com/frappe/erpnext/issues/30770)) ([#30771](https://github.com/frappe/erpnext/issues/30771)) ([c339305](https://github.com/frappe/erpnext/commit/c339305e9c4c6752ff6b952e6d1827a46d199211)) * Check if accounting dimension exists ([1834671](https://github.com/frappe/erpnext/commit/1834671d59eccaaa4af910523466fc5066becf1f)) * dependent gle reposting (backport [#30726](https://github.com/frappe/erpnext/issues/30726)) ([#30772](https://github.com/frappe/erpnext/issues/30772)) ([a6d0938](https://github.com/frappe/erpnext/commit/a6d093859171d1f987f06467c58de973312ead12)) * Do not validate while creating accounting dimension ([153b41a](https://github.com/frappe/erpnext/commit/153b41a26902082a2cada995d9a9e5afac30d2aa)) * e_commerce_settings.js ([3a5f5d5](https://github.com/frappe/erpnext/commit/3a5f5d5cd069d908fb584b8c2e3dfea362f048c3)) * e_commerce_settings.py ([86c5f4d](https://github.com/frappe/erpnext/commit/86c5f4db85ae2c8273574e67b97b6ccd7b564351)) * First preference to parent cost center rather than round off cost center ([a2d95fc](https://github.com/frappe/erpnext/commit/a2d95fc62b97914d39e70a6819bd30e45d22d875)) * Handle Multiselect field mapping separately ([dc2f694](https://github.com/frappe/erpnext/commit/dc2f6945475e53bb4dfb20edd1d4cf6c2c940671)) * **india:** 401 & 403 client error while generating IRN ([198bdcf](https://github.com/frappe/erpnext/commit/198bdcfdc609e9a6280408f86471cedbc454da90)) * **india:** cess value not considered while validating e-invoice totals ([#30800](https://github.com/frappe/erpnext/issues/30800)) ([f70fca1](https://github.com/frappe/erpnext/commit/f70fca1c9eee27a82af76cf1661145e77604ab43)) * **india:** transporter name is null while generating e-way bill ([#30736](https://github.com/frappe/erpnext/issues/30736)) ([6291b28](https://github.com/frappe/erpnext/commit/6291b28c37f02380001ab68b3a660b2804383ab2)) * linter ([6dddbb9](https://github.com/frappe/erpnext/commit/6dddbb9f27354e57d5acc8cf692e6c2493c8ad7c)) * Loan doctypes in bank reconciliation ([e69c715](https://github.com/frappe/erpnext/commit/e69c71576ddcf9d363ba37bafb0c598ba05a281f)) * Mistyped variable name in patch ([e76220e](https://github.com/frappe/erpnext/commit/e76220e819bceed03f8fc0a5618f583a8c172faf)) * monthly attendance sheet ([#30748](https://github.com/frappe/erpnext/issues/30748)) ([0b4e3f1](https://github.com/frappe/erpnext/commit/0b4e3f1467662b4ad86ac9f101cd95620aaa1c26)) * Must not be able to start Job Card if it is related to Work Order that is not started yet ([#29072](https://github.com/frappe/erpnext/issues/29072)) ([#30755](https://github.com/frappe/erpnext/issues/30755)) ([b656ffa](https://github.com/frappe/erpnext/commit/b656ffa45e2494b0a4e64ad8284a7da85c386899)) * Query filter fields from Website Item instead of Item master ([bed9e09](https://github.com/frappe/erpnext/commit/bed9e09153e7869021e2dcb0949b6e48b65928f9)) * select doctype as payment_document ([44f0b69](https://github.com/frappe/erpnext/commit/44f0b691521c6e7cfe84beb0d52d4fb03268e9a7)) * **Selling,E-Commerce:** Shopping cart quotation without website item. ([#29085](https://github.com/frappe/erpnext/issues/29085)) ([ea0fe5e](https://github.com/frappe/erpnext/commit/ea0fe5e10c5136f9419629cb7b82b265ac177517)) * SO analysis rpt will fetch SO's without Delivery note as well ([f9d89c7](https://github.com/frappe/erpnext/commit/f9d89c7ce6a877602d9a94b1b4496dd1a594db21)) * translation ([#30781](https://github.com/frappe/erpnext/issues/30781)) ([#30783](https://github.com/frappe/erpnext/issues/30783)) ([8335ca6](https://github.com/frappe/erpnext/commit/8335ca63313df7c3d5e02735b2277eb159f55d48)) * Update token to allow updates on protected branch ([baab379](https://github.com/frappe/erpnext/commit/baab3797ca1b151862d4deb388a85a33f3bbcbd3)) * update translation ([#30725](https://github.com/frappe/erpnext/issues/30725)) ([#30776](https://github.com/frappe/erpnext/issues/30776)) ([b585262](https://github.com/frappe/erpnext/commit/b585262842294d89d8b7e96c3cd3d15429b27009)) * Use parent cost center for Sales and Purchase Invoice ([fe9f329](https://github.com/frappe/erpnext/commit/fe9f32946ce9648caef926e3d0227b2d8f8652a4)) * Use right precision for asset value after full schedule ([#30745](https://github.com/frappe/erpnext/issues/30745)) ([269e192](https://github.com/frappe/erpnext/commit/269e1923c9edf144224c3b81584ec626df359d8c)) * Validate field filter wrt to Website Item & re-use validation in Item Group ([34437a8](https://github.com/frappe/erpnext/commit/34437a83df710e77090a21115fcea9c88fea5bc8)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 42fdb0df5df..6f6ad9a961c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.27.0" +__version__ = "13.27.1" def get_default_company(user=None): """Get default company for user""" From 53024be34778f3940adb522e40b19ad83b7f26b3 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 3 May 2022 08:51:32 +0000 Subject: [PATCH 02/22] chore(release): Bumped to Version 13.28.0 # [13.28.0](https://github.com/frappe/erpnext/compare/v13.27.1...v13.28.0) (2022-05-03) ### Bug Fixes * Consistent accounting dimensions across Sales and Purchase docs ([5df5058](https://github.com/frappe/erpnext/commit/5df50588cf6cff6716b920b5d24464358368bd51)) * convert default_item_manufacturer to link field ([#30835](https://github.com/frappe/erpnext/issues/30835)) ([#30866](https://github.com/frappe/erpnext/issues/30866)) ([37fad7e](https://github.com/frappe/erpnext/commit/37fad7e04ce7f436a12836da2ef12f96200feb89)) * Cost center filter on payment reconciliation ([22e7f03](https://github.com/frappe/erpnext/commit/22e7f03a0325fe449b39ee45cb092f8482af610f)) * filters not working in Shift Assignment Calendar view ([#30822](https://github.com/frappe/erpnext/issues/30822)) ([3cdbb65](https://github.com/frappe/erpnext/commit/3cdbb65b5a886550411659e3cac05287cb090293)) * Ignore custom field validation while setup ([ee54bf7](https://github.com/frappe/erpnext/commit/ee54bf7fe25ccb3543d70c7ecb55783a71bb689c)) * **india:** e-invoice generation for registered composition gst category type ([#30814](https://github.com/frappe/erpnext/issues/30814)) ([#30877](https://github.com/frappe/erpnext/issues/30877)) ([246869d](https://github.com/frappe/erpnext/commit/246869dd28bc2fdea91dd18c756faeee7833b4ae)) * Multi currency opening invoices ([2e62d51](https://github.com/frappe/erpnext/commit/2e62d518e8f9cd253b1002da871922a73f896e6f)) * payment days calculation for employees joining/leaving mid-month ([#30863](https://github.com/frappe/erpnext/issues/30863)) ([#30883](https://github.com/frappe/erpnext/issues/30883)) ([a1b0813](https://github.com/frappe/erpnext/commit/a1b0813966109eda2c4f426b57954bc407c4e35f)) * Period Closing Voucher is considering GL entries with is_cancelled=1 ([#30865](https://github.com/frappe/erpnext/issues/30865)) ([5a5b49b](https://github.com/frappe/erpnext/commit/5a5b49b61a2b79ddf34fc7b14c6aeec1a1513349)) * **pos:** number pad translations ([b01f855](https://github.com/frappe/erpnext/commit/b01f8555e5d2e0b53d858d61c5a4829b2667084f)) * **pos:** search field doesn't reset on checkout ([edbf551](https://github.com/frappe/erpnext/commit/edbf5513da121e483b5035719a1956af60271bd6)) * Supply type for overseas invoices with payment of tax ([fdcc591](https://github.com/frappe/erpnext/commit/fdcc591a5e6f6cb2d501c0e1d12361632b187022)) * supply type for sez invoices with payment of tax ([cf08710](https://github.com/frappe/erpnext/commit/cf087103cb824f7a5049ed8612a538a1429024f5)) * Use `account_type == 'Stock'` to filter stock accounts ([93482f3](https://github.com/frappe/erpnext/commit/93482f3302a53c83508dafe3a812819e40079443)) * **UX:** misleading stock entry lables ([#30870](https://github.com/frappe/erpnext/issues/30870)) ([#30871](https://github.com/frappe/erpnext/issues/30871)) ([57b03f0](https://github.com/frappe/erpnext/commit/57b03f0bf259cd84e7cebfac43022fff58698b41)) * **UX:** record reason for skipping attendance or marking absent for auto attendance ([#30846](https://github.com/frappe/erpnext/issues/30846)) ([f7bf4a3](https://github.com/frappe/erpnext/commit/f7bf4a3e621597d254adf477d28e8297700f679a)) * Vat Audit report fixes ([d5319a4](https://github.com/frappe/erpnext/commit/d5319a48269a4277818486e7ed74468e9107b8f4)) ### Features * Copy task color from project template (backport [#30857](https://github.com/frappe/erpnext/issues/30857)) ([#30859](https://github.com/frappe/erpnext/issues/30859)) ([7ee18e8](https://github.com/frappe/erpnext/commit/7ee18e86a2eeb752ab527cb9efe457466a1cc58d)) * support product bundles in picklist (backport [#30762](https://github.com/frappe/erpnext/issues/30762)) ([#30826](https://github.com/frappe/erpnext/issues/30826)) ([645ee2d](https://github.com/frappe/erpnext/commit/645ee2d8221f728d41fe52ffddf9b96307fbc8f4)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 2b11e5c08fb..7ac25c6c8f4 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.27.1" +__version__ = "13.28.0" def get_default_company(user=None): From 974f2a85eaa1e36637043dbea404ac560e2fdce4 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 10 May 2022 10:27:19 +0000 Subject: [PATCH 03/22] chore(release): Bumped to Version 13.29.0 # [13.29.0](https://github.com/frappe/erpnext/compare/v13.28.0...v13.29.0) (2022-05-10) ### Bug Fixes * Consider paryt and party type as well in group by consolidated view ([189fc89](https://github.com/frappe/erpnext/commit/189fc89e2d5cc0f9108ea35b44eb8535bbf40475)) * disable form save on naming series tool ([#30909](https://github.com/frappe/erpnext/issues/30909)) ([#30910](https://github.com/frappe/erpnext/issues/30910)) ([d60a6cb](https://github.com/frappe/erpnext/commit/d60a6cb2f83c7972875a2dd201a1ab2d9b5a5bbc)) * double future qty updates ([0db3013](https://github.com/frappe/erpnext/commit/0db3013c9b078120f21e3a8c568b5395fc4ea4fd)) * HSN-wise-summary of outward supplies Updated Report ([3637525](https://github.com/frappe/erpnext/commit/363752510ead7d3b86693d3659b2157753f2762d)) * Ignore loan repayments made from salary slip ([b7e1d40](https://github.com/frappe/erpnext/commit/b7e1d40e43c136f0e967111e10af95ddc80e2fd5)) * **india:** invoice type for a debit note e-invoice ([#30948](https://github.com/frappe/erpnext/issues/30948)) ([c46add3](https://github.com/frappe/erpnext/commit/c46add3760f23b3563a5fcba79287d0f6ec77e23)) * **india:** keyerror while generating e-way bill from an e-invoice ([#30879](https://github.com/frappe/erpnext/issues/30879)) ([98d799e](https://github.com/frappe/erpnext/commit/98d799e7cc2c3571683164e56d587ba595c8966c)) * **india:** re-arrange e-way bill dialog fields ([#30941](https://github.com/frappe/erpnext/issues/30941)) ([7ce5c93](https://github.com/frappe/erpnext/commit/7ce5c93f44bae640f92d97955963e3ba01a579ef)) * Item Alternative Test ([964de1f](https://github.com/frappe/erpnext/commit/964de1fc69b32d377f8c2a6f15d6ab7381669606)) * patch for renaming membership settings ([#30929](https://github.com/frappe/erpnext/issues/30929)) ([9189653](https://github.com/frappe/erpnext/commit/9189653f2ea94bd21e5227608645aba34c78e34d)) * **pos:** creating pos returns resets pricing rules & discounts ([#30936](https://github.com/frappe/erpnext/issues/30936)) ([a0e39db](https://github.com/frappe/erpnext/commit/a0e39db200fd89112953d4d8a3bd9d0dd2b36374)) * remove check for already allocated earned leaves ([#30931](https://github.com/frappe/erpnext/issues/30931)) ([#30932](https://github.com/frappe/erpnext/issues/30932)) ([80f7d66](https://github.com/frappe/erpnext/commit/80f7d66255aa5b3e07fd8e667b17d4cabd3703d5)) * Remove commit from stock entry test. The assertion is not important ([c449b35](https://github.com/frappe/erpnext/commit/c449b35cc11615fc7d9e616c2038b9e90c3957d6)) * Set available-for-use date if missing ([#30838](https://github.com/frappe/erpnext/issues/30838)) ([bf2eaec](https://github.com/frappe/erpnext/commit/bf2eaecb1d8cec3676162868422ac96a7cc958cc)) * show group warehouse in Sales Order ([#30891](https://github.com/frappe/erpnext/issues/30891)) ([#30893](https://github.com/frappe/erpnext/issues/30893)) ([c458e14](https://github.com/frappe/erpnext/commit/c458e14e680abedf1b4b9ee4f68a28af802c60e2)) * Show linked time sheets in sales invoice dashboard ([4f4af52](https://github.com/frappe/erpnext/commit/4f4af523e0d5c9e947d94ce13dc416d16941cfe6)) * sort before picking next stock reco ([e27fb58](https://github.com/frappe/erpnext/commit/e27fb58130f3300054c3d77c2c943d3c1304d19d)) * subtract change_amount from paid_amount field on POS Register ([#30937](https://github.com/frappe/erpnext/issues/30937)) ([b7e873b](https://github.com/frappe/erpnext/commit/b7e873b55d201e3cb1894a1159de1912a7106012)) * Unlink and delete batch created from stock reco on cancel ([fc35323](https://github.com/frappe/erpnext/commit/fc353231065f1c33890d5b7e55c2e4e2506d986d)) * Wrap SLE actual_qty in `flt` to avoid NoneType operation ([d53228b](https://github.com/frappe/erpnext/commit/d53228b153437f9dedcb1229bf579411f3122729)) ### Features * **HR:** Leave Type configuration to allow over allocation (backport [#30940](https://github.com/frappe/erpnext/issues/30940)) ([#30944](https://github.com/frappe/erpnext/issues/30944)) ([64440fc](https://github.com/frappe/erpnext/commit/64440fc4fbc55068906af7466aa5b4d5333b9d12)) * **india:** cancel e-way bill is enabled with e-invoicing APIs. ([#30924](https://github.com/frappe/erpnext/issues/30924)) ([4ef2ffd](https://github.com/frappe/erpnext/commit/4ef2ffd14c7546d6c5670b950df5eda4b458b200)) * **india:** generate qrcode button for e-invoice ([#30946](https://github.com/frappe/erpnext/issues/30946)) ([7bd5b2b](https://github.com/frappe/erpnext/commit/7bd5b2ba29783bc00b922905ada6a9eb06fde36e)) * **india:** store e-way bill auto calculated distance in sales invoice ([#30923](https://github.com/frappe/erpnext/issues/30923)) ([b96f156](https://github.com/frappe/erpnext/commit/b96f1565c53a47ef5680cb98f5aa3f02a1d0246e)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7ac25c6c8f4..e7d81834554 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.28.0" +__version__ = "13.29.0" def get_default_company(user=None): From b9a557599ef66d263a2b7fd313d874b6820f1a67 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 12 May 2022 13:54:47 +0530 Subject: [PATCH 04/22] fix: Failing accounting dimension patch (cherry picked from commit b14a7b8a5db2512f365efb75b9cc75ee3c3fa213) --- erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py b/erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py index 8a3f1d0a58f..7e6e8200852 100644 --- a/erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py +++ b/erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py @@ -33,7 +33,7 @@ def execute(): "insert_after": insert_after_field, } - create_custom_field(doctype, df, ignore_validate=False) + create_custom_field(doctype, df, ignore_validate=True) frappe.clear_cache(doctype=doctype) count += 1 From a89612e4487dc7c97965c36a980933db46f57246 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 12 May 2022 10:01:53 +0000 Subject: [PATCH 05/22] chore(release): Bumped to Version 13.29.1 ## [13.29.1](https://github.com/frappe/erpnext/compare/v13.29.0...v13.29.1) (2022-05-12) ### Bug Fixes * Failing accounting dimension patch ([b9a5575](https://github.com/frappe/erpnext/commit/b9a557599ef66d263a2b7fd313d874b6820f1a67)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index e7d81834554..472499fdfd3 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.29.0" +__version__ = "13.29.1" def get_default_company(user=None): From 752bda5d843bdeebe5a7b224d35656bde65ab64a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 13 May 2022 13:07:51 +0530 Subject: [PATCH 06/22] fix(patch): avoid checking for return field if it doesnt exits (backport #30995) (#30997) (cherry picked from commit b08180092e71cd39d2a7ce2696d1a0a82f1d7c43) Co-authored-by: Ankush Menat --- erpnext/stock/doctype/bin/bin.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index 573203a47a8..75951eb60e5 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -70,11 +70,15 @@ class Bin(Document): (self.item_code, self.warehouse), )[0][0] + if frappe.db.field_exists("Stock Entry", "is_return"): + qty_field = "CASE WHEN se.is_return = 1 THEN (transfer_qty * -1) ELSE transfer_qty END" + else: + qty_field = "transfer_qty" + # Get Transferred Entries - materials_transferred = frappe.db.sql( - """ - select - ifnull(sum(CASE WHEN se.is_return = 1 THEN (transfer_qty * -1) ELSE transfer_qty END),0) + materials_transferred = ( + frappe.db.sql( + f"""select sum({qty_field}) from `tabStock Entry` se, `tabStock Entry Detail` sed, `tabPurchase Order` po where @@ -89,8 +93,10 @@ class Bin(Document): and po.status != 'Closed' and po.per_received < 100 """, - {"item": self.item_code}, - )[0][0] + {"item": self.item_code}, + )[0][0] + or 0.0 + ) if reserved_qty_for_sub_contract > materials_transferred: reserved_qty_for_sub_contract = reserved_qty_for_sub_contract - materials_transferred From 9ea017248d5faf53003ff76aa1f421017d105f88 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 13 May 2022 07:41:38 +0000 Subject: [PATCH 07/22] chore(release): Bumped to Version 13.29.2 ## [13.29.2](https://github.com/frappe/erpnext/compare/v13.29.1...v13.29.2) (2022-05-13) ### Bug Fixes * **patch:** avoid checking for return field if it doesnt exits (backport [#30995](https://github.com/frappe/erpnext/issues/30995)) ([#30997](https://github.com/frappe/erpnext/issues/30997)) ([752bda5](https://github.com/frappe/erpnext/commit/752bda5d843bdeebe5a7b224d35656bde65ab64a)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 472499fdfd3..d2506e1a48d 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.29.1" +__version__ = "13.29.2" def get_default_company(user=None): From d9f76478da41c797567076422734161e8cab8f12 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 17 May 2022 07:41:35 +0000 Subject: [PATCH 08/22] chore(release): Bumped to Version 13.30.0 # [13.30.0](https://github.com/frappe/erpnext/compare/v13.29.2...v13.30.0) (2022-05-17) ### Bug Fixes * `set_missing_values` in SE and re-use the same on all SE mappings ([fe52c1f](https://github.com/frappe/erpnext/commit/fe52c1f3543f95084fc49803e3c17cd0526e2c21)) * Add validation for SEZ and Export invoices without payment of taxes ([cb8453d](https://github.com/frappe/erpnext/commit/cb8453dac8c38aed201f84c51f27ae217cc1f465)) * allow to use formatting for the field to_discuss in opportunity ([e126d4e](https://github.com/frappe/erpnext/commit/e126d4e5924a91f6f212cc0ac0145265bef0415e)) * Block 0 Qty via Update Items to be consistent with form validation ([5647875](https://github.com/frappe/erpnext/commit/56478752e4eb0572ef50a5b713d6b905ba9951b3)) * Calculate totals even though pricing rule is not applied on mapped doc ([678a01d](https://github.com/frappe/erpnext/commit/678a01d4bda8bdcb3a29fcfc56b461286d647a26)) * **charts:** Pass fieldtype for chart data in selling reports ([917e7c3](https://github.com/frappe/erpnext/commit/917e7c34aff47a59d53a759d08c7c2c2d57e1efb)) * conflicts ([87fd933](https://github.com/frappe/erpnext/commit/87fd93370abf55f822e41cce72a8060ee4632247)) * conflicts ([fb62bbf](https://github.com/frappe/erpnext/commit/fb62bbf61af1e3cb0652382051bfcd24e6ad79b7)) * disable pricing rules for internal transfers (backport [#31034](https://github.com/frappe/erpnext/issues/31034)) ([#31036](https://github.com/frappe/erpnext/issues/31036)) ([d5eb9fb](https://github.com/frappe/erpnext/commit/d5eb9fb3fd825f1b3bd44cc6177409292d73f588)) * discount ledger entry in case of multicurrency invoice ([#31047](https://github.com/frappe/erpnext/issues/31047)) ([c3417e4](https://github.com/frappe/erpnext/commit/c3417e4103f4ad6fba632b369c6170ab4263c71e)) * dont fail repost for recoverable errors (backport [#30979](https://github.com/frappe/erpnext/issues/30979)) ([#31023](https://github.com/frappe/erpnext/issues/31023)) ([a019cb6](https://github.com/frappe/erpnext/commit/a019cb6caa19bb67b93089e9ac3fb25f794b186d)) * **Employee Advance:** Return/Deduction from Salary button visibility (backport [#31011](https://github.com/frappe/erpnext/issues/31011)) ([#31012](https://github.com/frappe/erpnext/issues/31012)) ([5b1d85e](https://github.com/frappe/erpnext/commit/5b1d85e8bffd82a5463ee66853c71084d8540d24)) * Failing accounting dimension patch ([b14a7b8](https://github.com/frappe/erpnext/commit/b14a7b8a5db2512f365efb75b9cc75ee3c3fa213)) * german translations for Employee ([b9bda04](https://github.com/frappe/erpnext/commit/b9bda04a83543103350ff5a912a8d667a8c0c334)) * gl entry validation for miniscule loan penalty ([e958ef2](https://github.com/frappe/erpnext/commit/e958ef26e06233ce60ec5f86bc2d00358a79e1ed)) * hide template items from sales/purchase order ([8b99f43](https://github.com/frappe/erpnext/commit/8b99f43c6158d4edbbdb7d69f2a5ac965b00403c)) * IN time not captured in Attendance through Employee Checkin (backport [#31029](https://github.com/frappe/erpnext/issues/31029)) ([#31031](https://github.com/frappe/erpnext/issues/31031)) ([477bbcc](https://github.com/frappe/erpnext/commit/477bbcc9e51fa2ab2de5369c8c21a84b406ece77)) * Item rate reset on changing posting date ([#30990](https://github.com/frappe/erpnext/issues/30990)) ([8ef649f](https://github.com/frappe/erpnext/commit/8ef649f65defeff79e5c9348daedd4d1de463fdd)) * Just add one rate in GST HSN Code ([ed76687](https://github.com/frappe/erpnext/commit/ed76687dac52b81df2b9a415b8ce88c648da1446)) * Merge Conflicts ([3abf264](https://github.com/frappe/erpnext/commit/3abf26428c7a5a5e2a5f2be5a6f0133ccb514e2f)) * Multiple fixes in GSTR-1 report ([f2cbb70](https://github.com/frappe/erpnext/commit/f2cbb703252564149620a26d6f52800b18c53632)) * **patch:** avoid checking for return field if it doesnt exits (backport [#30995](https://github.com/frappe/erpnext/issues/30995)) ([#30997](https://github.com/frappe/erpnext/issues/30997)) ([a94b5c0](https://github.com/frappe/erpnext/commit/a94b5c0d8b5b9332a1d6952cb4fdb9d31ac4b050)) * per_billed for return DN (backport [#30868](https://github.com/frappe/erpnext/issues/30868)) ([#30971](https://github.com/frappe/erpnext/issues/30971)) ([97ea1f5](https://github.com/frappe/erpnext/commit/97ea1f5123b55f30d07418485302f68bae1d81ef)) * precision loss when transferring (backport [#30834](https://github.com/frappe/erpnext/issues/30834)) ([#31032](https://github.com/frappe/erpnext/issues/31032)) ([fc80a50](https://github.com/frappe/erpnext/commit/fc80a50640d9f31bd3524ed1c21b355925218445)) * precision of total penalty paid ([ad21853](https://github.com/frappe/erpnext/commit/ad21853b0125627d5964dab670eed3c7d2d28165)) * precision of total penalty paid ([5c45737](https://github.com/frappe/erpnext/commit/5c45737a8fa506949a4a1b2cbf826e5a9402c24b)) * prevent bypassing forced valuation rate (backport [#30987](https://github.com/frappe/erpnext/issues/30987)) ([#31020](https://github.com/frappe/erpnext/issues/31020)) ([706c19d](https://github.com/frappe/erpnext/commit/706c19db70aefd73ce192f34542a8fdcd11393c5)) * pro rata calculation for monthly depreciation ([#30989](https://github.com/frappe/erpnext/issues/30989)) ([408d952](https://github.com/frappe/erpnext/commit/408d9523327f24495ec6d2ac80930372b3d32493)) * remove item attribute limit from variant selector (backport [#31026](https://github.com/frappe/erpnext/issues/31026)) ([#31028](https://github.com/frappe/erpnext/issues/31028)) ([1f016e9](https://github.com/frappe/erpnext/commit/1f016e913768e60f5a44c6ffd3f49be1b1758b0e)) * Set actual qty and basic rate in SE on warehouse triggers (`get_warehouse_details`) ([30b0aee](https://github.com/frappe/erpnext/commit/30b0aee0130f5bb6f8c2a593ab10894e2ed9a068)) * stock analytics report shows incorrect data there's no stock movement in a period (backport [#30945](https://github.com/frappe/erpnext/issues/30945)) ([#30980](https://github.com/frappe/erpnext/issues/30980)) ([295ffb3](https://github.com/frappe/erpnext/commit/295ffb3f1a9514af580d362499b8b26e00983818)) * translation for status filter ([e5f8231](https://github.com/frappe/erpnext/commit/e5f8231632e19dc06a415c751fa7a7ca11951906)) * **translations:** Update ru translations ([#30992](https://github.com/frappe/erpnext/issues/30992)) ([f797005](https://github.com/frappe/erpnext/commit/f797005384f8989339f443d31c07d3b876ba0d1d)) * TypeError in add_indicator_for_multicompany (backport [#31042](https://github.com/frappe/erpnext/issues/31042)) ([#31048](https://github.com/frappe/erpnext/issues/31048)) ([e24bb1d](https://github.com/frappe/erpnext/commit/e24bb1dbf125a3208c59c6cb4f5589f1afe95deb)) * unlink Attendance from Employee Checkins on cancellation (backport [#31045](https://github.com/frappe/erpnext/issues/31045)) ([#31049](https://github.com/frappe/erpnext/issues/31049)) ([e03fe97](https://github.com/frappe/erpnext/commit/e03fe97a6e9d0f22a812a5f3705469300830fbe6)) * UOM in HSN-wise summary of outward supply ([cd7d5cd](https://github.com/frappe/erpnext/commit/cd7d5cdb2201b904bcf5ccfdcb1c4f29cd7e1369)) * user can select disabled accounts in taxes table ([047c879](https://github.com/frappe/erpnext/commit/047c879bec978e3a9d06b331381bc6754d34829a)) * validate disabled accounts before posting ledger entries ([515e49b](https://github.com/frappe/erpnext/commit/515e49bb903128bd9dbd9b32a56929c8b31d39fb)) * validate on hold purchase invoices in payment entry ([9fbd170](https://github.com/frappe/erpnext/commit/9fbd170fa41bd7b6b0ce7e1c031b37c657169d65)) ### Features * add Employee Status filter in leave balance reports ([716b525](https://github.com/frappe/erpnext/commit/716b5253a4ec386be5ad83e8d7cd56709b8d5080)) * add Link to Opportunity ([#30614](https://github.com/frappe/erpnext/issues/30614)) ([bc23bc7](https://github.com/frappe/erpnext/commit/bc23bc738eb22c3b8fb58a756140bc829a3167a3)) * request_for_quotation ([db4e264](https://github.com/frappe/erpnext/commit/db4e264d9285cec46ca47d8d6ab4ab49a39bbd01)) * request_for_quotation - refactor ([b6a3e69](https://github.com/frappe/erpnext/commit/b6a3e693aedf87cb9e39a30937980bb99b3ba33d)) * select multiple values for accounting dimension (backport [#31015](https://github.com/frappe/erpnext/issues/31015)) ([#31041](https://github.com/frappe/erpnext/issues/31041)) ([9c21eb5](https://github.com/frappe/erpnext/commit/9c21eb5b947f3e8b78d726dd798e578c6cafe6fd)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d2506e1a48d..811fdb771bb 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.29.2" +__version__ = "13.30.0" def get_default_company(user=None): From 91e935fee7c2fa68aeff63c87e46d3a7367436e7 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 26 May 2022 05:38:49 +0000 Subject: [PATCH 09/22] chore(release): Bumped to Version 13.31.0 # [13.31.0](https://github.com/frappe/erpnext/compare/v13.30.0...v13.31.0) (2022-05-26) ### Bug Fixes * Account currency validation for first transaction ([228f10b](https://github.com/frappe/erpnext/commit/228f10bf30b0c9e304927b5a877cc0730a66ab7c)) * Add party account validation for journal entry ([7f853b1](https://github.com/frappe/erpnext/commit/7f853b1f0febad2a33548558f2f0556801c0196f)) * always update item_name for stock entry (backport [#31068](https://github.com/frappe/erpnext/issues/31068)) ([#31071](https://github.com/frappe/erpnext/issues/31071)) ([f519dc6](https://github.com/frappe/erpnext/commit/f519dc613cd4d05e193cda03fbc84c34a1216327)) * change project's actual_start_date fieldtype from Data to Date (backport [#31085](https://github.com/frappe/erpnext/issues/31085)) ([#31135](https://github.com/frappe/erpnext/issues/31135)) ([8c2f203](https://github.com/frappe/erpnext/commit/8c2f2033615ec14a042ed4e69394b9933cbc450a)) * Chart data for monthly periodicity in Cash Flow report ([#31039](https://github.com/frappe/erpnext/issues/31039)) ([f14e9b7](https://github.com/frappe/erpnext/commit/f14e9b7502aebde4c77305253cb704730a9accd1)) * corrective job card creation (backport [#31083](https://github.com/frappe/erpnext/issues/31083)) ([#31084](https://github.com/frappe/erpnext/issues/31084)) ([c17c260](https://github.com/frappe/erpnext/commit/c17c260a65e56a9391328bfbf16206112b4b15a2)) * don't capture payments with invoice_id as donations ([168a9d4](https://github.com/frappe/erpnext/commit/168a9d417b57e6441da7e9446100e0de62aeaea5)) * employee advance status update on return via additional salary ([d59c3d2](https://github.com/frappe/erpnext/commit/d59c3d21423639c13055309ec30bfc2b04c44545)) * Handle missing HSN Codes ([ce3a21e](https://github.com/frappe/erpnext/commit/ce3a21eb039453d4786dfd0871a278b588039d80)) * Healthcare module accounting test cases ([09a42a1](https://github.com/frappe/erpnext/commit/09a42a122f0a446d73942d9b8a69149721379e42)) * **India:** Async issue in company address trigger ([2ea3318](https://github.com/frappe/erpnext/commit/2ea331852ac61eacc86019b208d0af785499d4c2)) * **india:** error while parsing e-invoice ([#31061](https://github.com/frappe/erpnext/issues/31061)) ([1461d66](https://github.com/frappe/erpnext/commit/1461d66ddaacb084b6e7c40630ac7970efab27aa)) * **india:** eway bill cancel api is disabled ([#31060](https://github.com/frappe/erpnext/issues/31060)) ([95491e1](https://github.com/frappe/erpnext/commit/95491e17180fe0e4c0234e54e56af178dbc4ad29)) * Job Card excess transfer behaviour (backport [#31054](https://github.com/frappe/erpnext/issues/31054)) ([#31096](https://github.com/frappe/erpnext/issues/31096)) ([3984f04](https://github.com/frappe/erpnext/commit/3984f04a49649b168c4a6cef29c444e25d1415a3)) * Leave Encashment calculations (backport [#31062](https://github.com/frappe/erpnext/issues/31062)) ([#31091](https://github.com/frappe/erpnext/issues/31091)) ([ba76b64](https://github.com/frappe/erpnext/commit/ba76b6419e9d5909a599aeb1ea9243fc37f5a769)) * Loan Doc query in Bank Reconciliation Statement ([611d1af](https://github.com/frappe/erpnext/commit/611d1af526839ff4ceb5628be5fff385c37c9294)) * Loan repayment entries for payroll payable account ([ea6d754](https://github.com/frappe/erpnext/commit/ea6d754f734e8db76fa035acf30e97f3b24e7870)) * multiple entries for same payment term ([90b1147](https://github.com/frappe/erpnext/commit/90b1147365ed3f2175eda90994d88932c95d10ba)) * Party account validation in JV ([d10c2e5](https://github.com/frappe/erpnext/commit/d10c2e50bee2256b43039d7d09b53dc01e72160d)) * payments duplicate on pos closing entry (backport [#30976](https://github.com/frappe/erpnext/issues/30976)) ([#31005](https://github.com/frappe/erpnext/issues/31005)) ([0efbabe](https://github.com/frappe/erpnext/commit/0efbabe7cf780358ee946c48e99239aafe647eb5)) * **pos:** paid amount calculation for multicurrency invoice ([#31122](https://github.com/frappe/erpnext/issues/31122)) ([98eb7da](https://github.com/frappe/erpnext/commit/98eb7da06acdd18c2c667363fbf017a013d338c9)) * remove bad default for Membership From Date ([34928d2](https://github.com/frappe/erpnext/commit/34928d29f1ff8c823217b9d5b7b751a7ab6c5b0e)) * Remove validation from Journal Entry ([4ca6cdc](https://github.com/frappe/erpnext/commit/4ca6cdca7621e40093abe43d016124798ede25ea)) * replace document states with list settings ([78e9e66](https://github.com/frappe/erpnext/commit/78e9e66d63955b95e6b2f1c10b92c55973207234)) * timesheet fetching in sales invoice ([216c32f](https://github.com/frappe/erpnext/commit/216c32f4bc13376335ae31bd09fe6b5c01855ba2)) * Use directly and style it as button instead of using button ([0ab9fc0](https://github.com/frappe/erpnext/commit/0ab9fc0040baf02ed8ed6e7a8a5848f2542f38aa)) ### Features * **Employee Advance:** add 'Returned' and 'Partly Claimed and Returned' status ([42e7a86](https://github.com/frappe/erpnext/commit/42e7a86a3b86672dc1cd102b7452ce1b85ce2957)) ### Reverts * Revert "fix: Add party account validation for journal entry" ([9d43a90](https://github.com/frappe/erpnext/commit/9d43a90eb08ddbcb80a7b488b9696762058e69cc)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 811fdb771bb..5b2f0ba8e00 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.30.0" +__version__ = "13.31.0" def get_default_company(user=None): From e5b586ffd5c460a6e87d0310db967cf4b8ea9b77 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 27 May 2022 12:12:34 +0530 Subject: [PATCH 10/22] fix: Exchange rate reste to 1 on making mapped doc (cherry picked from commit 2a10f09d8dc221b8e8c7c519bf3f56405024afff) --- erpnext/public/js/controllers/transaction.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index fa9a48020f2..2d6e15b15f7 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1055,7 +1055,11 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ } else { // company currency and doc currency is same // this will prevent unnecessary conversion rate triggers - this.frm.set_value("conversion_rate", 1.0); + if(this.frm.doc.currency === this.get_company_currency()) { + this.frm.set_value("conversion_rate", 1.0); + } else { + this.conversion_rate(); + } } }, From 1bffd06e3a2a259850dae76c85d39a2951dcf2f5 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 27 May 2022 06:50:43 +0000 Subject: [PATCH 11/22] chore(release): Bumped to Version 13.31.1 ## [13.31.1](https://github.com/frappe/erpnext/compare/v13.31.0...v13.31.1) (2022-05-27) ### Bug Fixes * Exchange rate reste to 1 on making mapped doc ([e5b586f](https://github.com/frappe/erpnext/commit/e5b586ffd5c460a6e87d0310db967cf4b8ea9b77)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 5b2f0ba8e00..1b304adc270 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.31.0" +__version__ = "13.31.1" def get_default_company(user=None): From 56070c7b86f0e63bca63c4e3d5739217f09e49aa Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 31 May 2022 13:22:25 +0000 Subject: [PATCH 12/22] chore(release): Bumped to Version 13.32.0 # [13.32.0](https://github.com/frappe/erpnext/compare/v13.31.1...v13.32.0) (2022-05-31) ### Bug Fixes * add list view settings for Gratuity ([e4426ad](https://github.com/frappe/erpnext/commit/e4426addebeb3824d4edbfb8c65a5e93a801d5f8)) * amount precision for Tax Exemption Proof Submission ([bb04e4b](https://github.com/frappe/erpnext/commit/bb04e4b6dee401553f8fbe123a764b2b17bc7bb7)) * component pay calculation ([b1e119d](https://github.com/frappe/erpnext/commit/b1e119d97d0c281e74f4466c9379d41e0177aa1e)) * conflicts ([cdb884b](https://github.com/frappe/erpnext/commit/cdb884bbf2ca4d2c1d22fcd7ca85023e3fc0bd37)) * conflicts ([c02a89d](https://github.com/frappe/erpnext/commit/c02a89db4d0f872db2c045ea087d2d0dcb8eda33)) * conflicts ([6aa6114](https://github.com/frappe/erpnext/commit/6aa61147574e1e6b66dc1884b0bdbd4b59c4c5a9)) * date filter on quality inspection report (backport [#31148](https://github.com/frappe/erpnext/issues/31148)) ([#31164](https://github.com/frappe/erpnext/issues/31164)) ([f19747c](https://github.com/frappe/erpnext/commit/f19747cee0693afeb93316813ada8443adfbed61)) * Exchange rate reste to 1 on making mapped doc ([91863c7](https://github.com/frappe/erpnext/commit/91863c74578982ae3e60d76017f4b24a4f63a5cc)) * Gratuity status not updated on salary slip submission ([0a014ed](https://github.com/frappe/erpnext/commit/0a014edd7aa3d8886a60a666daeed1d9c6150e9f)) * HRA Exemption calculation in case of multiple salary structure assignments ([de8f5f8](https://github.com/frappe/erpnext/commit/de8f5f87d04bfbf34dbc3ef3f1b2073e4ec6ad40)) * Improve button labels in Warehouse (backport [#31101](https://github.com/frappe/erpnext/issues/31101)) ([#31150](https://github.com/frappe/erpnext/issues/31150)) ([d891394](https://github.com/frappe/erpnext/commit/d891394dc8c31f87c6c25dc377ac537637a01c9f)) * **india:** duplicate qrcode and hide button ([#31154](https://github.com/frappe/erpnext/issues/31154)) ([f40100d](https://github.com/frappe/erpnext/commit/f40100d4830bf615c1f6b18fe2f0ac4570de7b04)) * Job Opening linked to Staffing Plan cannot be created/updated if there are existing employees ([b4a3a53](https://github.com/frappe/erpnext/commit/b4a3a533c8ee78fb42650a63bf9a900dc3745a6a)) * **pos:** freeze screen while processing pos invoices ([#30850](https://github.com/frappe/erpnext/issues/30850)) ([a7bf236](https://github.com/frappe/erpnext/commit/a7bf236c285abbcdfb74a60ebcbe5f04fe2f985f)) * skip existing batch number during autogen (backport [#31140](https://github.com/frappe/erpnext/issues/31140)) ([#31144](https://github.com/frappe/erpnext/issues/31144)) ([a380bae](https://github.com/frappe/erpnext/commit/a380bae298e57dba219cef862ad343eabee1d11c)) * Tax Declaration tests and amount precision ([1e728df](https://github.com/frappe/erpnext/commit/1e728df54c321c82879748732ade37af42735073)) * validation message ([096ae21](https://github.com/frappe/erpnext/commit/096ae210e1d49e0caabe8da3baf7acce9af42bc1)) ### Features * Auto accrue loan interest for backdated term loans ([89c4d51](https://github.com/frappe/erpnext/commit/89c4d518e10fc5b006c92c9c591da04e8e54a95b)) * live preview of naming series on naming series tool (backport [#31141](https://github.com/frappe/erpnext/issues/31141)) ([#31146](https://github.com/frappe/erpnext/issues/31146)) ([fd2f3b9](https://github.com/frappe/erpnext/commit/fd2f3b90614cbf7385164ed54f40aba98dc6e663)) * provision to exclude exploded items in the BOM (backport [#29450](https://github.com/frappe/erpnext/issues/29450)) ([#31174](https://github.com/frappe/erpnext/issues/31174)) ([50d338d](https://github.com/frappe/erpnext/commit/50d338df309d7e595c24952bfe1f72a2ba3f239b)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1b304adc270..73f179d0739 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.31.1" +__version__ = "13.32.0" def get_default_company(user=None): From 3b1f9fe03bb4eae394075429aee427bd882cb560 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 7 Jun 2022 09:59:51 +0000 Subject: [PATCH 13/22] chore(release): Bumped to Version 13.33.0 # [13.33.0](https://github.com/frappe/erpnext/compare/v13.32.0...v13.33.0) (2022-06-07) ### Bug Fixes * Close unsecured terms loans ([d6d1d79](https://github.com/frappe/erpnext/commit/d6d1d79ba051838de81ddc75607685f473bf5e38)) * Consider only Approved leave applications in LWP, Employee Benefit calculations ([7f84c86](https://github.com/frappe/erpnext/commit/7f84c86d43c449dbddb77a595e395c7746421275)) * display currencies in validation message. ([ef22337](https://github.com/frappe/erpnext/commit/ef22337a9bf6eaef7d6f06c5b0e9c7bc5a3f12da)) * incorrect billed_qty in sales order analysis report when multiple delivery notes for item (backport [#31194](https://github.com/frappe/erpnext/issues/31194)) ([#31250](https://github.com/frappe/erpnext/issues/31250)) ([3b1f6da](https://github.com/frappe/erpnext/commit/3b1f6da741f1bbc859910073fcbef015631bec28)) * incorrect LWP calculation for half days in employee benefit application ([10f0c93](https://github.com/frappe/erpnext/commit/10f0c935fe99471544af82e62db49b3f8523daf8)) * **India:** GSTIN filter in GSTR-1 report ([abe9fe7](https://github.com/frappe/erpnext/commit/abe9fe70cee55638a554e63d8c3af9b08a4f59ea)) * **India:** Supplies from composite dealer not showing up ([15712c7](https://github.com/frappe/erpnext/commit/15712c742b37535bb303a9de28867a9738c9c124)) * **job card:** only hold during draft state (backport [#31243](https://github.com/frappe/erpnext/issues/31243)) ([#31249](https://github.com/frappe/erpnext/issues/31249)) ([a7fc278](https://github.com/frappe/erpnext/commit/a7fc278b609869672b907651c0c4ec7d455c2317)) * **Leave Application:** 'Cancelled' status shown as 'Open' in list view ([8b48d45](https://github.com/frappe/erpnext/commit/8b48d4528626f2a1ad27dedecb0ede791da6480c)) * leave balance for earned leaves in backdated Leave Application dashboard (backport [#31253](https://github.com/frappe/erpnext/issues/31253)) ([#31256](https://github.com/frappe/erpnext/issues/31256)) ([a22d92f](https://github.com/frappe/erpnext/commit/a22d92f946984b410dfad736636f3b8e57ef40c7)) * only fetch membership expiry if not already set in `member.js` ([#31259](https://github.com/frappe/erpnext/issues/31259)) ([d433784](https://github.com/frappe/erpnext/commit/d4337841711f5f6e24f2a6a3104bc7f2ad64325f)) * Parent dimension filters in orders ([b3cbcd8](https://github.com/frappe/erpnext/commit/b3cbcd871bec18badcbd2bc1ff52a1d7638614d0)) * Pluralize year text instead of optional bracket (backport [#31210](https://github.com/frappe/erpnext/issues/31210)) ([#31212](https://github.com/frappe/erpnext/issues/31212)) ([b31709c](https://github.com/frappe/erpnext/commit/b31709c79367486147a2c89067e1b65c03c0fe37)) * re-validate warehouse after 'update items' (backport [#31203](https://github.com/frappe/erpnext/issues/31203)) ([#31206](https://github.com/frappe/erpnext/issues/31206)) ([3a718c7](https://github.com/frappe/erpnext/commit/3a718c7d5f00439aa85f2d0b91a7439a6b995a5b)) * remove leave policy assignment creation patch (backport [#31097](https://github.com/frappe/erpnext/issues/31097)) ([#31204](https://github.com/frappe/erpnext/issues/31204)) ([4aeb448](https://github.com/frappe/erpnext/commit/4aeb448feaa2a77ae68f69cae57fc3fe40ee7db9)) * Remove redundant query ([3c4cf59](https://github.com/frappe/erpnext/commit/3c4cf5929ff763ae03c245583a701f6e830a6dea)) * Reverse provisional entries on Purchase Invoice cancel ([1fba432](https://github.com/frappe/erpnext/commit/1fba4327868384ff397bd909c60e76eab2a93c24)) * **Sales Register:** incorrect query with dimensions (backport [#31242](https://github.com/frappe/erpnext/issues/31242)) ([#31251](https://github.com/frappe/erpnext/issues/31251)) ([0badfc8](https://github.com/frappe/erpnext/commit/0badfc8748b5c569b9997933cb262632cd99f5fb)) * Simply cancel reverse entries ([100b8d9](https://github.com/frappe/erpnext/commit/100b8d9b96862886f08807a88d4009febf03dd5e)) ### Features * **india:** Improve E-way Bill Cancellation. ([#31088](https://github.com/frappe/erpnext/issues/31088)) ([622d25e](https://github.com/frappe/erpnext/commit/622d25e12629e44884eed3f07a8e99187769a19b)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 57cded4e56b..9d9e63999a3 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.32.0" +__version__ = "13.33.0" def get_default_company(user=None): From 943d83b73979031d60d0222ee6a6adfeaebde36d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 14 Jun 2022 07:45:40 +0000 Subject: [PATCH 14/22] chore(release): Bumped to Version 13.34.0 # [13.34.0](https://github.com/frappe/erpnext/compare/v13.33.0...v13.34.0) (2022-06-14) ### Bug Fixes * (auto-merge) Use `frappe.log_error` instead of `doc.log_error` ([bced6a0](https://github.com/frappe/erpnext/commit/bced6a07b4e1d9e3261703d6d31667b3b19609cf)) * `test_work_order_with_non_stock_item` ([b827c3b](https://github.com/frappe/erpnext/commit/b827c3b3c963ed0998bd525a6bb7ded50205c0e6)) * Add cost center in loan document ([c19dfbe](https://github.com/frappe/erpnext/commit/c19dfbe98ab701d522e3ed0f65a3ec1314032d97)) * **asset:** failing test case ([#31277](https://github.com/frappe/erpnext/issues/31277)) ([8a4c9d1](https://github.com/frappe/erpnext/commit/8a4c9d1238198d8951440534710a1b2a9ff32e84)) * Auto Insert Item Price If Missing when discount & blank UOM (backport [#31168](https://github.com/frappe/erpnext/issues/31168)) ([#31267](https://github.com/frappe/erpnext/issues/31267)) ([e69bff0](https://github.com/frappe/erpnext/commit/e69bff0caab77e97bf00e6fed3a2555fcba72fff)) * Call `calculate_cost` for Draft BOM and typo in argument ([d035aa2](https://github.com/frappe/erpnext/commit/d035aa2afb7fb124afa1a581d5a0c3f8c21d33ec)) * Company address filter in quotation ([d375939](https://github.com/frappe/erpnext/commit/d3759394756cc2679b5002a296690b5689c2e081)) * DB update child items, remove redundancy, fix perf ([cbc52a2](https://github.com/frappe/erpnext/commit/cbc52a2e453e612ab10bf57e74e09ea0680f9a45)) * Depreciate Asset before generating GL Entries on sale ([#30759](https://github.com/frappe/erpnext/issues/30759)) ([dfbfe40](https://github.com/frappe/erpnext/commit/dfbfe403e97778ae425d611ad4942bbf724fbd96)) * Get fresh RM rate in `calculate_rm_cost` ([9a513fd](https://github.com/frappe/erpnext/commit/9a513fda74d19cfa9d23bdfcc4c9a23180cd28a4)) * **India:** Incorrect taxable in GSTR-3B report ([e5d2c59](https://github.com/frappe/erpnext/commit/e5d2c59929ec233da97a3a1a5530a7397ed88f7f)) * **India:** Sales taxes and charges template fetching in quotation ([a1ba847](https://github.com/frappe/erpnext/commit/a1ba8475d03202e601227f2db1e4d0f2eefa8ecc)) * locale Currency and Float setting in update_employee ([391ed9c](https://github.com/frappe/erpnext/commit/391ed9c5670ab7639c1c3b6c885f038e4d123055)) * misaligned columns in print format of AR/AP report ([81e32e2](https://github.com/frappe/erpnext/commit/81e32e28550dbba180f6f3b2125a2186d448d12b)) * Partially Ordered status for quotation ([37ba550](https://github.com/frappe/erpnext/commit/37ba5503987b55e41a174437bca9c99232d256b1)) * purchase invoice standalone return GLEs (backport [#31209](https://github.com/frappe/erpnext/issues/31209)) ([#31263](https://github.com/frappe/erpnext/issues/31263)) ([6d99b5a](https://github.com/frappe/erpnext/commit/6d99b5a95aed50b579e43062e4c017213322a57f)) * Reset represents company on disabling internal customer and supplier (backport [#31302](https://github.com/frappe/erpnext/issues/31302)) ([#31306](https://github.com/frappe/erpnext/issues/31306)) ([fb9b302](https://github.com/frappe/erpnext/commit/fb9b302ecf8ca94be9b4561aa87c1e85b0cc74ee)) * Safe cast `row.rate` (in case of faulty exploded items, edge case but oh well) ([6d65e2b](https://github.com/frappe/erpnext/commit/6d65e2bab41e09a0603463e42b581ebc96abae53)) * Supplied Qty not updated on Stock Entry cancel ([79b2062](https://github.com/frappe/erpnext/commit/79b20622c9ebb9121a2d2633916fd02d8b7906db)) * Trial Balance failing to ignore Finance Book ([00371f4](https://github.com/frappe/erpnext/commit/00371f4a224e58b9f48456ea41b17f51ab7f9cac)) * typo in sql condition ([894f945](https://github.com/frappe/erpnext/commit/894f945be7e09ac312c9b39dc29d9ae119a5d2f3)) * update fr translation (backport [#31232](https://github.com/frappe/erpnext/issues/31232)) ([#31334](https://github.com/frappe/erpnext/issues/31334)) ([5d0f271](https://github.com/frappe/erpnext/commit/5d0f27145164b17ca99ccf1de12b7326b6367e14)) * update Period Closing Voucher per Company ([5ebbe81](https://github.com/frappe/erpnext/commit/5ebbe81543c24dc65a57d1e700b3dcbee07b3f68)) * update ru translate (backport [#31200](https://github.com/frappe/erpnext/issues/31200)) ([#31304](https://github.com/frappe/erpnext/issues/31304)) ([77e4755](https://github.com/frappe/erpnext/commit/77e4755c1f8bda642c94c0779c13d863a2883c0d)) * Use `frappe.as_unicode` to decode output of redis module list (backport [#31282](https://github.com/frappe/erpnext/issues/31282)) ([#31283](https://github.com/frappe/erpnext/issues/31283)) ([633a452](https://github.com/frappe/erpnext/commit/633a4521e496446dc3ae87752a412d94dddd563c)) * **ux:** hide new version btn on unsaved BOM (backport [#31297](https://github.com/frappe/erpnext/issues/31297)) ([#31298](https://github.com/frappe/erpnext/issues/31298)) ([9f6b32a](https://github.com/frappe/erpnext/commit/9f6b32af1259d4485396ad6245c1ebbbfb0514a2)) * **UX:** use doc.status for Job Card status ([#31320](https://github.com/frappe/erpnext/issues/31320)) ([78473b8](https://github.com/frappe/erpnext/commit/78473b8d994d028a2b685d950ce66608c6cd3c90)) ### Features * Add german translations ([a3f2cf3](https://github.com/frappe/erpnext/commit/a3f2cf3917a16638f9f4c4f32d0416a902e4d9b0)) * Level-wise BOM cost updation ([74d7d81](https://github.com/frappe/erpnext/commit/74d7d81d6e25698276bdff8d40550411bab91c09)) * Only update exploded items rate and amount ([a26da58](https://github.com/frappe/erpnext/commit/a26da58718d1ef93500ce7f93b16da80fce5a375)) * Track progress in Log Batch/Job wise ([3b2a8bf](https://github.com/frappe/erpnext/commit/3b2a8bf837b62b68a2422ddd01335e2f7045c3d1)) ### Performance Improvements * `get_boms_in_bottom_up_order` ([87c2b3b](https://github.com/frappe/erpnext/commit/87c2b3be0b2ad09ece570c8ad24d19a54e302f93)) * `get_next_higher_level_boms` ([767a775](https://github.com/frappe/erpnext/commit/767a7757095e369da68e017f666c4896fa3cc6a2)) * Use cached doc instead of `get_doc` ([faa69c9](https://github.com/frappe/erpnext/commit/faa69c942b239000227d5b28564dfa4aae75f1be)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 9d9e63999a3..4307526c62e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.33.0" +__version__ = "13.34.0" def get_default_company(user=None): From 0a25d28e34880dede053647bb8e0b88d2226dd4d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 21 Jun 2022 11:14:34 +0000 Subject: [PATCH 15/22] chore(release): Bumped to Version 13.34.1 ## [13.34.1](https://github.com/frappe/erpnext/compare/v13.34.0...v13.34.1) (2022-06-21) ### Bug Fixes * Conversion rate validation for multi-currency invoices ([4186aaf](https://github.com/frappe/erpnext/commit/4186aafd07a495b5b8ef02fda8a6ac4c07578203)) * **india:** e-invoice eligibility if company gstin is not configured ([#31247](https://github.com/frappe/erpnext/issues/31247)) ([7696ae4](https://github.com/frappe/erpnext/commit/7696ae4de1a015d2d14271fb9a05092076abd245)) * internal transfer GLE validation ([8a4cd2a](https://github.com/frappe/erpnext/commit/8a4cd2aba1d1055dd71621dc9340237d08a11c33)) * Merge Conflicts ([0f3a02d](https://github.com/frappe/erpnext/commit/0f3a02db57031bff992c7c5ae0c0f9cda39ea1fd)) * Pick Template BOM if variant BOM absent in WO popup from SO ([7c35887](https://github.com/frappe/erpnext/commit/7c35887d07195458f939b237f42fa8499e2e276d)) * Quotation lost update ([3b9f943](https://github.com/frappe/erpnext/commit/3b9f943335f2b6badbdb681c5dd6149bdbd8165f)) * Spelling mistake in quotation depend on (backport [#31362](https://github.com/frappe/erpnext/issues/31362)) ([#31363](https://github.com/frappe/erpnext/issues/31363)) ([ebcdaf7](https://github.com/frappe/erpnext/commit/ebcdaf7c8286356466887e729d5dd6c6523b21d9)) * transaction date gets unset in material request ([#31387](https://github.com/frappe/erpnext/issues/31387)) ([4e2ed6f](https://github.com/frappe/erpnext/commit/4e2ed6f9d9cf6e7df8a047bfcb59a00b81970871)), closes [#31327](https://github.com/frappe/erpnext/issues/31327) * UOM handling for transaction without item (backport [#31389](https://github.com/frappe/erpnext/issues/31389)) ([#31391](https://github.com/frappe/erpnext/issues/31391)) ([051e5cd](https://github.com/frappe/erpnext/commit/051e5cd74118dd4102dba32250b0cac34024ecea)) ### Performance Improvements * GLE reposting with progress and chunking (backport [#31343](https://github.com/frappe/erpnext/issues/31343)) ([#31373](https://github.com/frappe/erpnext/issues/31373)) ([f19ed0b](https://github.com/frappe/erpnext/commit/f19ed0b74ca2c7669fcfa9b82ee5f8042653b119)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4307526c62e..d11fc258717 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.34.0" +__version__ = "13.34.1" def get_default_company(user=None): From 43cb4fcbb1ffcb0f9ffd1662f6c57d665dc47b21 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 28 Jun 2022 07:31:44 +0000 Subject: [PATCH 16/22] chore(release): Bumped to Version 13.34.2 ## [13.34.2](https://github.com/frappe/erpnext/compare/v13.34.1...v13.34.2) (2022-06-28) ### Bug Fixes * add UOM validation for planned-qty ([559bde3](https://github.com/frappe/erpnext/commit/559bde3135039a09e864961d11b6a9e7be243156)) * dont update RM items table if not required (backport [#31408](https://github.com/frappe/erpnext/issues/31408)) ([#31457](https://github.com/frappe/erpnext/issues/31457)) ([8155306](https://github.com/frappe/erpnext/commit/815530650ccda5b46427d1ace5654c4a45689985)) * General Ledger and TB opening entries mismatch issues ([a0c5c73](https://github.com/frappe/erpnext/commit/a0c5c730f57e8b69b18171c643bf2d971a7162b6)) * Monthly depreciation using WDV method ([e7659a1](https://github.com/frappe/erpnext/commit/e7659a10e4372a871ce3d2efc0428ff57888b55c)) * Quotation and Sales Order item sync ([2219132](https://github.com/frappe/erpnext/commit/2219132fdb01a70c8b194f41ac81207b0b11785f)) * Respect system precision for user facing balance qty values ([#30837](https://github.com/frappe/erpnext/issues/30837)) ([642b9c5](https://github.com/frappe/erpnext/commit/642b9c5466b9a77f84b86145d807a409a8505c4e)) * **Salary Slip:** Components not updated when amount evaluates to 0 due to payment days ([#31425](https://github.com/frappe/erpnext/issues/31425)) ([abfe926](https://github.com/frappe/erpnext/commit/abfe926a451949e16d08bd6d6973941b742e67c5)) * translation for filter status on report ([736f206](https://github.com/frappe/erpnext/commit/736f20656df6ac1cbc7c17abf96779bf993833ae)) * update ru translate (backport [#31404](https://github.com/frappe/erpnext/issues/31404)) ([#31417](https://github.com/frappe/erpnext/issues/31417)) ([8b78a12](https://github.com/frappe/erpnext/commit/8b78a122e73258c37132cc08deb53a04478f58c9)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d11fc258717..50ba3ce22b2 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.34.1" +__version__ = "13.34.2" def get_default_company(user=None): From 5072e6b1dc3569701732f4b000fbf1aaff6e89ff Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 5 Jul 2022 08:55:20 +0000 Subject: [PATCH 17/22] chore(release): Bumped to Version 13.35.0 # [13.35.0](https://github.com/frappe/erpnext/compare/v13.34.2...v13.35.0) (2022-07-05) ### Bug Fixes * **India:** Discounts in E-Invoicing ([9ba7290](https://github.com/frappe/erpnext/commit/9ba7290dc9c4643429c8c435c667f80b714bf3e7)) * Internal PI link in Sales Invoice ([8727a6c](https://github.com/frappe/erpnext/commit/8727a6c5da9a37ac2ec1d8b4c7c9c074ecf04b6d)) * Modify opts parameter misspell (backport [#31476](https://github.com/frappe/erpnext/issues/31476)) ([#31477](https://github.com/frappe/erpnext/issues/31477)) ([4d987a9](https://github.com/frappe/erpnext/commit/4d987a95108ca0c9c7371827155434fcc29a84a5)), closes [#31474](https://github.com/frappe/erpnext/issues/31474) * offset some scheduled jobs to avoid locks (backport [#31466](https://github.com/frappe/erpnext/issues/31466)) ([#31489](https://github.com/frappe/erpnext/issues/31489)) ([b1c6d78](https://github.com/frappe/erpnext/commit/b1c6d789a9c6412f69655e5cff482ddf8a466337)) * **UX:** dont apply price list when changing batch on mapped docs (backport [#31503](https://github.com/frappe/erpnext/issues/31503)) ([#31504](https://github.com/frappe/erpnext/issues/31504)) ([31fd263](https://github.com/frappe/erpnext/commit/31fd263825a811942d20e6a48b8d92c07b642f7d)) ### Features * Cash and Non trade discounts in Sales Invoice ([fd2ec25](https://github.com/frappe/erpnext/commit/fd2ec25588d1c9dbfcda37c07ddbcd01f9d4b6cc)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 50ba3ce22b2..cc07385f5ed 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.34.2" +__version__ = "13.35.0" def get_default_company(user=None): From bac854628fd5b273796b495e042200683dae64f2 Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 5 Jul 2022 19:43:02 +0530 Subject: [PATCH 18/22] fix: Use fallback conversion factor while setting incoming rate for petty purchase - PIs for petty items (that do not need an Item record) are allowed using Item Name field - If a different UOM is used in this case, conversion factor stays 0 and causes an error - Fallback to 1 in `set_incoming_rate` for buying - Selling will need a proper item, so this change is not needed there (cherry picked from commit aa043fe9617e15ff6f6999e968ca09ec2c68e66f) --- erpnext/controllers/buying_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 0a605345662..64e70b1aef5 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -299,7 +299,7 @@ class BuyingController(StockController, Subcontracting): raise_error_if_no_rate=False, ) - rate = flt(outgoing_rate * d.conversion_factor, d.precision("rate")) + rate = flt(outgoing_rate * (d.conversion_factor or 1), d.precision("rate")) else: rate = frappe.db.get_value(ref_doctype, d.get(frappe.scrub(ref_doctype)), "rate") From be3b010b44870e5451e9d0bc1ad0b11a6b24217e Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 8 Jul 2022 10:20:30 +0000 Subject: [PATCH 19/22] chore(release): Bumped to Version 13.35.1 ## [13.35.1](https://github.com/frappe/erpnext/compare/v13.35.0...v13.35.1) (2022-07-08) ### Bug Fixes * Use fallback conversion factor while setting incoming rate for petty purchase ([bac8546](https://github.com/frappe/erpnext/commit/bac854628fd5b273796b495e042200683dae64f2)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index cc07385f5ed..063eacb711e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.35.0" +__version__ = "13.35.1" def get_default_company(user=None): From 751fbd679411b417a1b31f4f60dd2fd861e4443d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 12 Jul 2022 09:29:26 +0000 Subject: [PATCH 20/22] chore(release): Bumped to Version 13.35.2 ## [13.35.2](https://github.com/frappe/erpnext/compare/v13.35.1...v13.35.2) (2022-07-12) ### Bug Fixes * components in the same table don't get updated value of prev payment-days based component ([01beb6f](https://github.com/frappe/erpnext/commit/01beb6f39195d4d8ee7ffd8ddaffc3f037914ac7)) * conflicts ([2045df1](https://github.com/frappe/erpnext/commit/2045df19f99eb7886b20645fac9a210223d663b0)) * Incorrect provisional expense booking while reposting ([d182137](https://github.com/frappe/erpnext/commit/d182137ed17bd288f76318fdfe1aeb443d5e5b2c)) * timeout error while reposting ([07b80c2](https://github.com/frappe/erpnext/commit/07b80c295d4f81143b48a0a666b38c45f7e41be3)) * Use Contact Name instead of Supplier in RFQ Email ([b0e17de](https://github.com/frappe/erpnext/commit/b0e17dea2aa9abb1e57f03680b7799011ef9eb55)) * Use fallback conversion factor while setting incoming rate for petty purchase ([2a432c2](https://github.com/frappe/erpnext/commit/2a432c22d4c1891518cfd23a1a3028ccfc21fcfc)) * Validate payment-days-based dependent component ([a28c7cf](https://github.com/frappe/erpnext/commit/a28c7cf0943649e29447c191b64de64524848f36)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 063eacb711e..3e81e7d474e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.35.1" +__version__ = "13.35.2" def get_default_company(user=None): From 425abcdea7ef172049b261335e99340ebadad80c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 10:49:41 +0530 Subject: [PATCH 21/22] fix: (india) (e-invoice) CN / DN with 0 qty and discount issues * fix: (india) (e-invoice) CN / DN with 0 qty --- .../sales_invoice/test_sales_invoice.py | 171 +++++++++++++++++- .../e_invoice_settings.json | 21 ++- erpnext/regional/india/e_invoice/utils.py | 37 +++- .../doctype/item_price/test_item_price.py | 9 + 4 files changed, 227 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 2ff1b34e35e..0a5172eaba6 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2623,20 +2623,34 @@ class TestSalesInvoice(unittest.TestCase): def test_einvoice_discounts(self): from erpnext.regional.india.e_invoice.utils import make_einvoice, validate_totals + frappe.db.set_single_value("E Invoice Settings", "dont_show_discounts_in_e_invoice", False) + # Normal Itemized Discount si = get_sales_invoice_for_e_invoice() si.apply_discount_on = "" - si.items[0].discount_amount = 4000 - si.items[1].discount_amount = 300 + si.items[0].price_list_rate = 12 + si.items[0].discount_percentage = 16.6666666667 + si.items[0].rate = 10 + + si.items[1].price_list_rate = 15 + si.items[1].discount_amount = 5 + si.items[1].rate = 10 si.save() einvoice = make_einvoice(si) validate_totals(einvoice) self.assertEqual(einvoice["ItemList"][0]["Discount"], 4000) - self.assertEqual(einvoice["ItemList"][1]["Discount"], 300) + self.assertEqual(einvoice["ItemList"][1]["Discount"], 2100) + self.assertEqual(einvoice["ItemList"][2]["Discount"], 222) + self.assertEqual(einvoice["ItemList"][3]["Discount"], 5555) self.assertEqual(einvoice["ValDtls"]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][0]["UnitPrice"], 12) + self.assertEqual(einvoice["ItemList"][1]["UnitPrice"], 15) + self.assertEqual(einvoice["ItemList"][2]["UnitPrice"], 20) + self.assertEqual(einvoice["ItemList"][3]["UnitPrice"], 10) + # Invoice Discount on net total si = get_sales_invoice_for_e_invoice() si.apply_discount_on = "Net Total" @@ -2646,10 +2660,17 @@ class TestSalesInvoice(unittest.TestCase): einvoice = make_einvoice(si) validate_totals(einvoice) - self.assertEqual(einvoice["ItemList"][0]["Discount"], 316.83) - self.assertEqual(einvoice["ItemList"][1]["Discount"], 83.17) + self.assertEqual(einvoice["ItemList"][0]["Discount"], 253.61) + self.assertEqual(einvoice["ItemList"][1]["Discount"], 66.57) + self.assertEqual(einvoice["ItemList"][2]["Discount"], 243.11) + self.assertEqual(einvoice["ItemList"][3]["Discount"], 5613.71) self.assertEqual(einvoice["ValDtls"]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][0]["UnitPrice"], 12) + self.assertEqual(einvoice["ItemList"][1]["UnitPrice"], 15) + self.assertEqual(einvoice["ItemList"][2]["UnitPrice"], 20) + self.assertEqual(einvoice["ItemList"][3]["UnitPrice"], 10) + # Invoice Discount on grand total (Itemized Discount) si = get_sales_invoice_for_e_invoice() si.apply_discount_on = "Grand Total" @@ -2659,10 +2680,17 @@ class TestSalesInvoice(unittest.TestCase): einvoice = make_einvoice(si) validate_totals(einvoice) - self.assertEqual(einvoice["ItemList"][0]["Discount"], 268.5) - self.assertEqual(einvoice["ItemList"][1]["Discount"], 70.48) + self.assertEqual(einvoice["ItemList"][0]["Discount"], 214.93) + self.assertEqual(einvoice["ItemList"][1]["Discount"], 56.42) + self.assertEqual(einvoice["ItemList"][2]["Discount"], 239.89) + self.assertEqual(einvoice["ItemList"][3]["Discount"], 5604.75) self.assertEqual(einvoice["ValDtls"]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][0]["UnitPrice"], 12) + self.assertEqual(einvoice["ItemList"][1]["UnitPrice"], 15) + self.assertEqual(einvoice["ItemList"][2]["UnitPrice"], 20) + self.assertEqual(einvoice["ItemList"][3]["UnitPrice"], 10) + # Invoice Discount on grand total (Cash/Non-Trade Discount) si = get_sales_invoice_for_e_invoice() si.apply_discount_on = "Grand Total" @@ -2675,8 +2703,107 @@ class TestSalesInvoice(unittest.TestCase): self.assertEqual(einvoice["ItemList"][0]["Discount"], 0) self.assertEqual(einvoice["ItemList"][1]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][2]["Discount"], 222.0) + self.assertEqual(einvoice["ItemList"][3]["Discount"], 5555.0) self.assertEqual(einvoice["ValDtls"]["Discount"], 400) + self.assertEqual(einvoice["ItemList"][0]["UnitPrice"], 12) + self.assertEqual(einvoice["ItemList"][1]["UnitPrice"], 15) + self.assertEqual(einvoice["ItemList"][2]["UnitPrice"], 20) + self.assertEqual(einvoice["ItemList"][3]["UnitPrice"], 10) + + def test_einvoice_without_discounts(self): + from erpnext.regional.india.e_invoice.utils import make_einvoice, validate_totals + + frappe.db.set_single_value("E Invoice Settings", "dont_show_discounts_in_e_invoice", True) + + # Normal Itemized Discount + si = get_sales_invoice_for_e_invoice() + si.apply_discount_on = "" + si.items[0].price_list_rate = 12 + si.items[0].discount_percentage = 16.6666666667 + si.items[0].rate = 10 + + si.items[1].price_list_rate = 15 + si.items[1].discount_amount = 5 + si.items[1].rate = 10 + si.save() + + einvoice = make_einvoice(si) + validate_totals(einvoice) + + self.assertEqual(einvoice["ItemList"][0]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][1]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][2]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][3]["Discount"], 0) + self.assertEqual(einvoice["ValDtls"]["Discount"], 0) + + self.assertEqual(einvoice["ItemList"][0]["UnitPrice"], 10) + self.assertEqual(einvoice["ItemList"][1]["UnitPrice"], 10) + self.assertEqual(einvoice["ItemList"][2]["UnitPrice"], 18) + self.assertEqual(einvoice["ItemList"][3]["UnitPrice"], 5) + + # Invoice Discount on net total + si = get_sales_invoice_for_e_invoice() + si.apply_discount_on = "Net Total" + si.discount_amount = 400 + si.save() + + einvoice = make_einvoice(si) + validate_totals(einvoice) + + self.assertEqual(einvoice["ItemList"][0]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][1]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][2]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][3]["Discount"], 0) + self.assertEqual(einvoice["ValDtls"]["Discount"], 0) + + self.assertEqual(einvoice["ItemList"][0]["UnitPrice"], 11.87) + self.assertEqual(einvoice["ItemList"][1]["UnitPrice"], 14.84) + self.assertEqual(einvoice["ItemList"][2]["UnitPrice"], 17.81) + self.assertEqual(einvoice["ItemList"][3]["UnitPrice"], 4.95) + + # Invoice Discount on grand total (Itemized Discount) + si = get_sales_invoice_for_e_invoice() + si.apply_discount_on = "Grand Total" + si.discount_amount = 400 + si.save() + + einvoice = make_einvoice(si) + validate_totals(einvoice) + + self.assertEqual(einvoice["ItemList"][0]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][1]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][2]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][3]["Discount"], 0) + self.assertEqual(einvoice["ValDtls"]["Discount"], 0) + + self.assertEqual(einvoice["ItemList"][0]["UnitPrice"], 11.89) + self.assertEqual(einvoice["ItemList"][1]["UnitPrice"], 14.87) + self.assertEqual(einvoice["ItemList"][2]["UnitPrice"], 17.84) + self.assertEqual(einvoice["ItemList"][3]["UnitPrice"], 4.96) + + # Invoice Discount on grand total (Cash/Non-Trade Discount) + si = get_sales_invoice_for_e_invoice() + si.apply_discount_on = "Grand Total" + si.is_cash_or_non_trade_discount = 1 + si.discount_amount = 400 + si.save() + + einvoice = make_einvoice(si) + validate_totals(einvoice) + + self.assertEqual(einvoice["ItemList"][0]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][1]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][2]["Discount"], 0) + self.assertEqual(einvoice["ItemList"][3]["Discount"], 0) + self.assertEqual(einvoice["ValDtls"]["Discount"], 400) + + self.assertEqual(einvoice["ItemList"][0]["UnitPrice"], 12) + self.assertEqual(einvoice["ItemList"][1]["UnitPrice"], 15) + self.assertEqual(einvoice["ItemList"][2]["UnitPrice"], 18) + self.assertEqual(einvoice["ItemList"][3]["UnitPrice"], 5) + def test_item_tax_net_range(self): item = create_item("T Shirt") @@ -3276,6 +3403,36 @@ def get_sales_invoice_for_e_invoice(): }, ) + si.append( + "items", + { + "item_code": "_Test Item", + "uom": "Nos", + "warehouse": "_Test Warehouse - _TC", + "qty": 111, + "price_list_rate": 20, + "discount_percentage": 10, + "income_account": "Sales - _TC", + "expense_account": "Cost of Goods Sold - _TC", + "cost_center": "_Test Cost Center - _TC", + }, + ) + + si.append( + "items", + { + "item_code": "_Test Item 2", + "uom": "Nos", + "warehouse": "_Test Warehouse - _TC", + "qty": 1111, + "price_list_rate": 10, + "rate": 5, + "income_account": "Sales - _TC", + "expense_account": "Cost of Goods Sold - _TC", + "cost_center": "_Test Cost Center - _TC", + }, + ) + return si diff --git a/erpnext/regional/doctype/e_invoice_settings/e_invoice_settings.json b/erpnext/regional/doctype/e_invoice_settings/e_invoice_settings.json index 16b29633010..14fad403213 100644 --- a/erpnext/regional/doctype/e_invoice_settings/e_invoice_settings.json +++ b/erpnext/regional/doctype/e_invoice_settings/e_invoice_settings.json @@ -9,6 +9,9 @@ "section_break_2", "sandbox_mode", "applicable_from", + "column_break_4", + "dont_show_discounts_in_e_invoice", + "section_break_7", "credentials", "advanced_settings_section", "client_id", @@ -80,12 +83,28 @@ { "fieldname": "column_break_8", "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "default": "1", + "description": "Enabling this will directly report net rates in e-Invoice post discounts", + "fieldname": "dont_show_discounts_in_e_invoice", + "fieldtype": "Check", + "label": "Don't show discounts in e-Invoice" + }, + { + "fieldname": "section_break_7", + "fieldtype": "Section Break", + "hide_border": 1 } ], "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2021-11-16 19:50:28.029517", + "modified": "2022-07-17 14:57:50.783517", "modified_by": "Administrator", "module": "Regional", "name": "E Invoice Settings", diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index d4a2e026453..b0f837b51e7 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -273,10 +273,41 @@ def get_item_list(invoice): item.qty = abs(item.qty) - if invoice.get("apply_discount_on"): - item.discount_amount = item.base_amount - item.base_net_amount + hide_discount_in_einvoice = cint( + frappe.db.get_single_value("E Invoice Settings", "dont_show_discounts_in_e_invoice") + ) - item.unit_rate = abs(item.taxable_value - item.discount_amount) / item.qty + if hide_discount_in_einvoice: + if flt(item.qty) != 0.0: + item.unit_rate = abs(item.taxable_value / item.qty) + else: + item.unit_rate = abs(item.taxable_value) + item.gross_amount = abs(item.taxable_value) + item.taxable_value = abs(item.taxable_value) + item.discount_amount = 0 + + else: + if invoice.get("apply_discount_on") and (abs(invoice.get("base_discount_amount") or 0.0) > 0.0): + # TODO: need to handle case when tax included in basic rate is checked. + item.discount_amount = (item.discount_amount * item.qty) + ( + abs(item.base_amount) - abs(item.base_net_amount) + ) + else: + item.discount_amount = item.discount_amount * item.qty + + if invoice.get("is_return") or invoice.get("is_debit_note"): + item.unit_rate = (abs(item.taxable_value) + item.discount_amount) / ( + 1 if (item.qty == 0) else item.qty + ) + else: + try: + item.unit_rate = abs(item.taxable_value + item.discount_amount) / item.qty + except ZeroDivisionError: + # This will never run but added as safety measure + frappe.throw( + title=_("Error: Qty is Zero"), + msg=_("Quantity can't be zero unless it's Credit/Debit Note."), + ) item.gross_amount = abs(item.taxable_value) + item.discount_amount item.taxable_value = abs(item.taxable_value) diff --git a/erpnext/stock/doctype/item_price/test_item_price.py b/erpnext/stock/doctype/item_price/test_item_price.py index 30d933e247d..d3988743f6d 100644 --- a/erpnext/stock/doctype/item_price/test_item_price.py +++ b/erpnext/stock/doctype/item_price/test_item_price.py @@ -164,4 +164,13 @@ class TestItemPrice(FrappeTestCase): self.assertEqual(price, 21) +def make_item_price(item_code, price_list, price_list_rate): + item_price = frappe.new_doc("Item Price") + item_price.price_list = price_list + item_price.item_code = item_code + item_price.price_list_rate = price_list_rate + item_price.insert() + return item_price + + test_records = frappe.get_test_records("Item Price") From 109086229654fc2df57c585265490601b3d27bc2 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Mon, 18 Jul 2022 05:21:17 +0000 Subject: [PATCH 22/22] chore(release): Bumped to Version 13.35.3 ## [13.35.3](https://github.com/frappe/erpnext/compare/v13.35.2...v13.35.3) (2022-07-18) ### Bug Fixes * (india) (e-invoice) CN / DN with 0 qty and discount issues ([425abcd](https://github.com/frappe/erpnext/commit/425abcdea7ef172049b261335e99340ebadad80c)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 3e81e7d474e..69fc7cbcdaa 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import frappe from erpnext.hooks import regional_overrides -__version__ = "13.35.2" +__version__ = "13.35.3" def get_default_company(user=None):