From b9e47190457cb4132c47c7c75c7cd94fd9d4035b Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 20 Oct 2023 17:33:49 +0530 Subject: [PATCH 01/23] chore: enable automatic releases --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ccd712065d..4546a69668 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,14 +2,14 @@ name: Generate Semantic Release on: push: branches: - - version-14 + - version-15 jobs: release: name: Release runs-on: ubuntu-latest steps: - name: Checkout Entire Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false From 880cea5b3615bc39a0216c972c8ab1e1f5c03ddc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 14 Nov 2023 22:18:56 +0530 Subject: [PATCH 02/23] fix: valuation rate for the subcontracting receipt supplied items with Serial and Batch Bundle (backport #38094) (backport #38097) (#38101) fix: valuation rate for the subcontracting receipt supplied items with Serial and Batch Bundle (backport #38094) (#38097) fix: valuation rate for the subcontracting receipt supplied items with Serial and Batch Bundle (#38094) fix: valuation rate for the subcontracting receipt supplied items with batch (cherry picked from commit 3e77c0b5644c28ed9b4eef22b228fdc4a1283020) Co-authored-by: rohitwaghchaure (cherry picked from commit 28e6e5d9106b78a9cba29946cd4a30b68ff2c0f2) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../controllers/subcontracting_controller.py | 13 +++ .../stock_ledger_entry.json | 10 +- erpnext/stock/serial_batch_bundle.py | 10 +- erpnext/stock/stock_ledger.py | 4 +- .../subcontracting_receipt.js | 10 ++ .../test_subcontracting_receipt.py | 91 +++++++++++++++++++ 6 files changed, 135 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 5fa66b1a87..3d55a087bd 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -626,6 +626,18 @@ class SubcontractingController(StockController): (row.item_code, row.get(self.subcontract_data.order_field)) ] -= row.qty + def __set_rate_for_serial_and_batch_bundle(self): + if self.doctype != "Subcontracting Receipt": + return + + for row in self.get(self.raw_material_table): + if not row.get("serial_and_batch_bundle"): + continue + + row.rate = frappe.get_cached_value( + "Serial and Batch Bundle", row.serial_and_batch_bundle, "avg_rate" + ) + def __modify_serial_and_batch_bundle(self): if self.is_new(): return @@ -681,6 +693,7 @@ class SubcontractingController(StockController): self.__remove_changed_rows() self.__set_supplied_items() self.__modify_serial_and_batch_bundle() + self.__set_rate_for_serial_and_batch_bundle() def __validate_batch_no(self, row, key): if row.get("batch_no") and row.get("batch_no") not in self.__transferred_items.get(key).get( diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json index dcbd9b2d06..be379940ca 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json @@ -12,6 +12,7 @@ "posting_date", "posting_time", "is_adjustment_entry", + "auto_created_serial_and_batch_bundle", "column_break_6", "voucher_type", "voucher_no", @@ -340,6 +341,13 @@ "fieldname": "is_adjustment_entry", "fieldtype": "Check", "label": "Is Adjustment Entry" + }, + { + "default": "0", + "depends_on": "serial_and_batch_bundle", + "fieldname": "auto_created_serial_and_batch_bundle", + "fieldtype": "Check", + "label": "Auto Created Serial and Batch Bundle" } ], "hide_toolbar": 1, @@ -348,7 +356,7 @@ "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2023-10-23 18:07:42.063615", + "modified": "2023-11-14 16:47:39.791967", "modified_by": "Administrator", "module": "Stock", "name": "Stock Ledger Entry", diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 5998274bb7..da98455b5c 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -129,7 +129,9 @@ class SerialBatchBundle: frappe.throw(_(error_msg)) def set_serial_and_batch_bundle(self, sn_doc): - self.sle.db_set("serial_and_batch_bundle", sn_doc.name) + self.sle.db_set( + {"serial_and_batch_bundle": sn_doc.name, "auto_created_serial_and_batch_bundle": 1} + ) if sn_doc.is_rejected: frappe.db.set_value( @@ -143,6 +145,12 @@ class SerialBatchBundle: @property def child_doctype(self): child_doctype = self.sle.voucher_type + " Item" + + if ( + self.sle.voucher_type == "Subcontracting Receipt" and self.sle.dependant_sle_voucher_detail_no + ): + child_doctype = "Subcontracting Receipt Supplied Item" + if self.sle.voucher_type == "Stock Entry": child_doctype = "Stock Entry Detail" diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 000b295039..a53180442f 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -759,7 +759,9 @@ class update_entries_after(object): sle.doctype = "Stock Ledger Entry" frappe.get_doc(sle).db_update() - if not self.args.get("sle_id"): + if not self.args.get("sle_id") or ( + sle.serial_and_batch_bundle and sle.auto_created_serial_and_batch_bundle + ): self.update_outgoing_rate_on_transaction(sle) def reset_actual_qty_for_stock_reco(self, sle): diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js index 19a1c939c3..36001eb78f 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js @@ -13,6 +13,16 @@ frappe.ui.form.on('Subcontracting Receipt', { frm.trigger('set_queries'); }, + on_submit(frm) { + frm.events.refresh_serial_batch_bundle_field(frm); + }, + + refresh_serial_batch_bundle_field(frm) { + frappe.route_hooks.after_submit = (frm_obj) => { + frm_obj.reload_doc(); + } + }, + refresh: (frm) => { if (frm.doc.docstatus > 0) { frm.add_custom_button(__('Stock Ledger'), () => { diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py index 96babf2b32..6191a8ca94 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py @@ -576,6 +576,97 @@ class TestSubcontractingReceipt(FrappeTestCase): self.assertEqual(scr.items[0].rm_cost_per_qty, 300) self.assertEqual(scr.items[0].service_cost_per_qty, 100) + def test_subcontracting_receipt_valuation_with_auto_created_serial_batch_bundle(self): + set_backflush_based_on("BOM") + + fg_item = make_item(properties={"is_stock_item": 1, "is_sub_contracted_item": 1}).name + rm_item1 = make_item( + properties={ + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "BNGS-.####", + } + ).name + + rm_item2 = make_item( + properties={ + "is_stock_item": 1, + "has_batch_no": 1, + "has_serial_no": 1, + "create_new_batch": 1, + "batch_number_series": "BNGS-.####", + "serial_no_series": "BNSS-.####", + } + ).name + + rm_item3 = make_item( + properties={ + "is_stock_item": 1, + "has_serial_no": 1, + "serial_no_series": "BSSSS-.####", + } + ).name + + bom = make_bom(item=fg_item, raw_materials=[rm_item1, rm_item2, rm_item3]) + + rm_batch_no = None + for row in bom.items: + make_stock_entry( + item_code=row.item_code, + qty=1, + target="_Test Warehouse 1 - _TC", + rate=300, + ) + + make_stock_entry( + item_code=row.item_code, + qty=1, + target="_Test Warehouse 1 - _TC", + rate=400, + ) + + service_items = [ + { + "warehouse": "_Test Warehouse - _TC", + "item_code": "Subcontracted Service Item 1", + "qty": 1, + "rate": 100, + "fg_item": fg_item, + "fg_item_qty": 1, + }, + ] + sco = get_subcontracting_order(service_items=service_items) + + frappe.db.set_single_value( + "Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", 1 + ) + scr = make_subcontracting_receipt(sco.name) + scr.save() + for row in scr.supplied_items: + self.assertNotEqual(row.rate, 300.00) + self.assertFalse(row.serial_and_batch_bundle) + + scr.submit() + scr.reload() + + for row in scr.supplied_items: + self.assertEqual(row.rate, 300.00) + self.assertTrue(row.serial_and_batch_bundle) + auto_created_serial_batch = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_no": scr.name, "voucher_detail_no": row.name}, + "auto_created_serial_and_batch_bundle", + ) + + self.assertTrue(auto_created_serial_batch) + + self.assertEqual(scr.items[0].rm_cost_per_qty, 900) + self.assertEqual(scr.items[0].service_cost_per_qty, 100) + frappe.db.set_single_value( + "Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", 0 + ) + def test_subcontracting_receipt_raw_material_rate(self): # Step - 1: Set Backflush Based On as "BOM" set_backflush_based_on("BOM") From 3ce734e372a9d1ca221ff60abe1c5e2de92415c3 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 16 Nov 2023 12:18:47 +0530 Subject: [PATCH 03/23] ci: change release branch (cherry picked from commit d0a74419b397ff5b7fb97954cbc3db3fad22b316) --- .releaserc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.releaserc b/.releaserc index 454adc7094..f8d353e0d7 100644 --- a/.releaserc +++ b/.releaserc @@ -1,5 +1,5 @@ { - "branches": ["version-14"], + "branches": ["version-15"], "plugins": [ "@semantic-release/commit-analyzer", { "preset": "angular", From 54a6fbaeba32ed8d153f8ed0a85af5ff4b3d5a71 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 16 Nov 2023 06:51:17 +0000 Subject: [PATCH 04/23] chore(release): Bumped to Version 15.1.0 # [15.1.0](https://github.com/frappe/erpnext/compare/v15.0.0...v15.1.0) (2023-11-16) ### Bug Fixes * `PermissionError` while creating DN from SO (backport [#37758](https://github.com/frappe/erpnext/issues/37758)) ([#37768](https://github.com/frappe/erpnext/issues/37768)) ([e742310](https://github.com/frappe/erpnext/commit/e7423109b65cce78cd14541f5e4fccf99716a840)) * `TypeError` in PR for non-stock item (backport [#37819](https://github.com/frappe/erpnext/issues/37819)) ([#37842](https://github.com/frappe/erpnext/issues/37842)) ([847dd9e](https://github.com/frappe/erpnext/commit/847dd9e6715deb2c7f9a14f84a3ac45fd3a420e0)) * add translation wrapper (backport [#37911](https://github.com/frappe/erpnext/issues/37911)) ([#37947](https://github.com/frappe/erpnext/issues/37947)) ([915ca47](https://github.com/frappe/erpnext/commit/915ca47515a5dff4d5e56b87e2dd45fcc7516499)) * asset depreciation ledger (backport [#37991](https://github.com/frappe/erpnext/issues/37991)) ([#37993](https://github.com/frappe/erpnext/issues/37993)) ([b3562bd](https://github.com/frappe/erpnext/commit/b3562bdb8761eb7084122923ccd68983d4ff666d)) * avoid name clash in delivery stop (backport [#37306](https://github.com/frappe/erpnext/issues/37306)) ([#37702](https://github.com/frappe/erpnext/issues/37702)) ([bfd240a](https://github.com/frappe/erpnext/commit/bfd240a19dd3c64d86aaf0541d2f559b59844241)) * close `Credit Limit Crossed` dialog (backport [#38052](https://github.com/frappe/erpnext/issues/38052)) ([#38059](https://github.com/frappe/erpnext/issues/38059)) ([cff56d4](https://github.com/frappe/erpnext/commit/cff56d4e501027433952854fb0b4b1e2828e59cb)) * COA Importer app related issues ([#37238](https://github.com/frappe/erpnext/issues/37238)) ([d5bf7a0](https://github.com/frappe/erpnext/commit/d5bf7a039dfb2fd0b6f151bd4e4df8b4e43279b7)) * consider reserved stock while cancelling a stock transaction (backport [#37754](https://github.com/frappe/erpnext/issues/37754)) ([#37906](https://github.com/frappe/erpnext/issues/37906)) ([e0b0b6b](https://github.com/frappe/erpnext/commit/e0b0b6bb7d9200400536bc24edb4e70d5c4525b9)) * credit note receive payment entry ([9781f9b](https://github.com/frappe/erpnext/commit/9781f9b7b10f2ad2d135a641418605f8a1d80198)) * **customer:** contact creation for companies ([#38055](https://github.com/frappe/erpnext/issues/38055)) ([fc09d75](https://github.com/frappe/erpnext/commit/fc09d757f089afc78b2ab544321d57aaa4b5b532)) * **customer:** quick form and integration fixes ([#37386](https://github.com/frappe/erpnext/issues/37386)) ([02e2258](https://github.com/frappe/erpnext/commit/02e225845e1e4b8c1dd9b110b40477153bb77deb)) * **defaults:** apply discount and provisonal defaults from item group and brand if available (backport [#37466](https://github.com/frappe/erpnext/issues/37466)) ([#37704](https://github.com/frappe/erpnext/issues/37704)) ([f382b1c](https://github.com/frappe/erpnext/commit/f382b1cf61ace3b44889ded7ab91bfdd1809811f)) * deprecate unused create_contact ([6f2b34e](https://github.com/frappe/erpnext/commit/6f2b34e7d52e5cdfffccddecff9c0408cdb168c1)) * don't reset rate if greater than zero in standalone debit note (backport [#37935](https://github.com/frappe/erpnext/issues/37935)) ([#37941](https://github.com/frappe/erpnext/issues/37941)) ([e156564](https://github.com/frappe/erpnext/commit/e156564ea44eafde729219906b965aed685005e4)) * force delete removed report (backport [#37668](https://github.com/frappe/erpnext/issues/37668)) ([#37670](https://github.com/frappe/erpnext/issues/37670)) ([a871d95](https://github.com/frappe/erpnext/commit/a871d955d466c35f5307e4025ec310980fb3619d)) * handle gle for standalone credit and debit notes ([6e463b1](https://github.com/frappe/erpnext/commit/6e463b195329b41ad57d1a2d50a775f731a2b8d6)) * Identical items are added line by line instead of grouped together in POS ([#37986](https://github.com/frappe/erpnext/issues/37986)) ([011cf3d](https://github.com/frappe/erpnext/commit/011cf3d73e2f4dd98c4b33c502ca34665e067c57)) * ignore Stock Reservation for future dated PR (backport [#37979](https://github.com/frappe/erpnext/issues/37979)) ([#37990](https://github.com/frappe/erpnext/issues/37990)) ([d74f0ef](https://github.com/frappe/erpnext/commit/d74f0ef586e4166059dc2dab296ecf9d6d7761ca)) * In-Transit Warehouse company filter (backport [#37796](https://github.com/frappe/erpnext/issues/37796)) ([#37798](https://github.com/frappe/erpnext/issues/37798)) ([254ec2c](https://github.com/frappe/erpnext/commit/254ec2cfd1416bbba512116b8109410fbe89b183)) * incorrect material request quantity in production plan (backport [#37785](https://github.com/frappe/erpnext/issues/37785)) ([#37790](https://github.com/frappe/erpnext/issues/37790)) ([8b3c4a9](https://github.com/frappe/erpnext/commit/8b3c4a948ca006060cead321b0884e605d6eaa67)) * indentation issue in the Production Plan Summary report (backport [#38019](https://github.com/frappe/erpnext/issues/38019)) ([#38069](https://github.com/frappe/erpnext/issues/38069)) ([6d325a4](https://github.com/frappe/erpnext/commit/6d325a40a1ed4fd2f67443b086bf499c71d21388)) * indexing on Delivery Note Item (backport [#37766](https://github.com/frappe/erpnext/issues/37766)) ([#37778](https://github.com/frappe/erpnext/issues/37778)) ([98a7c17](https://github.com/frappe/erpnext/commit/98a7c170a024cf939a2e84ea4dbf2c34b553b793)) * link between parent and child procedure (backport [#37903](https://github.com/frappe/erpnext/issues/37903)) ([#37944](https://github.com/frappe/erpnext/issues/37944)) ([a065f22](https://github.com/frappe/erpnext/commit/a065f22a4cd83e180fa1ca37b6aaf8421b19a724)) * list index out of range (backport [#37890](https://github.com/frappe/erpnext/issues/37890)) ([#37920](https://github.com/frappe/erpnext/issues/37920)) ([e71ef10](https://github.com/frappe/erpnext/commit/e71ef10ca976e8583ce0d5f90282b8f7c75133f8)) * make `Material Request Item` required if `Material Request` is set in PO (backport [#37928](https://github.com/frappe/erpnext/issues/37928)) ([#37937](https://github.com/frappe/erpnext/issues/37937)) ([7ad0817](https://github.com/frappe/erpnext/commit/7ad08179f2fae838e68802e6d789403d720137e2)) * make adjustment entry using stock reconciliation (backport [#37995](https://github.com/frappe/erpnext/issues/37995)) ([#38009](https://github.com/frappe/erpnext/issues/38009)) ([b23fa1f](https://github.com/frappe/erpnext/commit/b23fa1f5dd65acd3126c8a66f34815b88ae06f0f)) * make changes that enable gantt view for job cards (backport [#37661](https://github.com/frappe/erpnext/issues/37661)) ([#37757](https://github.com/frappe/erpnext/issues/37757)) ([f132552](https://github.com/frappe/erpnext/commit/f13255296807bc0c725dca57c4f1990eb432bf16)) * make item field read-only in batch (backport [#38010](https://github.com/frappe/erpnext/issues/38010)) ([#38034](https://github.com/frappe/erpnext/issues/38034)) ([99b7cdb](https://github.com/frappe/erpnext/commit/99b7cdb5bef490e51cef77a36b091882f9861840)) * make project page translatable (backport [#37743](https://github.com/frappe/erpnext/issues/37743)) ([#37801](https://github.com/frappe/erpnext/issues/37801)) ([59e67cd](https://github.com/frappe/erpnext/commit/59e67cd384ef74fe00176171a35b498cdf4c67a6)) * Mark Status field in Payment Entry 'no_copy'. ([#38000](https://github.com/frappe/erpnext/issues/38000)) ([3c0f8b1](https://github.com/frappe/erpnext/commit/3c0f8b15a0b6a610367272be82799f111bd116e8)) * minor change added to test_case ([b1714ec](https://github.com/frappe/erpnext/commit/b1714ec21de5824293855596c2a32f2087e3e327)) * minor issue ([24be044](https://github.com/frappe/erpnext/commit/24be04427c9ce5b48afde2a9dde0c94a437892c9)) * **minor:** set tax values for item variants (backport [#37674](https://github.com/frappe/erpnext/issues/37674)) ([#37739](https://github.com/frappe/erpnext/issues/37739)) ([5c46d74](https://github.com/frappe/erpnext/commit/5c46d7452e44b4185c7226af126cc118ebd56626)) * new logic for handling revaluation journals ([fb71a6e](https://github.com/frappe/erpnext/commit/fb71a6e787a18288ea7a1449a81121639dd71d83)) * Not able to save subcontracting receipt ([#38085](https://github.com/frappe/erpnext/issues/38085)) ([a874997](https://github.com/frappe/erpnext/commit/a8749977e1f61822166692cf27c7e0038cafc599)) * **packed_item:** ensure proper names for ref integrity (backport [#37597](https://github.com/frappe/erpnext/issues/37597)) ([#37794](https://github.com/frappe/erpnext/issues/37794)) ([9aa29f5](https://github.com/frappe/erpnext/commit/9aa29f55d9b948deae4df264cdabcfe6bf17e2d8)) * permission error while creating Supplier Quotation from Portal (backport [#37864](https://github.com/frappe/erpnext/issues/37864)) ([#37871](https://github.com/frappe/erpnext/issues/37871)) ([be8399f](https://github.com/frappe/erpnext/commit/be8399f52e512137fa4e5c7ebdd299b2c64a8f3d)) * **plaid:** Do not sync pending transactions ([2149de4](https://github.com/frappe/erpnext/commit/2149de44b131cc7b9ff2fca99326f3b1e6b92bf3)) * POS change amount gl entry with no amount ([#37799](https://github.com/frappe/erpnext/issues/37799)) ([fd7a768](https://github.com/frappe/erpnext/commit/fd7a7685357b9ca3010d758e16608ce0f3e98217)) * Quality Inspection Parameter migration - DuplicateEntryError due to case sensitivity (backport [#37499](https://github.com/frappe/erpnext/issues/37499)) ([#37917](https://github.com/frappe/erpnext/issues/37917)) ([7d0f1f4](https://github.com/frappe/erpnext/commit/7d0f1f4235dcd49b1fbad23f92026b311c9459e5)) * remove from or target warehouse for non internal transfer entries (backport [#37612](https://github.com/frappe/erpnext/issues/37612)) ([#37627](https://github.com/frappe/erpnext/issues/37627)) ([3155790](https://github.com/frappe/erpnext/commit/31557902b83a6b770bc20c5ebfe35cb6038a293c)) * remove validation for negative outstanding invoices ([8602a3e](https://github.com/frappe/erpnext/commit/8602a3eab1e939a3959e8b088330e05fcad1378b)) * remove voucher type and no for Item and Warehouse based reposting ([b96be67](https://github.com/frappe/erpnext/commit/b96be67a1fa9c36cc0b0d3eb7e5ba1905dbb4180)) * sales order not assigned to territory orders (backport [#37905](https://github.com/frappe/erpnext/issues/37905)) ([#38025](https://github.com/frappe/erpnext/issues/38025)) ([40cc3a7](https://github.com/frappe/erpnext/commit/40cc3a76108b58793f4a16b796cfbb18bc073c4f)) * skip check for removed validation ([22e58e0](https://github.com/frappe/erpnext/commit/22e58e0ee00f5b44992b1d4dab804b9105c6b12d)) * sort by section code ([06bb1a3](https://github.com/frappe/erpnext/commit/06bb1a32086ffb5729236e2ed48183a5d44feb6e)) * standard submit perm in repost ledger for editable invoices (backport [#37826](https://github.com/frappe/erpnext/issues/37826)) ([#37855](https://github.com/frappe/erpnext/issues/37855)) ([71361f7](https://github.com/frappe/erpnext/commit/71361f7673793115bfc9947e13dc5c23d94ccfa2)) * status for over delivery or billing ([95d6742](https://github.com/frappe/erpnext/commit/95d674258749ace52de6fa384c7fb0bd33e37dc8)) * test for invoice returns ([a89af58](https://github.com/frappe/erpnext/commit/a89af589e8b787a77dadff5daae6657b01b91210)) * type error on new payment entry ([5937135](https://github.com/frappe/erpnext/commit/59371358ae9328f4db08b9d55ef09e5ffc103cc2)) * typo in AR report ([fc3d303](https://github.com/frappe/erpnext/commit/fc3d303b820f37cb84ba6b4345ba2bf983c95a0f)) * typo in function name and msg (backport [#37722](https://github.com/frappe/erpnext/issues/37722)) ([#37741](https://github.com/frappe/erpnext/issues/37741)) ([4819fde](https://github.com/frappe/erpnext/commit/4819fde8c58bd17be25b6b9b5ab3255c96ab1089)) * unsupported operand type(s) for serial and batch bundle in POS Invoice (backport [#37721](https://github.com/frappe/erpnext/issues/37721)) ([#37731](https://github.com/frappe/erpnext/issues/37731)) ([b03c65f](https://github.com/frappe/erpnext/commit/b03c65f21da0a583acbe4f33913d4f818978b6b8)) * use get_all instead of get_list ([2a5b3bd](https://github.com/frappe/erpnext/commit/2a5b3bdfd9120db177f28441416d817f3c3b4a98)) * validate so item with qtn ([71538cf](https://github.com/frappe/erpnext/commit/71538cfab19870bed654aee0aa500b431204ee30)) * valuation rate for the subcontracting receipt supplied items with Serial and Batch Bundle (backport [#38094](https://github.com/frappe/erpnext/issues/38094)) (backport [#38097](https://github.com/frappe/erpnext/issues/38097)) ([#38101](https://github.com/frappe/erpnext/issues/38101)) ([880cea5](https://github.com/frappe/erpnext/commit/880cea5b3615bc39a0216c972c8ab1e1f5c03ddc)) ### Features * **accounts_receivable:** test_case added for multi-select customer group ([848efe8](https://github.com/frappe/erpnext/commit/848efe80474b87faaa65112a2757140bd50a0d58)) * add cols for supplier inv details ([e51e5b3](https://github.com/frappe/erpnext/commit/e51e5b36e23ac0f0ccf5ec82a98479b2038306f1)) * allow return of components for SCO that don't have SCR created (backport [#37686](https://github.com/frappe/erpnext/issues/37686)) ([#37693](https://github.com/frappe/erpnext/issues/37693)) ([4044325](https://github.com/frappe/erpnext/commit/40443258cf999de890e2decaa796a011932dffff)) * auto reserve stock for Sales Order on purchase (backport [#37603](https://github.com/frappe/erpnext/issues/37603)) ([#37648](https://github.com/frappe/erpnext/issues/37648)) ([da5bf50](https://github.com/frappe/erpnext/commit/da5bf501eb105cae689991d45f3b1596fef207f6)) * **delivery:** link to delivery notes list view from delivery trip (backport [#37604](https://github.com/frappe/erpnext/issues/37604)) ([#37696](https://github.com/frappe/erpnext/issues/37696)) ([08ea62f](https://github.com/frappe/erpnext/commit/08ea62f4e47bda5bbc541a8db768892936c9df99)) * multi-select customer group in AR Report ([fff294f](https://github.com/frappe/erpnext/commit/fff294fb37dae9ba96129ff9582e61fc30745916)) * proprietorship & partnership options in entity type ([6df125a](https://github.com/frappe/erpnext/commit/6df125a05fda51a1de4cf41a6661348083ec36be)) * reserved production plan sub assembly items (backport [#37884](https://github.com/frappe/erpnext/issues/37884)) ([#37927](https://github.com/frappe/erpnext/issues/37927)) ([df90fd7](https://github.com/frappe/erpnext/commit/df90fd7b359c2b7ddee9ae871b393597f53ae1c4)) * settings page for repost ([c047fd7](https://github.com/frappe/erpnext/commit/c047fd7ac5e215290aafbc64481ea01e011fc74d)) * **Stock Balance:** add filters from route (backport [#37836](https://github.com/frappe/erpnext/issues/37836)) ([#37840](https://github.com/frappe/erpnext/issues/37840)) ([fad8228](https://github.com/frappe/erpnext/commit/fad8228a670014a8714fd05209b42068a49e54c3)) ### Performance Improvements * Add index to supplier invoice field (backport [#37861](https://github.com/frappe/erpnext/issues/37861)) ([#37863](https://github.com/frappe/erpnext/issues/37863)) ([b1982a6](https://github.com/frappe/erpnext/commit/b1982a69618bbafd0b4a485f8ade159f7636d593)) * index return against for purchase invoice (backport [#37881](https://github.com/frappe/erpnext/issues/37881)) ([#37883](https://github.com/frappe/erpnext/issues/37883)) ([febd20a](https://github.com/frappe/erpnext/commit/febd20acbc535b775d62c2914f48e421a50836ac)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1f2c489498..8de015e3dd 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.0.0" +__version__ = "15.1.0" def get_default_company(user=None): From 5336cf08faa1e471e20b3d986ad558564543f792 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 17 Nov 2023 07:43:26 +0000 Subject: [PATCH 05/23] chore(release): Bumped to Version 15.2.0 # [15.2.0](https://github.com/frappe/erpnext/compare/v15.1.0...v15.2.0) (2023-11-17) ### Bug Fixes * add revaluation journal filter in Payable report ([c967468](https://github.com/frappe/erpnext/commit/c9674683d1ee97d9cbe53acd80bb04ab3e572178)) * allow regional gl in payment entry for gl preview ([#38136](https://github.com/frappe/erpnext/issues/38136)) ([20e15eb](https://github.com/frappe/erpnext/commit/20e15ebd2274c299f300d0e3d7aaf28e2c979b42)) * bom creator not able to amend / duplicate (backport [#38128](https://github.com/frappe/erpnext/issues/38128)) ([#38129](https://github.com/frappe/erpnext/issues/38129)) ([ed9cd7c](https://github.com/frappe/erpnext/commit/ed9cd7c92be709558d7534b398568dc684da9cb9)) * **dn:** regression from bulk transaction fix ([ea43862](https://github.com/frappe/erpnext/commit/ea43862fcd164f5a992f8fd69219f56e086c3589)) * GL Entries for receiving non CWIP assets using Purchase Receipt ([#38123](https://github.com/frappe/erpnext/issues/38123)) ([d512371](https://github.com/frappe/erpnext/commit/d51237195a6ab35ac29bba6dc15d4660de0932af)) * handle partial return against invoices ([ac61abb](https://github.com/frappe/erpnext/commit/ac61abb2e40e5ee09223e41c1f6fec154b290738)) * remove ESS role when not mapped to employee (backport [#37867](https://github.com/frappe/erpnext/issues/37867)) ([#38133](https://github.com/frappe/erpnext/issues/38133)) ([8276614](https://github.com/frappe/erpnext/commit/8276614c14d3143418119e8c31abe11a678c8951)) * reset dr_or_cr for every reference ([22b39ac](https://github.com/frappe/erpnext/commit/22b39ac4b4d46de38e5142ae2bba3b9ca00245df)) * test total unallocated amount in payment ([cb4bb5b](https://github.com/frappe/erpnext/commit/cb4bb5b4ee126a24492775f627849ed5d5a3ff6f)) * valuation rate for the subcontracting receipt supplied items with Serial and Batch Bundle (backport [#38094](https://github.com/frappe/erpnext/issues/38094)) ([#38097](https://github.com/frappe/erpnext/issues/38097)) ([28e6e5d](https://github.com/frappe/erpnext/commit/28e6e5d9106b78a9cba29946cd4a30b68ff2c0f2)) ### Features * virtual parent doctype ([e68d2e1](https://github.com/frappe/erpnext/commit/e68d2e138a656022cfd6e88237b4f8b23adb1efb)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 8de015e3dd..1ee5918cda 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.1.0" +__version__ = "15.2.0" def get_default_company(user=None): From 33869a231cd76aa37f1ba444ade5c96a090342ca Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 21 Nov 2023 18:57:56 +0000 Subject: [PATCH 06/23] chore(release): Bumped to Version 15.3.0 # [15.3.0](https://github.com/frappe/erpnext/compare/v15.2.0...v15.3.0) (2023-11-21) ### Bug Fixes * attributes were mandatory for manufacturers ([00b9c23](https://github.com/frappe/erpnext/commit/00b9c2326cfbabb6dd58c40f9af94043bbbaf788)) * issue occured when creating supplier with contact details ([aaccfeb](https://github.com/frappe/erpnext/commit/aaccfeb918d7427cc110626bc94a2eeb921be6a9)) * overallocation on Payment with PO/SO ([337707b](https://github.com/frappe/erpnext/commit/337707b9cc7e9b13fc1557588beb6f387c6905f3)) * pass check permission in render_address ([a420e13](https://github.com/frappe/erpnext/commit/a420e13765e0a92a62cadfbea07c59f70a6f16c1)) * payment entry rounding error ([384d6b5](https://github.com/frappe/erpnext/commit/384d6b516c152bb7e2f72d28a30752b6bd82eb71)) * set asset's valuation_rate according to asset quantity (backport [#38254](https://github.com/frappe/erpnext/issues/38254)) ([#38256](https://github.com/frappe/erpnext/issues/38256)) ([c60aaa7](https://github.com/frappe/erpnext/commit/c60aaa799acb7eebedc2f8e348d4cdcd9fcb9384)) * set default asset quantity as 1 [dev] (backport [#38223](https://github.com/frappe/erpnext/issues/38223)) ([#38226](https://github.com/frappe/erpnext/issues/38226)) ([99bf63e](https://github.com/frappe/erpnext/commit/99bf63ec0f856e8a74ef6ca915f581eb98583e58)) * Suppier name was not taken when creating address from supplier ([2b94489](https://github.com/frappe/erpnext/commit/2b9448962ff9195bd6ffd535cee0f010876558d3)) * Supplier Quotation fields ([#37963](https://github.com/frappe/erpnext/issues/37963)) ([aef955c](https://github.com/frappe/erpnext/commit/aef955c92040705e11a437419379b7e29633c339)) * test case for rounded total with cash disc ([eab18e6](https://github.com/frappe/erpnext/commit/eab18e6f710637d0eee63d1d41f2b75a4f4e0fa9)) * **Timesheet:** reset billing hours equal to hours if they exceed actual hours (backport [#38134](https://github.com/frappe/erpnext/issues/38134)) ([#38153](https://github.com/frappe/erpnext/issues/38153)) ([5b7b431](https://github.com/frappe/erpnext/commit/5b7b431dc97ef77fd888e8a233269219063428e6)) * **Timesheet:** warn user if billing hours > actual hours instead of resetting (backport [#38239](https://github.com/frappe/erpnext/issues/38239)) ([#38241](https://github.com/frappe/erpnext/issues/38241)) ([1f2f5d8](https://github.com/frappe/erpnext/commit/1f2f5d8cf6e3a1c8245af0fb95e6c0dccdbce2e8)) * TypeError in Subcontracting Receipt (backport [#38200](https://github.com/frappe/erpnext/issues/38200)) ([#38208](https://github.com/frappe/erpnext/issues/38208)) ([3f57a7e](https://github.com/frappe/erpnext/commit/3f57a7e9f06806a833fc9350a21c5d82fa525bac)) * update modified timestamp ([a492e57](https://github.com/frappe/erpnext/commit/a492e574def2661edb2a54cfbde8b231781a231e)) * **ux:** `Task` creation from `Timesheet` (backport [#38207](https://github.com/frappe/erpnext/issues/38207)) ([#38211](https://github.com/frappe/erpnext/issues/38211)) ([e272041](https://github.com/frappe/erpnext/commit/e2720418728da869c6cfc02aeca04b0e54fb0b46)) * valuation rate for FG item for subcontracting receipt (backport [#38244](https://github.com/frappe/erpnext/issues/38244)) ([#38245](https://github.com/frappe/erpnext/issues/38245)) ([ed7b845](https://github.com/frappe/erpnext/commit/ed7b845a5519087ef3aa6c9054451428b3cfa1a3)) * valuation rate in report Item Prices ([#38161](https://github.com/frappe/erpnext/issues/38161)) ([f71234e](https://github.com/frappe/erpnext/commit/f71234e3af77d66a34a6a6305c050ffe685b2bf4)) * wrong round off and rounded total ([70eccf7](https://github.com/frappe/erpnext/commit/70eccf7da0d52c3cfc21f8a5c892993b60de868e)) ### Features * add `Supplier Delivery Note` field in SCR (backport [#38127](https://github.com/frappe/erpnext/issues/38127)) ([#38156](https://github.com/frappe/erpnext/issues/38156)) ([b89a4a7](https://github.com/frappe/erpnext/commit/b89a4a7218338c48026abec660ac23184a9c6eaf)) * Add accounting dimensions to Supplier Quotation ([7d4ac7e](https://github.com/frappe/erpnext/commit/7d4ac7e7ffd92ed874d32e1f635311d245ec7fda)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1ee5918cda..34fae2fd1d 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.2.0" +__version__ = "15.3.0" def get_default_company(user=None): From d4a3d6bbe0b309a1161638a0f5b97ed23123e1a6 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 28 Nov 2023 16:24:28 +0000 Subject: [PATCH 07/23] chore(release): Bumped to Version 15.4.0 # [15.4.0](https://github.com/frappe/erpnext/compare/v15.3.0...v15.4.0) (2023-11-28) ### Bug Fixes * allow on submit for child table fields ([ac7615a](https://github.com/frappe/erpnext/commit/ac7615ac0191bbd8b9c7fd9bae9ac6d3b37d11af)) * annual income and expenses in digest ([ca2ad17](https://github.com/frappe/erpnext/commit/ca2ad175d3ccd62289c0a9af26ba78debfbb170a)) * check reposting settings before allowing editable si ([25bf475](https://github.com/frappe/erpnext/commit/25bf475d5a9feb8b41aafef9e4459aae4832c8c1)) * condition in other bundle utils ([e4d9ef1](https://github.com/frappe/erpnext/commit/e4d9ef12938c8470df317ffce6b99fd34a3b6549)) * create contact if existing customer doesn't have contact ([b1b065d](https://github.com/frappe/erpnext/commit/b1b065daf1f79eb83834aaa033ecf89403e75877)) * display all item rate stop messages (backport [#38289](https://github.com/frappe/erpnext/issues/38289)) ([#38307](https://github.com/frappe/erpnext/issues/38307)) ([99c1fbf](https://github.com/frappe/erpnext/commit/99c1fbf9fc6cce11aad16a055d23a16c62925fed)) * do not set repost flag without validating voucher ([6a3c3b4](https://github.com/frappe/erpnext/commit/6a3c3b4cac984ee24208e8a6ff80c4425a88a395)) * don't depreciate assets with no schedule on scrapping (backport [#38276](https://github.com/frappe/erpnext/issues/38276)) ([#38293](https://github.com/frappe/erpnext/issues/38293)) ([18613c5](https://github.com/frappe/erpnext/commit/18613c595f32371997f17b24249f5d7fc13a8240)) * filter bundle items based on disabled check ([fb517e8](https://github.com/frappe/erpnext/commit/fb517e823f66ee43e471bc74bca5bd6b959a4f53)) * fiscal year using future date ([b9a1fac](https://github.com/frappe/erpnext/commit/b9a1fac7d8454399dad3f59093e88cec1f0c90dc)) * has_product_bundle util to only check for enabled bundles ([5c12872](https://github.com/frappe/erpnext/commit/5c12872f706d51b8e5b14da7db6564577e95ae70)) * job card overlap validation (backport [#38345](https://github.com/frappe/erpnext/issues/38345)) ([#38348](https://github.com/frappe/erpnext/issues/38348)) ([d6fe7eb](https://github.com/frappe/erpnext/commit/d6fe7eb10c9136ba4166f9f7ade032c2c7a645f5)) * make parameters of `create_subscription_process` optional (and other minor fixes) ([#38360](https://github.com/frappe/erpnext/issues/38360)) ([721b429](https://github.com/frappe/erpnext/commit/721b429d9316e2901ac34f20bc9c6d71e8c00acc)) * Negative Qty and Rates in SO/PO (backport [#38252](https://github.com/frappe/erpnext/issues/38252)) ([#38357](https://github.com/frappe/erpnext/issues/38357)) ([14174df](https://github.com/frappe/erpnext/commit/14174df86277ab3d6dee25f17156f637645ce89c)) * no fstring in translation (backport [#38381](https://github.com/frappe/erpnext/issues/38381)) ([#38387](https://github.com/frappe/erpnext/issues/38387)) ([c101855](https://github.com/frappe/erpnext/commit/c1018555a0c8600a988b10483419dc0a92f2c415)) * patch - Duplicate entry quality inspection parameter (backport [#38262](https://github.com/frappe/erpnext/issues/38262)) ([#38264](https://github.com/frappe/erpnext/issues/38264)) ([4c9890a](https://github.com/frappe/erpnext/commit/4c9890a24e656bee30b1de74e192f8e82b2b57d9)) * Payment Reco Issue and chart of account importer ([4699887](https://github.com/frappe/erpnext/commit/4699887f1c8b6b93de9971f4b810da95ea0afc9f)) * serial no status (backport [#38391](https://github.com/frappe/erpnext/issues/38391)) ([#38397](https://github.com/frappe/erpnext/issues/38397)) ([b65c225](https://github.com/frappe/erpnext/commit/b65c22579d61973d0bc8cab25f8ee1c3b2cbdb8a)) * Server Error while creating Product Bundle (backport [#38377](https://github.com/frappe/erpnext/issues/38377)) ([#38380](https://github.com/frappe/erpnext/issues/38380)) ([922aef6](https://github.com/frappe/erpnext/commit/922aef665b25ef4c5642de46fbd817d14402e23e)) * skip disabled bundles for non-report utils ([3d46b32](https://github.com/frappe/erpnext/commit/3d46b323b324c62f42a37e423eb5ce2a63c26b88)) * skip fixed assets in parent ([314a91a](https://github.com/frappe/erpnext/commit/314a91ac4d82d5487f74868dc12c808491544723)) * Supplier `Primary Contact` (backport [#38268](https://github.com/frappe/erpnext/issues/38268)) ([#38286](https://github.com/frappe/erpnext/issues/38286)) ([37d1f1a](https://github.com/frappe/erpnext/commit/37d1f1ac67e9b2b62b51e0527637b9690e99234c)) * **ux:** Sales Order Stock Reservation Dialog (backport [#38261](https://github.com/frappe/erpnext/issues/38261)) ([#38344](https://github.com/frappe/erpnext/issues/38344)) ([3cbe599](https://github.com/frappe/erpnext/commit/3cbe59902aab249199297bc110ca2bbfc0e517ca)) * validation for existing bundles ([c0de9c0](https://github.com/frappe/erpnext/commit/c0de9c0cef860ce10b1da13f8f4e0288af09ceb6)) ### Features * add Bank Transaction to connections in Journal and Payment Entry (backport [#38297](https://github.com/frappe/erpnext/issues/38297)) ([#38301](https://github.com/frappe/erpnext/issues/38301)) ([72647b8](https://github.com/frappe/erpnext/commit/72647b862469f8a6d5900f92a605088da4b8b131)) * add disabled field in product bundle ([fcd53be](https://github.com/frappe/erpnext/commit/fcd53be1881554b16797689ea05ba248221fd07c)) * new Report "Lost Quotations" ([#38309](https://github.com/frappe/erpnext/issues/38309)) ([ea2c348](https://github.com/frappe/erpnext/commit/ea2c3487a3c33b86de3cb7532ffe9cecb174e897)) ### Performance Improvements * optimize total_purchase_cost update ([deed9f5](https://github.com/frappe/erpnext/commit/deed9f5840dea5485febcd18e29fcf1d9291fcf4)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 34fae2fd1d..03f44423d3 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.3.0" +__version__ = "15.4.0" def get_default_company(user=None): From 6826a1e97643155bac97a0d4fbd977528bb34798 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 5 Dec 2023 13:51:15 +0000 Subject: [PATCH 08/23] chore(release): Bumped to Version 15.5.0 # [15.5.0](https://github.com/frappe/erpnext/compare/v15.4.0...v15.5.0) (2023-12-05) ### Bug Fixes * `AttributeError` while saving Purchase Invoice (backport [#38482](https://github.com/frappe/erpnext/issues/38482)) ([#38490](https://github.com/frappe/erpnext/issues/38490)) ([f6c48e8](https://github.com/frappe/erpnext/commit/f6c48e8ecf05a4e6edd4023a7dd6a40b229f0fd2)) * `OperationalError` while selecting Serial No in `Warranty Claim` (backport [#38394](https://github.com/frappe/erpnext/issues/38394)) ([#38414](https://github.com/frappe/erpnext/issues/38414)) ([80afeca](https://github.com/frappe/erpnext/commit/80afeca229598eeab414b718065de9ee17f19b61)) * Add missing french translations ([#38368](https://github.com/frappe/erpnext/issues/38368)) ([b5c89ec](https://github.com/frappe/erpnext/commit/b5c89ec3b471e570c56618db5eca6650b754c068)) * better overlap logic for job card (backport [#38432](https://github.com/frappe/erpnext/issues/38432)) ([#38522](https://github.com/frappe/erpnext/issues/38522)) ([2a9e843](https://github.com/frappe/erpnext/commit/2a9e8436103fc87456db4b625fcd6d3d96e85b63)) * consider the `Valuation Method` while picking incorrect SLE (backport [#38592](https://github.com/frappe/erpnext/issues/38592)) ([#38595](https://github.com/frappe/erpnext/issues/38595)) ([9d45bbd](https://github.com/frappe/erpnext/commit/9d45bbd051c6b1e27cf9cde49bb48e0640eec57c)) * debit credit mismatch in multi-currecy asset purchase receipt ([#38342](https://github.com/frappe/erpnext/issues/38342)) ([b9f26ae](https://github.com/frappe/erpnext/commit/b9f26ae849bdc1ded4f027029250116312df4733)) * don't consider cancelled entries ([#38401](https://github.com/frappe/erpnext/issues/38401)) ([0a29dbe](https://github.com/frappe/erpnext/commit/0a29dbe09e6d9165614141c7b4b2398eb6f19300)) * don't show non-stock items in Stock Analytics report (backport [#38543](https://github.com/frappe/erpnext/issues/38543)) ([#38545](https://github.com/frappe/erpnext/issues/38545)) ([282a5b2](https://github.com/frappe/erpnext/commit/282a5b27adec89bf449f7006408a69aaf435d5ed)) * don't update previous doc on rate change (backport [#38493](https://github.com/frappe/erpnext/issues/38493)) ([#38524](https://github.com/frappe/erpnext/issues/38524)) ([0aa96f7](https://github.com/frappe/erpnext/commit/0aa96f783d4293b82f9c07b8c740545eb142db27)) * exclude `invoice_doctypes` from party advance ([927538f](https://github.com/frappe/erpnext/commit/927538f7769dc2d112fe487a6e690fc499605f60)) * exploded items in Subcontracting Receipt (backport [#38441](https://github.com/frappe/erpnext/issues/38441)) ([#38445](https://github.com/frappe/erpnext/issues/38445)) ([e066698](https://github.com/frappe/erpnext/commit/e06669847d995c634f7beb2669f9d3818baeca2a)) * german translations for Lost Quotations (backport [#38435](https://github.com/frappe/erpnext/issues/38435)) ([#38516](https://github.com/frappe/erpnext/issues/38516)) ([33c59a2](https://github.com/frappe/erpnext/commit/33c59a2bb10a03c412d28ac6e65de553eba014b7)) * get dynamic link with parenttype contact ([cb9589b](https://github.com/frappe/erpnext/commit/cb9589b8efecb9f3c381a13a28e8de1da98ef40f)) * incorrect customer outstanding amount ([#38475](https://github.com/frappe/erpnext/issues/38475)) ([98fe89a](https://github.com/frappe/erpnext/commit/98fe89a24df343208f5f872531b9d3a38ba50d2d)) * incorrect material request quantity in Production Plan (backport [#38566](https://github.com/frappe/erpnext/issues/38566)) ([#38579](https://github.com/frappe/erpnext/issues/38579)) ([145ed3a](https://github.com/frappe/erpnext/commit/145ed3a3b181d992750f17dac010e50eadb2b51f)) * incorrect ordered qty for Subcontracting Order ([#38415](https://github.com/frappe/erpnext/issues/38415)) ([71fe2bc](https://github.com/frappe/erpnext/commit/71fe2bcc281ad92cd936682567744b8c7656598a)) * incorrect requested quantity for the subcontracting order ([abe3e41](https://github.com/frappe/erpnext/commit/abe3e41a17981449d778a7b5c2fb728702f76f3c)) * incorrectly treating normal payment as advance ([#38437](https://github.com/frappe/erpnext/issues/38437)) ([246dd74](https://github.com/frappe/erpnext/commit/246dd74ba418ed63b9f2ac05e4dea82ef551aa0c)) * item group filter in sales person wise report ([602f6ca](https://github.com/frappe/erpnext/commit/602f6ca5459981785458da976d4c48db9041d53e)) * make create button translatable ([#38165](https://github.com/frappe/erpnext/issues/38165)) ([95f9cc9](https://github.com/frappe/erpnext/commit/95f9cc99b9fe73669d4166ff7303cfd71c8b5291)) * **regional:** use net figures for sales calc ([#38260](https://github.com/frappe/erpnext/issues/38260)) ([4a243ce](https://github.com/frappe/erpnext/commit/4a243ce5b791643c20872bc73d14e8810d11d3e0)) * remove hardcoded, implicit rounding loss allowance ([4baf796](https://github.com/frappe/erpnext/commit/4baf7960ddf01db9ece7855d8482dde27f6cdb58)) * scan for serial or batch in bundle (backport [#38534](https://github.com/frappe/erpnext/issues/38534)) ([#38552](https://github.com/frappe/erpnext/issues/38552)) ([88d2a8d](https://github.com/frappe/erpnext/commit/88d2a8d668d5129da8dfa90529f126b3243765dc)) * set cwip account before asset tests ([de7e1ab](https://github.com/frappe/erpnext/commit/de7e1ab2374b43c1f0cdd61104c02e411bb61e7a)) * show item name as title instead of item group in BOM (backport [#38478](https://github.com/frappe/erpnext/issues/38478)) ([#38481](https://github.com/frappe/erpnext/issues/38481)) ([8e57862](https://github.com/frappe/erpnext/commit/8e57862a1c18533f3719831f6bee199837591f64)) * show party instead of party name where naming series not set ([f120dc5](https://github.com/frappe/erpnext/commit/f120dc56c2e508a90eb908694e7d94f7408a9366)) * sql error while filtering on finance book in GL ([3779943](https://github.com/frappe/erpnext/commit/3779943221eb04ebb6317be179eed5384ba9cbde)) * **test:** use correct account type for testing ([8b6eb35](https://github.com/frappe/erpnext/commit/8b6eb3599cc9d143217060ea819ba53c3bac4c4c)) * unset discount amount based on coupon code ([0e50e77](https://github.com/frappe/erpnext/commit/0e50e77d8ebaeb22b23c681c2cc5e4cb18535a47)) * use `docstatus` instead of `status` (backport [#38439](https://github.com/frappe/erpnext/issues/38439)) ([#38443](https://github.com/frappe/erpnext/issues/38443)) ([a50e872](https://github.com/frappe/erpnext/commit/a50e872820c80a29f6fa8c137befeea84191512a)) * use predefined onload property `load_after_mapping` ([#38209](https://github.com/frappe/erpnext/issues/38209)) ([4a558b7](https://github.com/frappe/erpnext/commit/4a558b7efb43390eee3a5f41493b0edd382cd8f5)) * **ux:** make valuation field read only when it can't be modified (backport [#38450](https://github.com/frappe/erpnext/issues/38450)) ([#38464](https://github.com/frappe/erpnext/issues/38464)) ([2d9ba88](https://github.com/frappe/erpnext/commit/2d9ba888700afd3a7060cc3a648253e1b7fe14ea)) * validation error has not throw for the batch (backport [#38494](https://github.com/frappe/erpnext/issues/38494)) ([#38502](https://github.com/frappe/erpnext/issues/38502)) ([c797c53](https://github.com/frappe/erpnext/commit/c797c533ed2bfbf92f297b2272a64aa68c69677f)) ### Features * `Company` filter in `Stock Ledger Variance` report (backport [#38553](https://github.com/frappe/erpnext/issues/38553)) ([#38574](https://github.com/frappe/erpnext/issues/38574)) ([02d7dd8](https://github.com/frappe/erpnext/commit/02d7dd8b150de77eb485d37efb4662442d41f40b)) * add customer group filter in sales register ([#38365](https://github.com/frappe/erpnext/issues/38365)) ([185b715](https://github.com/frappe/erpnext/commit/185b715d431c0e27f59053cf3c67e90f87ee67a4)) * auto create PR on SCR submission (backport [#38290](https://github.com/frappe/erpnext/issues/38290)) ([#38428](https://github.com/frappe/erpnext/issues/38428)) ([7005d51](https://github.com/frappe/erpnext/commit/7005d51af366d07ab0636a01f4226ccb1963b1e5)) * enable automatic type annotations (backport [#38452](https://github.com/frappe/erpnext/issues/38452)) ([#38454](https://github.com/frappe/erpnext/issues/38454)) ([5e6a4d2](https://github.com/frappe/erpnext/commit/5e6a4d257e099f7150c2a873a9a15b7f32f56402)) * shift depreciation for assets (backport [#38327](https://github.com/frappe/erpnext/issues/38327)) ([#38417](https://github.com/frappe/erpnext/issues/38417)) ([12ad1ec](https://github.com/frappe/erpnext/commit/12ad1ec71a89b82fa01c12738a573a56a18b94fc)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 03f44423d3..0e27c081a7 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.4.0" +__version__ = "15.5.0" def get_default_company(user=None): From 86b276a3ecbbe4194a07c619d8c51d2c2da936dd Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 12 Dec 2023 16:11:51 +0000 Subject: [PATCH 09/23] chore(release): Bumped to Version 15.6.0 # [15.6.0](https://github.com/frappe/erpnext/compare/v15.5.0...v15.6.0) (2023-12-12) ### Bug Fixes * `split_invoices_based_on_payment_terms` (backport [#37859](https://github.com/frappe/erpnext/issues/37859)) ([#38488](https://github.com/frappe/erpnext/issues/38488)) ([4b76cc4](https://github.com/frappe/erpnext/commit/4b76cc46a1371a66ba9efd1ebe33a0d54cd2cd96)) * 1st row depr. sch. value of asset put to less than 180 days acc. to I.T. S. 32 (backport [#38696](https://github.com/frappe/erpnext/issues/38696)) ([#38703](https://github.com/frappe/erpnext/issues/38703)) ([2bd9671](https://github.com/frappe/erpnext/commit/2bd96713db51f093e8e8524700826d752c19baee)) * auto delete draft serial and batch bundle (backport [#38637](https://github.com/frappe/erpnext/issues/38637)) ([#38654](https://github.com/frappe/erpnext/issues/38654)) ([b0675f6](https://github.com/frappe/erpnext/commit/b0675f6490c97108f3f32d0cbe2207e55b1745ed)) * close PO on SCO close (backport [#38667](https://github.com/frappe/erpnext/issues/38667)) ([#38681](https://github.com/frappe/erpnext/issues/38681)) ([4055543](https://github.com/frappe/erpnext/commit/4055543f5d87e96c1d3a1dd77c7b63c3225d3a34)) * format only if searched text contain link value text ([d79e6e3](https://github.com/frappe/erpnext/commit/d79e6e353eb5e22f6aae2bd43f7be111682ab3d7)) * get customers for leaderboard ([9d5c79d](https://github.com/frappe/erpnext/commit/9d5c79d6b21a7c1047e06a28fecb453e90e3b285)) * get items for leaderboard ([7cb38a8](https://github.com/frappe/erpnext/commit/7cb38a8f2260ce808a24f7edc7d0d69534d10589)) * get sales partner for leaderboard ([3845d42](https://github.com/frappe/erpnext/commit/3845d4294c819198876d9fa9062d366ffe7f01c1)) * get sales person for leaderboard ([2fcfebe](https://github.com/frappe/erpnext/commit/2fcfebe1d3b3e9e911ca398ebeffb38e00ee2919)) * get suppliers for leaderboard ([e205772](https://github.com/frappe/erpnext/commit/e20577248238a78cc324a507367a75bb348b0e75)) * ignore non-existing regional customizations (backport [#38621](https://github.com/frappe/erpnext/issues/38621)) ([#38624](https://github.com/frappe/erpnext/issues/38624)) ([c70e6f2](https://github.com/frappe/erpnext/commit/c70e6f23df8fa6b3bf46ff6a2cb34ae0b7943686)) * limit end date to current date ([dbdb971](https://github.com/frappe/erpnext/commit/dbdb971e1004feb3b8cabc7b25203bd8043daf10)) * negative batch issue (backport [#38688](https://github.com/frappe/erpnext/issues/38688)) ([#38694](https://github.com/frappe/erpnext/issues/38694)) ([a75081b](https://github.com/frappe/erpnext/commit/a75081b8c032063d102ad9ed2e5873c894899b7b)) * not able to make serial and batch using csv import (backport [#38659](https://github.com/frappe/erpnext/issues/38659)) ([#38662](https://github.com/frappe/erpnext/issues/38662)) ([dd07eca](https://github.com/frappe/erpnext/commit/dd07ecad455946ef6a71fc894a4df7c992af70de)) * only highest eligible coupon applied ([#38416](https://github.com/frappe/erpnext/issues/38416)) ([aa66ee6](https://github.com/frappe/erpnext/commit/aa66ee64ec6af0da27494b7da8cfff5ce68af9b7)) * serial and batch bundle permission (backport [#38618](https://github.com/frappe/erpnext/issues/38618)) ([#38619](https://github.com/frappe/erpnext/issues/38619)) ([ce2bd15](https://github.com/frappe/erpnext/commit/ce2bd15872497d09a26b321965d1b0f1bc14d9f0)) * serial no filter in the Serial No Ledger report (backport [#38669](https://github.com/frappe/erpnext/issues/38669)) ([#38682](https://github.com/frappe/erpnext/issues/38682)) ([d188c8e](https://github.com/frappe/erpnext/commit/d188c8ec0ee63f44f9388ca2c592dd7fbda2ea81)) * Shipping Address Link Showing in Buying (backport [#38634](https://github.com/frappe/erpnext/issues/38634)) ([#38646](https://github.com/frappe/erpnext/issues/38646)) ([4150ed9](https://github.com/frappe/erpnext/commit/4150ed9b3b3a4924daf4ec060e02c0534936806f)) * show stock qty in popup (backport [#38698](https://github.com/frappe/erpnext/issues/38698)) ([#38699](https://github.com/frappe/erpnext/issues/38699)) ([6e2cde4](https://github.com/frappe/erpnext/commit/6e2cde4a213070748b2177282753e7be46101eb9)) * typeerror on new sites ([#38692](https://github.com/frappe/erpnext/issues/38692)) ([9239e73](https://github.com/frappe/erpnext/commit/9239e735ad5384fa40b65a149ec8e6aec0cbb8b6)) * typo in unittest ([#38673](https://github.com/frappe/erpnext/issues/38673)) ([14ee13c](https://github.com/frappe/erpnext/commit/14ee13c77e8baafab629969593c2a0f52e794f6d)) * **ux:** don't update qty blindly (backport [#38608](https://github.com/frappe/erpnext/issues/38608)) ([#38639](https://github.com/frappe/erpnext/issues/38639)) ([0b2e2a2](https://github.com/frappe/erpnext/commit/0b2e2a2ab58482245259e88a976b1834b73e0399)) ### Features * add employee number to client user bootinfo (backport [#38477](https://github.com/frappe/erpnext/issues/38477)) ([#38603](https://github.com/frappe/erpnext/issues/38603)) ([c7dbcbc](https://github.com/frappe/erpnext/commit/c7dbcbcd179b2670137e1df0ffde8726bdc392b5)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0e27c081a7..31b72236fb 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.5.0" +__version__ = "15.6.0" def get_default_company(user=None): From 04c605d76b82739c7d29551c8640ce45323c7506 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 00:17:57 +0530 Subject: [PATCH 10/23] fix: supplier removed on selection of item (backport #38712) (backport #38713) (#38731) fix: supplier removed on selection of item (backport #38712) (#38713) fix: supplier removed on selection of item (#38712) (cherry picked from commit db24e2488247eef326ef52a88dbae8e828893e7e) Co-authored-by: rohitwaghchaure (cherry picked from commit feb452b740f1614cabc36f9f661d10843a992789) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/stock/get_item_details.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index d1a9cf26ac..8ccc8c9676 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -357,7 +357,6 @@ def get_basic_details(args, item, overwrite_warehouse=True): "net_amount": 0.0, "discount_percentage": 0.0, "discount_amount": flt(args.discount_amount) or 0.0, - "supplier": get_default_supplier(args, item_defaults, item_group_defaults, brand_defaults), "update_stock": args.get("update_stock") if args.get("doctype") in ["Sales Invoice", "Purchase Invoice"] else 0, @@ -377,6 +376,10 @@ def get_basic_details(args, item, overwrite_warehouse=True): } ) + default_supplier = get_default_supplier(args, item_defaults, item_group_defaults, brand_defaults) + if default_supplier: + out.supplier = default_supplier + if item.get("enable_deferred_revenue") or item.get("enable_deferred_expense"): out.update(calculate_service_end_date(args, item)) From ff85f2a940cfc2fd079d9db869d74a512ddf78e4 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 13 Dec 2023 18:49:38 +0000 Subject: [PATCH 11/23] chore(release): Bumped to Version 15.6.1 ## [15.6.1](https://github.com/frappe/erpnext/compare/v15.6.0...v15.6.1) (2023-12-13) ### Bug Fixes * supplier removed on selection of item (backport [#38712](https://github.com/frappe/erpnext/issues/38712)) (backport [#38713](https://github.com/frappe/erpnext/issues/38713)) ([#38731](https://github.com/frappe/erpnext/issues/38731)) ([04c605d](https://github.com/frappe/erpnext/commit/04c605d76b82739c7d29551c8640ce45323c7506)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 31b72236fb..606503dc92 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.6.0" +__version__ = "15.6.1" def get_default_company(user=None): From 753c1aa406d23ddfcbbae4e477ab606ffe2409b3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 00:30:18 +0530 Subject: [PATCH 12/23] Revert "fix(ux): don't update qty blindly" (backport #38728) (backport #38730) (#38734) Revert "fix(ux): don't update qty blindly" (backport #38728) (#38730) Revert "fix(ux): don't update qty blindly" (#38728) (cherry picked from commit 6851c5042fc5e2d3f45d070af18a33c24fc10794) Co-authored-by: Ankush Menat (cherry picked from commit 3fabca1051567aacc0d404b230fff1b881f249c9) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/public/js/controllers/transaction.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index c1c4b99dca..c4a3c6fb1f 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -471,6 +471,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe item.pricing_rules = '' return this.frm.call({ method: "erpnext.stock.get_item_details.get_item_details", + child: item, args: { doc: me.frm.doc, args: { @@ -519,19 +520,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe callback: function(r) { if(!r.exc) { frappe.run_serially([ - () => { - var child = locals[cdt][cdn]; - var std_field_list = ["doctype"] - .concat(frappe.model.std_fields_list) - .concat(frappe.model.child_table_field_list); - - for (var key in r.message) { - if (std_field_list.indexOf(key) === -1) { - if (key === "qty" && child[key]) continue; - child[key] = r.message[key]; - } - } - }, () => { var d = locals[cdt][cdn]; me.add_taxes_from_item_tax_template(d.item_tax_rate); From 6e1d9a3dbce1207003566976b0ff72bf75dc8a9e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 22 Oct 2023 10:58:39 +0530 Subject: [PATCH 13/23] refactor: exc rate on foreign currency JE from Bank Reconciliation (cherry picked from commit 89f484282a90516c117c31624fb2cc5eab6fb840) --- .../bank_reconciliation_tool.py | 89 ++++++++++++++----- 1 file changed, 69 insertions(+), 20 deletions(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index 1425e734eb..867dbdcaa1 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -18,6 +18,7 @@ from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_s get_entries, ) from erpnext.accounts.utils import get_account_currency, get_balance_on +from erpnext.setup.utils import get_exchange_rate class BankReconciliationTool(Document): @@ -164,29 +165,74 @@ def create_journal_entry_bts( ) company = frappe.get_value("Account", company_account, "company") + company_default_currency = frappe.get_cached_value("Company", company, "default_currency") + company_account_currency = frappe.get_cached_value("Account", company_account, "account_currency") + second_account_currency = frappe.get_cached_value("Account", second_account, "account_currency") + + is_multi_currency = ( + True + if company_default_currency != company_account_currency + or company_default_currency != second_account_currency + else False + ) accounts = [] - # Multi Currency? - accounts.append( - { - "account": second_account, - "credit_in_account_currency": bank_transaction.deposit, - "debit_in_account_currency": bank_transaction.withdrawal, - "party_type": party_type, - "party": party, - "cost_center": get_default_cost_center(company), - } - ) + second_account_dict = { + "account": second_account, + "account_currency": second_account_currency, + "credit_in_account_currency": bank_transaction.deposit, + "debit_in_account_currency": bank_transaction.withdrawal, + "party_type": party_type, + "party": party, + "cost_center": get_default_cost_center(company), + } - accounts.append( - { - "account": company_account, - "bank_account": bank_transaction.bank_account, - "credit_in_account_currency": bank_transaction.withdrawal, - "debit_in_account_currency": bank_transaction.deposit, - "cost_center": get_default_cost_center(company), - } - ) + company_account_dict = { + "account": company_account, + "account_currency": company_account_currency, + "bank_account": bank_transaction.bank_account, + "credit_in_account_currency": bank_transaction.withdrawal, + "debit_in_account_currency": bank_transaction.deposit, + "cost_center": get_default_cost_center(company), + } + + if is_multi_currency: + exc_rate = get_exchange_rate(company_account_currency, company_default_currency, posting_date) + withdrawal_in_company_currency = flt(exc_rate * abs(bank_transaction.withdrawal)) + deposit_in_company_currency = flt(exc_rate * abs(bank_transaction.deposit)) + + if second_account_currency != company_default_currency: + exc_rate = get_exchange_rate(second_account_currency, company_default_currency, posting_date) + second_account_dict.update( + { + "exchange_rate": exc_rate, + "credit": deposit_in_company_currency, + "debit": withdrawal_in_company_currency, + } + ) + else: + second_account_dict.update( + { + "exchange_rate": 1, + "credit": deposit_in_company_currency, + "debit": withdrawal_in_company_currency, + "credit_in_account_currency": deposit_in_company_currency, + "debit_in_account_currency": withdrawal_in_company_currency, + } + ) + + if company_account_currency != company_default_currency: + exc_rate = get_exchange_rate(company_account_currency, company_default_currency, posting_date) + company_account_dict.update( + { + "exchange_rate": exc_rate, + "credit": withdrawal_in_company_currency, + "debit": deposit_in_company_currency, + } + ) + + accounts.append(second_account_dict) + accounts.append(company_account_dict) journal_entry_dict = { "voucher_type": entry_type, @@ -196,6 +242,9 @@ def create_journal_entry_bts( "cheque_no": reference_number, "mode_of_payment": mode_of_payment, } + if is_multi_currency: + journal_entry_dict.update({"multi_currency": True}) + journal_entry = frappe.new_doc("Journal Entry") journal_entry.update(journal_entry_dict) journal_entry.set("accounts", accounts) From d8903915313298e5cdbcc08afc2fbb8e58aa9d7e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 25 Oct 2023 09:45:05 +0530 Subject: [PATCH 14/23] refactor: handle bank transaction in foreign currency (cherry picked from commit 74a0d6408a2082a2a039cd55547e56206e7c70bd) --- .../bank_reconciliation_tool.py | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index 867dbdcaa1..0779a09e2f 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -151,7 +151,7 @@ def create_journal_entry_bts( bank_transaction = frappe.db.get_values( "Bank Transaction", bank_transaction_name, - fieldname=["name", "deposit", "withdrawal", "bank_account"], + fieldname=["name", "deposit", "withdrawal", "bank_account", "currency"], as_dict=True, )[0] company_account = frappe.get_value("Bank Account", bank_transaction.bank_account, "account") @@ -169,10 +169,12 @@ def create_journal_entry_bts( company_account_currency = frappe.get_cached_value("Account", company_account, "account_currency") second_account_currency = frappe.get_cached_value("Account", second_account, "account_currency") + # determine if multi-currency Journal or not is_multi_currency = ( True if company_default_currency != company_account_currency or company_default_currency != second_account_currency + or company_default_currency != bank_transaction.currency else False ) @@ -196,11 +198,16 @@ def create_journal_entry_bts( "cost_center": get_default_cost_center(company), } + # convert transaction amount to company currency if is_multi_currency: - exc_rate = get_exchange_rate(company_account_currency, company_default_currency, posting_date) + exc_rate = get_exchange_rate(bank_transaction.currency, company_default_currency, posting_date) withdrawal_in_company_currency = flt(exc_rate * abs(bank_transaction.withdrawal)) deposit_in_company_currency = flt(exc_rate * abs(bank_transaction.deposit)) + else: + withdrawal_in_company_currency = bank_transaction.withdrawal + deposit_in_company_currency = bank_transaction.deposit + # if second account is of foreign currency, convert and set debit and credit fields. if second_account_currency != company_default_currency: exc_rate = get_exchange_rate(second_account_currency, company_default_currency, posting_date) second_account_dict.update( @@ -208,6 +215,8 @@ def create_journal_entry_bts( "exchange_rate": exc_rate, "credit": deposit_in_company_currency, "debit": withdrawal_in_company_currency, + "credit_in_account_currency": flt(deposit_in_company_currency / exc_rate) or 0, + "debit_in_account_currency": flt(withdrawal_in_company_currency / exc_rate) or 0, } ) else: @@ -221,6 +230,7 @@ def create_journal_entry_bts( } ) + # if company account is of foreign currency, convert and set debit and credit fields. if company_account_currency != company_default_currency: exc_rate = get_exchange_rate(company_account_currency, company_default_currency, posting_date) company_account_dict.update( @@ -230,6 +240,16 @@ def create_journal_entry_bts( "debit": deposit_in_company_currency, } ) + else: + company_account_dict.update( + { + "exchange_rate": 1, + "credit": withdrawal_in_company_currency, + "debit": deposit_in_company_currency, + "credit_in_account_currency": withdrawal_in_company_currency, + "debit_in_account_currency": deposit_in_company_currency, + } + ) accounts.append(second_account_dict) accounts.append(company_account_dict) From 2a5164d17065d174243c18d94407e1d0b4fbdb8d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 20 Dec 2023 04:47:03 +0000 Subject: [PATCH 15/23] chore(release): Bumped to Version 15.7.0 # [15.7.0](https://github.com/frappe/erpnext/compare/v15.6.1...v15.7.0) (2023-12-20) ### Bug Fixes * asset patch failure due to missing shift_based column (backport [#38776](https://github.com/frappe/erpnext/issues/38776)) ([#38777](https://github.com/frappe/erpnext/issues/38777)) ([6e92c78](https://github.com/frappe/erpnext/commit/6e92c78cbdb1348629d7238bd61e7e3ec7bf0a10)) * barcode scanning for the stock entry (backport [#38716](https://github.com/frappe/erpnext/issues/38716)) ([#38718](https://github.com/frappe/erpnext/issues/38718)) ([1dcb065](https://github.com/frappe/erpnext/commit/1dcb065c64ba5c04323f25300b13cbce697d5e63)) * **demo:** Demo setup for canadian COA ([7d84441](https://github.com/frappe/erpnext/commit/7d844411fb581d4d74dbeb758b5f16c3e56daf24)) * fetch exc rate of multi currency journals ([f55b561](https://github.com/frappe/erpnext/commit/f55b561ff918268c178c7a51822c51cc3c7ed89f)) * fetch item_tax_template values if fields with fetch_from exisit ([fba28d6](https://github.com/frappe/erpnext/commit/fba28d6941695a2b6f4a5343775b58d9c4f60bf3)) * groups for current accounts in German CoAs ([58de991](https://github.com/frappe/erpnext/commit/58de9913b90ec0d7e3b042d4ea0e39184c4d3694)) * homepage not working (backport [#38755](https://github.com/frappe/erpnext/issues/38755)) ([#38756](https://github.com/frappe/erpnext/issues/38756)) ([ad3a5b5](https://github.com/frappe/erpnext/commit/ad3a5b58e4ee82f2462756b865183143c133cb21)) * if not budget then don't validate (backport [#38861](https://github.com/frappe/erpnext/issues/38861)) ([#38865](https://github.com/frappe/erpnext/issues/38865)) ([5ec75fb](https://github.com/frappe/erpnext/commit/5ec75fb6df592549ec4ec611250007fb631f0f52)) * incoming rate for sales return with Moving Average valuation method (backport [#38849](https://github.com/frappe/erpnext/issues/38849)) (backport [#38863](https://github.com/frappe/erpnext/issues/38863)) ([#38866](https://github.com/frappe/erpnext/issues/38866)) ([d65be69](https://github.com/frappe/erpnext/commit/d65be69c4c6199d72847999c5cd940c5893aa2a2)) * incorrect available qty for backdated stock reco with batch (backport [#37858](https://github.com/frappe/erpnext/issues/37858)) ([#38811](https://github.com/frappe/erpnext/issues/38811)) ([18bd330](https://github.com/frappe/erpnext/commit/18bd330a590055287f6dc8c509f65452664e45d3)) * Init internal child table values ([7802f6c](https://github.com/frappe/erpnext/commit/7802f6c5283ae57316eec06745f73e91fc89202f)) * item variant with manufacturer (backport [#38845](https://github.com/frappe/erpnext/issues/38845)) (backport [#38847](https://github.com/frappe/erpnext/issues/38847)) ([#38851](https://github.com/frappe/erpnext/issues/38851)) ([7320440](https://github.com/frappe/erpnext/commit/7320440b615e9d9c7a53cf5d4ea3989c49999b96)) * not able to cancel SCR with Batch (backport [#38817](https://github.com/frappe/erpnext/issues/38817)) (backport [#38821](https://github.com/frappe/erpnext/issues/38821)) ([#38829](https://github.com/frappe/erpnext/issues/38829)) ([4bd1a5f](https://github.com/frappe/erpnext/commit/4bd1a5f955b94b850b06f385ef70e6943b9725c9)) * not able to make inter-company po from so (backport [#38826](https://github.com/frappe/erpnext/issues/38826)) (backport [#38828](https://github.com/frappe/erpnext/issues/38828)) ([#38833](https://github.com/frappe/erpnext/issues/38833)) ([02ceee6](https://github.com/frappe/erpnext/commit/02ceee6669b99f29342a0106abf3d82639a3e1aa)) * on closed unreserved the production plan qty (backport [#38848](https://github.com/frappe/erpnext/issues/38848)) (backport [#38859](https://github.com/frappe/erpnext/issues/38859)) ([#38862](https://github.com/frappe/erpnext/issues/38862)) ([cbbc6af](https://github.com/frappe/erpnext/commit/cbbc6af128104eef9ff1ef7cc576b518be9f772b)) * **pe:** show split alert only on splitting ([77dba48](https://github.com/frappe/erpnext/commit/77dba4834cbe8645c16da8a8c321552a7a35eb59)) * Reset SLA on issue doesn't work (backport [#38789](https://github.com/frappe/erpnext/issues/38789)) ([#38791](https://github.com/frappe/erpnext/issues/38791)) ([2045306](https://github.com/frappe/erpnext/commit/204530628303551551fb256669181a03cce1d881)) * serial and batch bundle return not working (backport [#38754](https://github.com/frappe/erpnext/issues/38754)) ([#38806](https://github.com/frappe/erpnext/issues/38806)) ([8990c48](https://github.com/frappe/erpnext/commit/8990c48e7bf1c556ad234756259d991519769e09)) * set `fg-itm-qty` based on `qty` instead of the other way round in Subcontracting POs (backport [#38842](https://github.com/frappe/erpnext/issues/38842)) ([#38855](https://github.com/frappe/erpnext/issues/38855)) ([4e27174](https://github.com/frappe/erpnext/commit/4e27174c851d2283c2d6c01767ac95b05c0b46cd)) * show bill_date and bill_no in Purchase Register ([4ed86db](https://github.com/frappe/erpnext/commit/4ed86dbff2c74958fb967fc45066d056e948dc09)) * skip jvs against bank accounts ([bf8a2d0](https://github.com/frappe/erpnext/commit/bf8a2d0e3aab2790beb071785068df78d64f32ae)) * supplier removed on selection of item (backport [#38712](https://github.com/frappe/erpnext/issues/38712)) ([#38713](https://github.com/frappe/erpnext/issues/38713)) ([feb452b](https://github.com/frappe/erpnext/commit/feb452b740f1614cabc36f9f661d10843a992789)) * timezone aware SLA banner (backport [#38745](https://github.com/frappe/erpnext/issues/38745)) ([#38747](https://github.com/frappe/erpnext/issues/38747)) ([a551660](https://github.com/frappe/erpnext/commit/a551660d2a92abb655a573141a378afee5502e29)) * **ux:** don't override Item Name and Description in MR (backport [#38720](https://github.com/frappe/erpnext/issues/38720)) ([#38763](https://github.com/frappe/erpnext/issues/38763)) ([703be50](https://github.com/frappe/erpnext/commit/703be50bc7187fcc7ea203172382d70023b1ce3e)) * validation error on reconciling PE to Journals as Invoice ([aa5e16e](https://github.com/frappe/erpnext/commit/aa5e16e68134dabd58d95bdcd47db78d6c045319)) * wrong currency in Stock Balance report (backport [#38778](https://github.com/frappe/erpnext/issues/38778)) ([#38780](https://github.com/frappe/erpnext/issues/38780)) ([7fc8150](https://github.com/frappe/erpnext/commit/7fc8150617c3d6410702871289f80f5dab803f9a)) * wrong paid and cn amount on pos invoice ([cff9e47](https://github.com/frappe/erpnext/commit/cff9e471620c224133b12e7fe3cc9955e88efcef)) ### Features * RFQ print preview ([f30bede](https://github.com/frappe/erpnext/commit/f30bede2e03a2662ed17de1664bca3b624057f54)) * set lead name from email ([f770621](https://github.com/frappe/erpnext/commit/f7706211ea9baa79b46584feccec4bef4d5de5be)) ### Performance Improvements * index `return_against` on delivery note (backport [#38827](https://github.com/frappe/erpnext/issues/38827)) ([#38832](https://github.com/frappe/erpnext/issues/38832)) ([6ad75e7](https://github.com/frappe/erpnext/commit/6ad75e72e6e1142e9414de364f87bf152255fbfb)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 606503dc92..2a84d003d9 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.6.1" +__version__ = "15.7.0" def get_default_company(user=None): From f3ab5a33c79baf2567aea5c9e91e7810740f6dab Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 27 Dec 2023 08:41:36 +0000 Subject: [PATCH 16/23] chore(release): Bumped to Version 15.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [15.8.0](https://github.com/frappe/erpnext/compare/v15.7.0...v15.8.0) (2023-12-27) ### Bug Fixes * `Reserved Stock` report (backport [#38922](https://github.com/frappe/erpnext/issues/38922)) ([#38924](https://github.com/frappe/erpnext/issues/38924)) ([8f643f0](https://github.com/frappe/erpnext/commit/8f643f0df85be91654a1cc27f4c81e0125c887f7)) * allow to set rate manually for service item in BOM (backport [#38880](https://github.com/frappe/erpnext/issues/38880)) (backport [#38882](https://github.com/frappe/erpnext/issues/38882)) ([#38885](https://github.com/frappe/erpnext/issues/38885)) ([74606dc](https://github.com/frappe/erpnext/commit/74606dc927067f5fc500fcd9af797e188711b2b0)) * do not make serial batch bundle for zero qty (backport [#38949](https://github.com/frappe/erpnext/issues/38949)) ([#38954](https://github.com/frappe/erpnext/issues/38954)) ([a41cf62](https://github.com/frappe/erpnext/commit/a41cf6243701bd97033fbf2a5a921537cdcd157a)) * do not reset the basic rate for the material receipt stock entry (backport [#38896](https://github.com/frappe/erpnext/issues/38896)) ([#38899](https://github.com/frappe/erpnext/issues/38899)) ([f6eb2b5](https://github.com/frappe/erpnext/commit/f6eb2b521d71b61c3ddad5194ff94e0ed3d7ba95)) * incorrect price list in customer-wise item price report ([e0dbb57](https://github.com/frappe/erpnext/commit/e0dbb573b1d64f002aca81df2287717fad94657d)) * incorrect qty in serial batch bundle against pick list (backport [#38964](https://github.com/frappe/erpnext/issues/38964)) ([#38966](https://github.com/frappe/erpnext/issues/38966)) ([5874be0](https://github.com/frappe/erpnext/commit/5874be0f79e7d1bb54c60b22048a2b66baf8078f)) * local reference error in BOM (backport [#38850](https://github.com/frappe/erpnext/issues/38850)) ([#38877](https://github.com/frappe/erpnext/issues/38877)) ([e3be9c1](https://github.com/frappe/erpnext/commit/e3be9c1da409b39f5130708424560019bfec6cc9)) * min order qty optional in production plan (backport [#38956](https://github.com/frappe/erpnext/issues/38956)) ([#38958](https://github.com/frappe/erpnext/issues/38958)) ([ab9fce3](https://github.com/frappe/erpnext/commit/ab9fce333d2867a2d50aef33d021e157dc54c316)) * not able to import serial batch bundle using csv (backport [#38950](https://github.com/frappe/erpnext/issues/38950)) ([#38955](https://github.com/frappe/erpnext/issues/38955)) ([0e48ef7](https://github.com/frappe/erpnext/commit/0e48ef7ace45be181c7be62ead9887eb64c6990c)) * reposting not fixing valuation rate for sales return using movin… (backport [#38895](https://github.com/frappe/erpnext/issues/38895)) (backport [#38897](https://github.com/frappe/erpnext/issues/38897)) ([#38901](https://github.com/frappe/erpnext/issues/38901)) ([eabb956](https://github.com/frappe/erpnext/commit/eabb956acadfef7f69e72a160a86e4963d6e7393)) * reset the incoming rate on changing of the warehouse (backport [#38925](https://github.com/frappe/erpnext/issues/38925)) ([#38926](https://github.com/frappe/erpnext/issues/38926)) ([82960e3](https://github.com/frappe/erpnext/commit/82960e33124b4264dbb8512c23484cc7f945d4e5)) * **test:** expect account currency when party account is specified. ([2d9a0a8](https://github.com/frappe/erpnext/commit/2d9a0a8e2ebc02d97334fde8fdf314e25735216c)) * typeerror on pos order summary to new order screen ([bf98a8f](https://github.com/frappe/erpnext/commit/bf98a8f85522d7c9807bf8b4969f8c2d620077a1)) * typerror on tree doctypes - Item Group, Customer Group, Supplier Group and Territory (backport [#38870](https://github.com/frappe/erpnext/issues/38870)) ([#38871](https://github.com/frappe/erpnext/issues/38871)) ([d75ac13](https://github.com/frappe/erpnext/commit/d75ac136d7a8a66df2965bb9bb33b3134eb4cae5)) * use party account currency when party account is specified ([32d3d4e](https://github.com/frappe/erpnext/commit/32d3d4e571307f1ef4a9bafae84e730077879ba9)) * **ux:** make PR and PI Item rate field readonly based on `Maintain Same Rate` (backport [#38942](https://github.com/frappe/erpnext/issues/38942)) ([#38944](https://github.com/frappe/erpnext/issues/38944)) ([f704ccb](https://github.com/frappe/erpnext/commit/f704ccbb59d1dd00ef4c4f58282f0c6530b79fa3)) ### Features * in_party_currency option for AR/AP reports ([a65bc77](https://github.com/frappe/erpnext/commit/a65bc77b0295747ffffb092f5e37fec458dc9234)) * provision to add items in Stock Reservation dialog (backport [#38558](https://github.com/frappe/erpnext/issues/38558)) ([#38920](https://github.com/frappe/erpnext/issues/38920)) ([8c2c90f](https://github.com/frappe/erpnext/commit/8c2c90f77a42acbfa21fd5ca5391770d101ed6ff)) * total_asset_cost field (backport [#38879](https://github.com/frappe/erpnext/issues/38879)) ([#38887](https://github.com/frappe/erpnext/issues/38887)) ([58f1df5](https://github.com/frappe/erpnext/commit/58f1df50047abc1e0084ce389678adbe85919067)) ### Performance Improvements * Drop unused/duplicate/sub-optimal indexes (backport [#38884](https://github.com/frappe/erpnext/issues/38884)) ([#38913](https://github.com/frappe/erpnext/issues/38913)) ([308c6ff](https://github.com/frappe/erpnext/commit/308c6ffb4fb09169ff7541e14057fb179b4c3aee)) * use estimated rows instead of actual rows (backport [#38830](https://github.com/frappe/erpnext/issues/38830)) ([#38876](https://github.com/frappe/erpnext/issues/38876)) ([648f275](https://github.com/frappe/erpnext/commit/648f2757972409a4b5608266e753e9e50ae263c9)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 2a84d003d9..8c4eef76e9 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.7.0" +__version__ = "15.8.0" def get_default_company(user=None): From 83e62bbaad38cef5b12d1e258faf5880856ce156 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 28 Dec 2023 11:24:16 +0530 Subject: [PATCH 17/23] fix: not able to cancel sales invoice (backport #38979) (backport #38980) (#38981) fix: not able to cancel sales invoice (backport #38979) (#38980) fix: not able to cancel sales invoice (#38979) (cherry picked from commit a117ef3cb88223f0a9f94f863e232b2771b277c8) Co-authored-by: rohitwaghchaure (cherry picked from commit f8625f3eb7e60b3985de900f7443864c7dec20e3) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../accounts/doctype/purchase_invoice/purchase_invoice.js | 4 +++- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 5 ++++- erpnext/public/js/controllers/transaction.js | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 215d8ec215..44d4d81643 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -35,7 +35,7 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. super.onload(); // Ignore linked advances - this.frm.ignore_doctypes_on_cancel_all = ['Journal Entry', 'Payment Entry', 'Purchase Invoice', "Repost Payment Ledger", "Repost Accounting Ledger", "Unreconcile Payment", "Unreconcile Payment Entries"]; + this.frm.ignore_doctypes_on_cancel_all = ['Journal Entry', 'Payment Entry', 'Purchase Invoice', "Repost Payment Ledger", "Repost Accounting Ledger", "Unreconcile Payment", "Unreconcile Payment Entries", "Serial and Batch Bundle"]; if(!this.frm.doc.__islocal) { // show credit_to in print format @@ -408,6 +408,8 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. } on_submit() { + super.on_submit(); + $.each(this.frm.doc["items"] || [], function(i, row) { if(row.purchase_receipt) frappe.model.clear_doc("Purchase Receipt", row.purchase_receipt) }) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 6763e446a5..c8d92d0d70 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -37,7 +37,9 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e super.onload(); this.frm.ignore_doctypes_on_cancel_all = ['POS Invoice', 'Timesheet', 'POS Invoice Merge Log', - 'POS Closing Entry', 'Journal Entry', 'Payment Entry', "Repost Payment Ledger", "Repost Accounting Ledger", "Unreconcile Payment", "Unreconcile Payment Entries"]; + 'POS Closing Entry', 'Journal Entry', 'Payment Entry', "Repost Payment Ledger", "Repost Accounting Ledger", "Unreconcile Payment", "Unreconcile Payment Entries", + 'Serial and Batch Bundle' + ]; if(!this.frm.doc.__islocal && !this.frm.doc.customer && this.frm.doc.debit_to) { // show debit_to in print format @@ -197,6 +199,7 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e on_submit(doc, dt, dn) { var me = this; + super.on_submit(); if (frappe.get_route()[0] != 'Form') { return } diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 908eec4d7c..07b1e8f847 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -715,6 +715,11 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } on_submit() { + if (in_list(["Purchase Invoice", "Sales Invoice"], this.frm.doc.doctype) + && !this.frm.doc.update_stock) { + return; + } + this.refresh_serial_batch_bundle_field(); } From 7e7eb95934e7a4a686e410727269fa845bf17dee Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 28 Dec 2023 05:55:23 +0000 Subject: [PATCH 18/23] chore(release): Bumped to Version 15.8.1 ## [15.8.1](https://github.com/frappe/erpnext/compare/v15.8.0...v15.8.1) (2023-12-28) ### Bug Fixes * not able to cancel sales invoice (backport [#38979](https://github.com/frappe/erpnext/issues/38979)) (backport [#38980](https://github.com/frappe/erpnext/issues/38980)) ([#38981](https://github.com/frappe/erpnext/issues/38981)) ([83e62bb](https://github.com/frappe/erpnext/commit/83e62bbaad38cef5b12d1e258faf5880856ce156)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 8c4eef76e9..98ed79bc43 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.8.0" +__version__ = "15.8.1" def get_default_company(user=None): From 0a3e378f5eba7b366891f930d617707851d91ccd Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 28 Dec 2023 17:36:00 +0530 Subject: [PATCH 19/23] fix: undefined error in consolidated financial report (cherry picked from commit 49f93f9fa1ce17838c66873771f9b943a4575102) --- .../consolidated_financial_statement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js index 0e0c42dad9..6210fd17f1 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js @@ -128,7 +128,7 @@ frappe.query_reports["Consolidated Financial Statement"] = { } value = default_formatter(value, row, column, data); - if (!data.parent_account) { + if (data && !data.parent_account) { value = $(`${value}`); var $value = $(value).css("font-weight", "bold"); From c4794c95df50e71108e497ceac750f0e632fe5b7 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 28 Dec 2023 12:16:55 +0000 Subject: [PATCH 20/23] chore(release): Bumped to Version 15.8.2 ## [15.8.2](https://github.com/frappe/erpnext/compare/v15.8.1...v15.8.2) (2023-12-28) ### Bug Fixes * undefined error in consolidated financial report ([0a3e378](https://github.com/frappe/erpnext/commit/0a3e378f5eba7b366891f930d617707851d91ccd)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 98ed79bc43..7b60be7304 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.8.1" +__version__ = "15.8.2" def get_default_company(user=None): From 027a75bcb0e30cca09ecee0ff5d5bdfa378974d1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 28 Dec 2023 18:59:20 +0530 Subject: [PATCH 21/23] fix: serial and batch bundle company mandatory error (backport #38994) (backport #38999) (#39003) fix: serial and batch bundle company mandatory error (backport #38994) (#38999) fix: serial and batch bundle company mandatory error (#38994) (cherry picked from commit 10074e9980c8f2a1473827c61c888d970da4b73a) Co-authored-by: rohitwaghchaure (cherry picked from commit d2580be4fd0a08aeddbdbf9b87d99b71a45d7820) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../serial_and_batch_bundle.py | 12 +++--- .../test_serial_and_batch_bundle.py | 40 +++++++++++++++++++ 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py index dd38e1127f..a4fb5324ee 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py @@ -1145,15 +1145,16 @@ def add_serial_batch_ledgers(entries, child_row, doc, warehouse) -> object: if isinstance(entries, str): entries = parse_json(entries) - if doc and isinstance(doc, str): - parent_doc = parse_json(doc) + parent_doc = doc + if parent_doc and isinstance(parent_doc, str): + parent_doc = parse_json(parent_doc) if frappe.db.exists("Serial and Batch Bundle", child_row.serial_and_batch_bundle): - doc = update_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse) + sb_doc = update_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse) else: - doc = create_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse) + sb_doc = create_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse) - return doc + return sb_doc def create_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse=None) -> object: @@ -1177,6 +1178,7 @@ def create_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse=Non "type_of_transaction": type_of_transaction, "posting_date": parent_doc.get("posting_date"), "posting_time": parent_doc.get("posting_time"), + "company": parent_doc.get("company"), } ) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py index d74d657f38..478cfa4d1c 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py @@ -8,6 +8,9 @@ from frappe.tests.utils import FrappeTestCase from frappe.utils import add_days, add_to_date, flt, nowdate, nowtime, today from erpnext.stock.doctype.item.test_item import make_item +from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle import ( + add_serial_batch_ledgers, +) from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry @@ -420,6 +423,43 @@ class TestSerialandBatchBundle(FrappeTestCase): ste.delete() self.assertFalse(frappe.db.exists("Serial and Batch Bundle", bundle_doc.name)) + def test_serial_and_batch_bundle_company(self): + from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt + + item = make_item( + properties={ + "has_serial_no": 1, + "serial_no_series": "TT-SER-VAL-.#####", + } + ) + + pr = make_purchase_receipt( + item_code=item, + warehouse="_Test Warehouse - _TC", + qty=3, + rate=500, + do_not_submit=True, + ) + + entries = [] + for serial_no in ["TT-SER-VAL-00001", "TT-SER-VAL-00002", "TT-SER-VAL-00003"]: + entries.append(frappe._dict({"serial_no": serial_no, "qty": 1})) + + if not frappe.db.exists("Serial No", serial_no): + frappe.get_doc( + { + "doctype": "Serial No", + "serial_no": serial_no, + "item_code": item, + } + ).insert(ignore_permissions=True) + + item_row = pr.items[0] + item_row.type_of_transaction = "Inward" + item_row.is_rejected = 0 + sn_doc = add_serial_batch_ledgers(entries, item_row, pr, "_Test Warehouse - _TC") + self.assertEqual(sn_doc.company, "_Test Company") + def get_batch_from_bundle(bundle): from erpnext.stock.serial_batch_bundle import get_batch_nos From 17bae5a5a16e8d52fa9b6d6c8423a526b12c19b5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 28 Dec 2023 18:59:38 +0530 Subject: [PATCH 22/23] fix: auto fetch not working if bundle exists (backport #39002) (backport #39004) (#39006) fix: auto fetch not working if bundle exists (backport #39002) (#39004) fix: auto fetch not working if bundle exists (#39002) (cherry picked from commit b5340c5ec0d418dcf764efa961f743f88b660a24) Co-authored-by: rohitwaghchaure (cherry picked from commit 2e919344df8cd9018b2fff6d70b49c8db6ba0d8c) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/public/js/utils/serial_no_batch_selector.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 4cd1243413..bf362e338e 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -337,16 +337,18 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { } get_auto_data() { + let { qty, based_on } = this.dialog.get_values(); + if (this.item.serial_and_batch_bundle || this.item.rejected_serial_and_batch_bundle) { - return; + if (qty === this.qty) { + return; + } } if (this.item.serial_no || this.item.batch_no) { return; } - let { qty, based_on } = this.dialog.get_values(); - if (!based_on) { based_on = 'FIFO'; } From ec436c18a382f045480801fb7069446b34e7c647 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 28 Dec 2023 13:31:04 +0000 Subject: [PATCH 23/23] chore(release): Bumped to Version 15.8.3 ## [15.8.3](https://github.com/frappe/erpnext/compare/v15.8.2...v15.8.3) (2023-12-28) ### Bug Fixes * auto fetch not working if bundle exists (backport [#39002](https://github.com/frappe/erpnext/issues/39002)) (backport [#39004](https://github.com/frappe/erpnext/issues/39004)) ([#39006](https://github.com/frappe/erpnext/issues/39006)) ([17bae5a](https://github.com/frappe/erpnext/commit/17bae5a5a16e8d52fa9b6d6c8423a526b12c19b5)) * serial and batch bundle company mandatory error (backport [#38994](https://github.com/frappe/erpnext/issues/38994)) (backport [#38999](https://github.com/frappe/erpnext/issues/38999)) ([#39003](https://github.com/frappe/erpnext/issues/39003)) ([027a75b](https://github.com/frappe/erpnext/commit/027a75bcb0e30cca09ecee0ff5d5bdfa378974d1)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7b60be7304..888160baf4 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.8.2" +__version__ = "15.8.3" def get_default_company(user=None):